updates. New data types.
[silc.git] / apps / silcd / route.h
index 235f9271498c76aa835f995ea491863cdd7fef7a..077831d647720964f2e768caaa84abb8b50591dc 100644 (file)
@@ -31,7 +31,7 @@
 
    Following short description of the fields.
 
 
    Following short description of the fields.
 
-   unsigned int dest
+   uint32 dest
 
        Destination IPv4 address.  Can be used to quickly check whether
        the found route entry is what the caller wanted.
 
        Destination IPv4 address.  Can be used to quickly check whether
        the found route entry is what the caller wanted.
@@ -42,7 +42,7 @@
 
 */
 typedef struct {
 
 */
 typedef struct {
-  unsigned int dest;
+  uint32 dest;
   SilcServerEntry router;
 } SilcServerRouteTable;
 
   SilcServerEntry router;
 } SilcServerRouteTable;
 
@@ -55,10 +55,10 @@ extern SilcServerRouteTable silc_route_cache[SILC_SERVER_ROUTE_SIZE];
    `port' argument may be zero (0) if it doesn't exist.  This has been
    taken from Linux kernel's route cache code. */
 extern inline
    `port' argument may be zero (0) if it doesn't exist.  This has been
    taken from Linux kernel's route cache code. */
 extern inline
-unsigned int silc_server_route_hash(unsigned int addr, 
-                                   unsigned short port)
+uint32 silc_server_route_hash(unsigned int addr, 
+                                   uint16 port)
 {
 {
-  unsigned int hash;
+  uint32 hash;
   
   hash = ((addr & 0xf0f0f0f0) >> 4) | ((addr & 0x0f0f0f0f) << 4);
   hash ^= port;
   
   hash = ((addr & 0xf0f0f0f0) >> 4) | ((addr & 0x0f0f0f0f) << 4);
   hash ^= port;
@@ -69,10 +69,10 @@ unsigned int silc_server_route_hash(unsigned int addr,
 }
 
 /* Prototypes */
 }
 
 /* Prototypes */
-void silc_server_route_add(unsigned int index, unsigned int dest,
+void silc_server_route_add(uint32 index, unsigned int dest,
                           SilcServerEntry router);
                           SilcServerEntry router);
-SilcServerEntry silc_server_route_check(unsigned int dest, 
-                                       unsigned short port);
+SilcServerEntry silc_server_route_check(uint32 dest, 
+                                       uint16 port);
 SilcSocketConnection silc_server_route_get(SilcServer server, void *id,
                                           SilcIdType id_type);
 
 SilcSocketConnection silc_server_route_get(SilcServer server, void *id,
                                           SilcIdType id_type);