Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

libnet-macros.h File Reference

Go to the source code of this file.

Defines

#define LIBNET_DONT_RESOLVE   0
#define LIBNET_RESOLVE   1
#define LIBNET_PR2   0
#define LIBNET_PR8   1
#define LIBNET_PR16   2
#define LIBNET_PRu16   3
#define LIBNET_PR32   4
#define LIBNET_PRu32   5
#define LIBNET_PRAND_MAX   0xffffffff
#define PR2   LIBNET_PR2
#define PR8   LIBNET_PR8
#define PR16   LIBNET_PR16
#define PRu16   LIBNET_PRu16
#define PR32   LIBNET_PR32
#define PRu32   LIBNET_PRu32
#define PRAND_MAX   LIBNET_PRAND_MAX
#define LIBNET_PACKET   LIBNET_IP_H + LIBNET_TCP_H
#define LIBNET_OPTS   0x34
#define LIBNET_MAX_PACKET   0xffff
#define LIBNET_ERR_WARNING   1
#define LIBNET_ERR_CRITICAL   2
#define LIBNET_ERR_FATAL   3
#define LN_ERR_WARNING   LIBNET_ERR_WARNING
#define LN_ERR_CRITICAL   LIBNET_ERR_CRITICAL
#define LN_ERR_FATAL   LIBNET_ERR_FATAL
#define LIBNET_ERRBUF_SIZE   256
#define FIX(n)   (n)
#define UNFIX(n)   (n)
#define LIBNET_GET_ARENA_SIZE(a)   (a.size)
#define LIBNET_GET_ARENA_REMAINING_BYTES(a)   (a.size - a.current)
#define LIBNET_CKSUM_CARRY(x)   (x = (x >> 16) + (x & 0xffff), (~(x + (x >> 16)) & 0xffff))
#define LIBNET_OSPF_AUTHCPY(x, y)   memcpy((u_char *)x, (u_char *)y, sizeof(y))
#define LIBNET_OSPF_CKSUMBUF(x, y)   memcpy((u_char *)x, (u_char *)y, sizeof(y))
#define LIBNET_ISLOOPBACK(p)   (strcmp((p)->ifr_name, "lo0") == 0)
#define LIBNET_PRINT_ETH_ADDR(e)


Define Documentation

#define FIX  )     (n)
 

Definition at line 96 of file libnet-macros.h.

#define LIBNET_CKSUM_CARRY  )     (x = (x >> 16) + (x & 0xffff), (~(x + (x >> 16)) & 0xffff))
 

Definition at line 110 of file libnet-macros.h.

#define LIBNET_DONT_RESOLVE   0
 

Definition at line 38 of file libnet-macros.h.

#define LIBNET_ERR_CRITICAL   2
 

Definition at line 75 of file libnet-macros.h.

#define LIBNET_ERR_FATAL   3
 

Definition at line 76 of file libnet-macros.h.

#define LIBNET_ERR_WARNING   1
 

Definition at line 74 of file libnet-macros.h.

#define LIBNET_ERRBUF_SIZE   256
 

Definition at line 86 of file libnet-macros.h.

#define LIBNET_GET_ARENA_REMAINING_BYTES  )     (a.size - a.current)
 

Definition at line 104 of file libnet-macros.h.

#define LIBNET_GET_ARENA_SIZE  )     (a.size)
 

Definition at line 103 of file libnet-macros.h.

#define LIBNET_ISLOOPBACK  )     (strcmp((p)->ifr_name, "lo0") == 0)
 

Definition at line 127 of file libnet-macros.h.

#define LIBNET_MAX_PACKET   0xffff
 

Definition at line 68 of file libnet-macros.h.

#define LIBNET_OPTS   0x34
 

Definition at line 67 of file libnet-macros.h.

#define LIBNET_OSPF_AUTHCPY x,
 )     memcpy((u_char *)x, (u_char *)y, sizeof(y))
 

Definition at line 117 of file libnet-macros.h.

#define LIBNET_OSPF_CKSUMBUF x,
 )     memcpy((u_char *)x, (u_char *)y, sizeof(y))
 

Definition at line 118 of file libnet-macros.h.

#define LIBNET_PACKET   LIBNET_IP_H + LIBNET_TCP_H
 

Definition at line 66 of file libnet-macros.h.

#define LIBNET_PR16   2
 

Definition at line 46 of file libnet-macros.h.

#define LIBNET_PR2   0
 

Definition at line 44 of file libnet-macros.h.

#define LIBNET_PR32   4
 

Definition at line 48 of file libnet-macros.h.

#define LIBNET_PR8   1
 

Definition at line 45 of file libnet-macros.h.

#define LIBNET_PRAND_MAX   0xffffffff
 

Definition at line 50 of file libnet-macros.h.

#define LIBNET_PRINT_ETH_ADDR  ) 
 

Value:

{ \
    int i = 0; \
    for (i = 0; i < 6; i++) \
    { \
        printf("%x", e.ether_addr_octet[i]); \
        if (i != 5) \
        { \
            printf(":"); \
        } \
    } \
    printf("\n"); \
}

Definition at line 130 of file libnet-macros.h.

#define LIBNET_PRu16   3
 

Definition at line 47 of file libnet-macros.h.

#define LIBNET_PRu32   5
 

Definition at line 49 of file libnet-macros.h.

#define LIBNET_RESOLVE   1
 

Definition at line 39 of file libnet-macros.h.

#define LN_ERR_CRITICAL   LIBNET_ERR_CRITICAL
 

Definition at line 82 of file libnet-macros.h.

#define LN_ERR_FATAL   LIBNET_ERR_FATAL
 

Definition at line 83 of file libnet-macros.h.

#define LN_ERR_WARNING   LIBNET_ERR_WARNING
 

Definition at line 81 of file libnet-macros.h.

#define PR16   LIBNET_PR16
 

Definition at line 57 of file libnet-macros.h.

#define PR2   LIBNET_PR2
 

Definition at line 55 of file libnet-macros.h.

#define PR32   LIBNET_PR32
 

Definition at line 59 of file libnet-macros.h.

#define PR8   LIBNET_PR8
 

Definition at line 56 of file libnet-macros.h.

#define PRAND_MAX   LIBNET_PRAND_MAX
 

Definition at line 61 of file libnet-macros.h.

#define PRu16   LIBNET_PRu16
 

Definition at line 58 of file libnet-macros.h.

#define PRu32   LIBNET_PRu32
 

Definition at line 60 of file libnet-macros.h.

#define UNFIX  )     (n)
 

Definition at line 97 of file libnet-macros.h.


Generated on Sun May 14 14:51:27 2006 by  doxygen 1.4.2