Annotation of embedaddon/libnet/doc/man/man3/libnet-macros.h.3, revision 1.1.1.2

1.1.1.2 ! misho       1: .TH "libnet-macros.h" 3 "Thu Mar 29 2012" "Version 1.1" "libnet" \" -*- nroff -*-
1.1       misho       2: .ad l
                      3: .nh
                      4: .SH NAME
1.1.1.2 ! misho       5: libnet-macros.h \- 
        !             6: .PP
        !             7: libnet macros and symbolic constants  
1.1       misho       8: 
                      9: .SH SYNOPSIS
                     10: .br
                     11: .PP
                     12: .SS "Defines"
                     13: 
                     14: .in +1c
                     15: .ti -1c
                     16: .RI "#define \fBLIBNET_DONT_RESOLVE\fP   0"
                     17: .br
                     18: .ti -1c
                     19: .RI "#define \fBLIBNET_RESOLVE\fP   1"
                     20: .br
                     21: .ti -1c
                     22: .RI "#define \fBLIBNET_ON\fP   0"
                     23: .br
                     24: .ti -1c
                     25: .RI "#define \fBLIBNET_OFF\fP   1"
                     26: .br
                     27: .ti -1c
                     28: .RI "#define \fBIN6ADDR_ERROR_INIT\fP"
                     29: .br
                     30: .ti -1c
                     31: .RI "#define \fBLIBNET_PR2\fP   0"
                     32: .br
                     33: .ti -1c
                     34: .RI "#define \fBLIBNET_PR8\fP   1"
                     35: .br
                     36: .ti -1c
                     37: .RI "#define \fBLIBNET_PR16\fP   2"
                     38: .br
                     39: .ti -1c
                     40: .RI "#define \fBLIBNET_PRu16\fP   3"
                     41: .br
                     42: .ti -1c
                     43: .RI "#define \fBLIBNET_PR32\fP   4"
                     44: .br
                     45: .ti -1c
                     46: .RI "#define \fBLIBNET_PRu32\fP   5"
                     47: .br
                     48: .ti -1c
                     49: .RI "#define \fBLIBNET_PRAND_MAX\fP   0xffffffff"
                     50: .br
                     51: .ti -1c
                     52: .RI "#define \fBLIBNET_MAX_PACKET\fP   0xffff"
                     53: .br
                     54: .ti -1c
                     55: .RI "#define \fBIP_MAXPACKET\fP   0xffff"
                     56: .br
                     57: .ti -1c
                     58: .RI "#define \fBETHER_ADDR_LEN\fP   0x6"
                     59: .br
                     60: .ti -1c
                     61: .RI "#define \fBFDDI_ADDR_LEN\fP   0x6"
                     62: .br
                     63: .ti -1c
                     64: .RI "#define \fBTOKEN_RING_ADDR_LEN\fP   0x6"
                     65: .br
                     66: .ti -1c
                     67: .RI "#define \fBLIBNET_ORG_CODE_SIZE\fP   0x3"
                     68: .br
                     69: .ti -1c
                     70: .RI "#define \fBLIBNET_ERRBUF_SIZE\fP   0x100"
                     71: .br
                     72: .ti -1c
                     73: .RI "#define \fBLIBNET_MAXOPTION_SIZE\fP   0x28"
                     74: .br
                     75: .ti -1c
                     76: .RI "#define \fBFIX\fP(n)   (n)"
                     77: .br
                     78: .ti -1c
                     79: .RI "#define \fBUNFIX\fP(n)   (n)"
                     80: .br
                     81: .ti -1c
1.1.1.2 ! misho      82: .RI "#define \fBLIBNET_DO_PAYLOAD\fP(l, p)"
        !            83: .br
        !            84: .ti -1c
1.1       misho      85: .RI "#define \fBLIBNET_CKSUM_CARRY\fP(x)   (x = (x >> 16) + (x & 0xffff), (~(x + (x >> 16)) & 0xffff))"
                     86: .br
                     87: .ti -1c
1.1.1.2 ! misho      88: .RI "#define \fBLIBNET_OSPF_AUTHCPY\fP(x, y)   memcpy((uint8_t *)x, (uint8_t *)y, sizeof(y))"
1.1       misho      89: .br
                     90: .ti -1c
1.1.1.2 ! misho      91: .RI "#define \fBLIBNET_OSPF_CKSUMBUF\fP(x, y)   memcpy((uint8_t *)x, (uint8_t *)y, sizeof(y))"
1.1       misho      92: .br
                     93: .ti -1c
1.1.1.2 ! misho      94: .RI "#define \fBLIBNET_NTP_DO_LI_VN_MODE\fP(li, vn, md)   ((uint8_t)((((li) << 6) & 0xc0) | (((vn) << 3) & 0x38) | ((md) & 0x7)))"
1.1       misho      95: .br
                     96: .ti -1c
