Current Path : /usr/local/share/doc/libnet11/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/local/share/doc/libnet11/libnet-macros_8h.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>libnet: libnet-macros.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div> <h1>libnet-macros.h File Reference</h1>libnet macros and symbloc constants <a href="#_details">More...</a> <p> <p> <a href="libnet-macros_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a0">LIBNET_DONT_RESOLVE</a> 0</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a1">LIBNET_RESOLVE</a> 1</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a2">LIBNET_ON</a> 0</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a3">LIBNET_OFF</a> 1</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a4">IN6ADDR_ERROR_INIT</a></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a5">LIBNET_PR2</a> 0</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a6" doxytag="libnet-macros.h::LIBNET_PR8" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_PR8</b> 1</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a7" doxytag="libnet-macros.h::LIBNET_PR16" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_PR16</b> 2</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a8" doxytag="libnet-macros.h::LIBNET_PRu16" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_PRu16</b> 3</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a9" doxytag="libnet-macros.h::LIBNET_PR32" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_PR32</b> 4</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a10" doxytag="libnet-macros.h::LIBNET_PRu32" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_PRu32</b> 5</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a11" doxytag="libnet-macros.h::LIBNET_PRAND_MAX" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_PRAND_MAX</b> 0xffffffff</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a12">LIBNET_MAX_PACKET</a> 0xffff</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a13" doxytag="libnet-macros.h::IP_MAXPACKET" ></a> #define </td><td class="memItemRight" valign=bottom><b>IP_MAXPACKET</b> 0xffff</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a14" doxytag="libnet-macros.h::ETHER_ADDR_LEN" ></a> #define </td><td class="memItemRight" valign=bottom><b>ETHER_ADDR_LEN</b> 0x6</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a15" doxytag="libnet-macros.h::FDDI_ADDR_LEN" ></a> #define </td><td class="memItemRight" valign=bottom><b>FDDI_ADDR_LEN</b> 0x6</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a16" doxytag="libnet-macros.h::TOKEN_RING_ADDR_LEN" ></a> #define </td><td class="memItemRight" valign=bottom><b>TOKEN_RING_ADDR_LEN</b> 0x6</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a17" doxytag="libnet-macros.h::LIBNET_ORG_CODE_SIZE" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_ORG_CODE_SIZE</b> 0x3</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a18">LIBNET_ERRBUF_SIZE</a> 0x100</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a19">LIBNET_MAXOPTION_SIZE</a> 0x28</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a20" doxytag="libnet-macros.h::FIX" ></a> #define </td><td class="memItemRight" valign=bottom><b>FIX</b>(n) (n)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a21" doxytag="libnet-macros.h::UNFIX" ></a> #define </td><td class="memItemRight" valign=bottom><b>UNFIX</b>(n) (n)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a22" doxytag="libnet-macros.h::LIBNET_CKSUM_CARRY" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_CKSUM_CARRY</b>(x) (x = (x >> 16) + (x & 0xffff), (~(x + (x >> 16)) & 0xffff))</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a23" doxytag="libnet-macros.h::LIBNET_OSPF_AUTHCPY" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_OSPF_AUTHCPY</b>(x, y) memcpy((u_int8_t *)x, (u_int8_t *)y, sizeof(y))</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a24" doxytag="libnet-macros.h::LIBNET_OSPF_CKSUMBUF" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_OSPF_CKSUMBUF</b>(x, y) memcpy((u_int8_t *)x, (u_int8_t *)y, sizeof(y))</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a25" doxytag="libnet-macros.h::LIBNET_NTP_DO_LI_VN_MODE" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_NTP_DO_LI_VN_MODE</b>(li, vn, md) ((u_int8_t)((((li) << 6) & 0xc0) | (((vn) << 3) & 0x38) | ((md) & 0x7)))</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a26" doxytag="libnet-macros.h::LIBNET_ISLOOPBACK" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_ISLOOPBACK</b>(p) (strcmp((p)->ifr_name, "lo0") == 0)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a27" doxytag="libnet-macros.h::LIBNET_ISADVMODE" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_ISADVMODE</b>(x) (x & 0x08)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a28" doxytag="libnet-macros.h::LIBNET_LABEL_SIZE" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_LABEL_SIZE</b> 64</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a29" doxytag="libnet-macros.h::LIBNET_LABEL_DEFAULT" ></a> #define </td><td class="memItemRight" valign=bottom><b>LIBNET_LABEL_DEFAULT</b> "cardshark"</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a30" doxytag="libnet-macros.h::CQ_LOCK_UNLOCKED" ></a> #define </td><td class="memItemRight" valign=bottom><b>CQ_LOCK_UNLOCKED</b> (u_int)0x00000000</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a31" doxytag="libnet-macros.h::CQ_LOCK_READ" ></a> #define </td><td class="memItemRight" valign=bottom><b>CQ_LOCK_READ</b> (u_int)0x00000001</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a32" doxytag="libnet-macros.h::CQ_LOCK_WRITE" ></a> #define </td><td class="memItemRight" valign=bottom><b>CQ_LOCK_WRITE</b> (u_int)0x00000002</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="libnet-macros_8h.html#a33">for_each_context_in_cq</a>(l) for (l = libnet_cq_head(); libnet_cq_last(); l = libnet_cq_next())</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a34" doxytag="libnet-macros.h::cq_is_wlocked" ></a> #define </td><td class="memItemRight" valign=bottom><b>cq_is_wlocked</b>() (l_cqd.cq_lock & CQ_LOCK_WRITE)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a35" doxytag="libnet-macros.h::cq_is_rlocked" ></a> #define </td><td class="memItemRight" valign=bottom><b>cq_is_rlocked</b>() (l_cqd.cq_lock & CQ_LOCK_READ)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a36" doxytag="libnet-macros.h::cq_is_locked" ></a> #define </td><td class="memItemRight" valign=bottom><b>cq_is_locked</b>() (l_cqd.cq_lock & (CQ_LOCK_READ | CQ_LOCK_WRITE))</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a37" doxytag="libnet-macros.h::check_cq_lock" ></a> #define </td><td class="memItemRight" valign=bottom><b>check_cq_lock</b>(x) (l_cqd.cq_lock & x)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> libnet macros and symbloc constants <p> <hr><h2>Define Documentation</h2> <a class="anchor" name="a33" doxytag="libnet-macros.h::for_each_context_in_cq" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define for_each_context_in_cq</td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">l </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> for (l = libnet_cq_head(); libnet_cq_last(); l = libnet_cq_next()) </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Provides an interface to iterate through the context queue of libnet contexts. Before calling this macro, be sure to set the queue using <a class="el" href="libnet-functions_8h.html#a108">libnet_cq_head()</a>. </td> </tr> </table> <a class="anchor" name="a4" doxytag="libnet-macros.h::IN6ADDR_ERROR_INIT" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define IN6ADDR_ERROR_INIT </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <b>Value:</b><div class="fragment"><pre>{ { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff } } } </pre></div>IPv6 error code </td> </tr> </table> <a class="anchor" name="a0" doxytag="libnet-macros.h::LIBNET_DONT_RESOLVE" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_DONT_RESOLVE 0 </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> 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. </td> </tr> </table> <a class="anchor" name="a18" doxytag="libnet-macros.h::LIBNET_ERRBUF_SIZE" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_ERRBUF_SIZE 0x100 </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> The libnet error buffer is 256 bytes long. </td> </tr> </table> <a class="anchor" name="a12" doxytag="libnet-macros.h::LIBNET_MAX_PACKET" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_MAX_PACKET 0xffff </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> The biggest an IP packet can be -- 65,535 bytes. </td> </tr> </table> <a class="anchor" name="a19" doxytag="libnet-macros.h::LIBNET_MAXOPTION_SIZE" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_MAXOPTION_SIZE 0x28 </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> IP and TCP options can be up to 40 bytes long. </td> </tr> </table> <a class="anchor" name="a3" doxytag="libnet-macros.h::LIBNET_OFF" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_OFF 1 </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Used several places, to specify "on" or "one" </td> </tr> </table> <a class="anchor" name="a2" doxytag="libnet-macros.h::LIBNET_ON" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_ON 0 </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Used several places, to specify "on" or "one" </td> </tr> </table> <a class="anchor" name="a5" doxytag="libnet-macros.h::LIBNET_PR2" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_PR2 0 </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Used for <a class="el" href="libnet-functions_8h.html#a12">libnet_get_prand()</a> to specify function disposition </td> </tr> </table> <a class="anchor" name="a1" doxytag="libnet-macros.h::LIBNET_RESOLVE" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define LIBNET_RESOLVE 1 </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> 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. </td> </tr> </table> <hr size="1"><address style="align: right;"><small>Generated on Wed Mar 10 13:23:38 2004 for libnet by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> </body> </html>