1.1.1.2 ! misho      97: .RI "#define \fBLIBNET_ISLOOPBACK\fP(p)   (strcmp((p)->ifr_name, 'lo') == 0)"
1.1       misho      98: .br
                     99: .ti -1c
                    100: .RI "#define \fBLIBNET_ISADVMODE\fP(x)   (x & 0x08)"
                    101: .br
                    102: .ti -1c
                    103: .RI "#define \fBLIBNET_LABEL_SIZE\fP   64"
                    104: .br
                    105: .ti -1c
                    106: .RI "#define \fBLIBNET_LABEL_DEFAULT\fP   'cardshark'"
                    107: .br
                    108: .ti -1c
                    109: .RI "#define \fBCQ_LOCK_UNLOCKED\fP   (u_int)0x00000000"
                    110: .br
                    111: .ti -1c
                    112: .RI "#define \fBCQ_LOCK_READ\fP   (u_int)0x00000001"
                    113: .br
                    114: .ti -1c
                    115: .RI "#define \fBCQ_LOCK_WRITE\fP   (u_int)0x00000002"
                    116: .br
                    117: .ti -1c
                    118: .RI "#define \fBfor_each_context_in_cq\fP(l)   for (l = libnet_cq_head(); libnet_cq_last(); l = libnet_cq_next())"
                    119: .br
                    120: .ti -1c
                    121: .RI "#define \fBcq_is_wlocked\fP()   (l_cqd.cq_lock & CQ_LOCK_WRITE)"
                    122: .br
                    123: .ti -1c
                    124: .RI "#define \fBcq_is_rlocked\fP()   (l_cqd.cq_lock & CQ_LOCK_READ)"
                    125: .br
                    126: .ti -1c
                    127: .RI "#define \fBcq_is_locked\fP()   (l_cqd.cq_lock & (CQ_LOCK_READ | CQ_LOCK_WRITE))"
                    128: .br
                    129: .ti -1c
                    130: .RI "#define \fBcheck_cq_lock\fP(x)   (l_cqd.cq_lock & x)"
                    131: .br
                    132: .in -1c
                    133: .SH "Detailed Description"
                    134: .PP 
1.1.1.2 ! misho     135: libnet macros and symbolic constants 
1.1       misho     136: 
                    137: 
                    138: .SH "Define Documentation"
                    139: .PP 
1.1.1.2 ! misho     140: .SS "#define for_each_context_in_cq(l)   for (l = libnet_cq_head(); libnet_cq_last(); l = libnet_cq_next())"Provides an interface to iterate through the context queue of libnet contexts. Before calling this macro, be sure to set the queue using \fBlibnet_cq_head()\fP. 
        !           141: .SS "#define IN6ADDR_ERROR_INIT"\fBValue:\fP
1.1       misho     142: .PP
1.1.1.2 ! misho     143: .nf
1.1       misho     144: { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
                    145:                                  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
                    146:                                  0xff, 0xff } } }
                    147: .fi
                    148: IPv6 error code 
1.1.1.2 ! misho     149: .SS "#define LIBNET_DO_PAYLOAD(l, p)"\fBValue:\fP
1.1       misho     150: .PP
1.1.1.2 ! misho     151: .nf
        !           152: if (payload_s && !payload)                                                   \
        !           153: {                                                                            \
        !           154:     snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,                                 \
        !           155:             '%s(): payload inconsistency\n', __func__);                      \
        !           156:     goto bad;                                                                \
        !           157: }                                                                            \
        !           158: if (payload_s)                                                               \
        !           159: {                                                                            \
        !           160:     n = libnet_pblock_append(l, p, payload, payload_s);                      \
        !           161:     if (n == (uint32_t) - 1)                                                 \
        !           162:     {                                                                        \
        !           163:         goto bad;                                                            \
        !           164:     }                                                                        \
        !           165: }                                                                            \
        !           166: .fi
        !           167: .SS "#define LIBNET_DONT_RESOLVE   0"Used for libnet's name resolution functions, specifies that no DNS lookups should be performed and the IP address should be kept in numeric form. 
        !           168: .SS "#define LIBNET_ERRBUF_SIZE   0x100"The libnet error buffer is 256 bytes long. 
        !           169: .SS "#define LIBNET_MAX_PACKET   0xffff"The biggest an IP packet can be -- 65,535 bytes. 
        !           170: .SS "#define LIBNET_MAXOPTION_SIZE   0x28"IP and TCP options can be up to 40 bytes long. 
        !           171: .SS "#define LIBNET_OFF   1"Used several places, to specify 'on' or 'one' 
        !           172: .SS "#define LIBNET_ON   0"Used several places, to specify 'on' or 'one' 
        !           173: .SS "#define LIBNET_PR2   0"Used for \fBlibnet_get_prand()\fP to specify function disposition 
        !           174: .SS "#define LIBNET_RESOLVE   1"Used for libnet's name resolution functions, specifies that a DNS lookup can be performed if needed to resolve the IP address to a canonical form. 
1.1       misho     175: .SH "Author"
                    176: .PP 
                    177: Generated automatically by Doxygen for libnet from the source code.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>