<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libnet: libnet-functions.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">libnet <span id="projectnumber">1.1</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">libnet-functions.h</div> </div>
</div>
<div class="contents">
<a href="libnet-functions_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * $Id: libnet-functions_8h_source.html,v 1.1.1.1 2013/07/22 11:54:41 misho Exp $</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * libnet-functions.h - function prototypes</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com></span>
<a name="l00007"></a>00007 <span class="comment"> * All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00010"></a>00010 <span class="comment"> * modification, are permitted provided that the following conditions</span>
<a name="l00011"></a>00011 <span class="comment"> * are met:</span>
<a name="l00012"></a>00012 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
<a name="l00013"></a>00013 <span class="comment"> * notice, this list of conditions and the following disclaimer.</span>
<a name="l00014"></a>00014 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
<a name="l00015"></a>00015 <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span>
<a name="l00016"></a>00016 <span class="comment"> * documentation and/or other materials provided with the distribution.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND</span>
<a name="l00019"></a>00019 <span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<a name="l00020"></a>00020 <span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>
<a name="l00021"></a>00021 <span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE</span>
<a name="l00022"></a>00022 <span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span>
<a name="l00023"></a>00023 <span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span>
<a name="l00024"></a>00024 <span class="comment"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span>
<a name="l00025"></a>00025 <span class="comment"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span>
<a name="l00026"></a>00026 <span class="comment"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span>
<a name="l00027"></a>00027 <span class="comment"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</span>
<a name="l00028"></a>00028 <span class="comment"> * SUCH DAMAGE.</span>
<a name="l00029"></a>00029 <span class="comment"> *</span>
<a name="l00030"></a>00030 <span class="comment"> */</span>
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef __LIBNET_FUNCTIONS_H</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define __LIBNET_FUNCTIONS_H</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00063"></a>00063 libnet_t *
<a name="l00064"></a>00064 <a class="code" href="libnet-functions_8h.html#a0422723053baf0b254d1ba2215d88118">libnet_init</a>(<span class="keywordtype">int</span> injection_type, <span class="keyword">const</span> <span class="keywordtype">char</span> *device, <span class="keywordtype">char</span> *err_buf);
<a name="l00065"></a>00065
<a name="l00071"></a>00071 <span class="keywordtype">void</span>
<a name="l00072"></a>00072 <a class="code" href="libnet-functions_8h.html#a591804711cffa92582703a5aedbd9b25">libnet_destroy</a>(libnet_t *l);
<a name="l00073"></a>00073
<a name="l00080"></a>00080 <span class="keywordtype">void</span>
<a name="l00081"></a>00081 <a class="code" href="libnet-functions_8h.html#ab84889f7fe57a1801cf03eceac47463e">libnet_clear_packet</a>(libnet_t *l);
<a name="l00082"></a>00082
<a name="l00089"></a>00089 <span class="keywordtype">void</span>
<a name="l00090"></a>00090 <a class="code" href="libnet-functions_8h.html#a886dc359d6add4b0608e8611af7e1b35">libnet_stats</a>(libnet_t *l, <span class="keyword">struct</span> <a class="code" href="libnet-functions_8h.html#a886dc359d6add4b0608e8611af7e1b35">libnet_stats</a> *ls);
<a name="l00091"></a>00091
<a name="l00097"></a>00097 <span class="keywordtype">int</span>
<a name="l00098"></a>00098 <a class="code" href="libnet-functions_8h.html#ab9b137f454b3da05d4ac5fe388c1f2b8">libnet_getfd</a>(libnet_t *l);
<a name="l00099"></a>00099
<a name="l00106"></a>00106 <span class="keyword">const</span> <span class="keywordtype">char</span> *
<a name="l00107"></a>00107 <a class="code" href="libnet-functions_8h.html#a1e68365ece2c976a75bc50e91df40ea0">libnet_getdevice</a>(libnet_t *l);
<a name="l00108"></a>00108
<a name="l00117"></a>00117 uint8_t *
<a name="l00118"></a>00118 <a class="code" href="libnet-functions_8h.html#a37ac07877d74f4dad59b86a15f5318d8">libnet_getpbuf</a>(libnet_t *l, libnet_ptag_t ptag);
<a name="l00119"></a>00119
<a name="l00128"></a>00128 uint32_t
<a name="l00129"></a>00129 <a class="code" href="libnet-functions_8h.html#a23ada8f4ab826966aeaf4ab070f3298e">libnet_getpbuf_size</a>(libnet_t *l, libnet_ptag_t ptag);
<a name="l00130"></a>00130
<a name="l00138"></a>00138 <span class="keywordtype">char</span> *
<a name="l00139"></a>00139 <a class="code" href="libnet-functions_8h.html#a36c0b24a4926a8f5d9d392836e915f2e">libnet_geterror</a>(libnet_t *l);
<a name="l00140"></a>00140
<a name="l00147"></a>00147 uint32_t
<a name="l00148"></a>00148 <a class="code" href="libnet-functions_8h.html#a2a500c6b60a329d873a970ecda4ff6e9">libnet_getpacket_size</a>(libnet_t *l);
<a name="l00149"></a>00149
<a name="l00155"></a>00155 <span class="keywordtype">int</span>
<a name="l00156"></a>00156 <a class="code" href="libnet-functions_8h.html#a69470998be995ec8c5e11ecbb19137f5">libnet_seed_prand</a>(libnet_t *l);
<a name="l00157"></a>00157
<a name="l00171"></a>00171 uint32_t
<a name="l00172"></a>00172 <a class="code" href="libnet-functions_8h.html#ab74bd339ef6343077dc79bab2063aee3">libnet_get_prand</a>(<span class="keywordtype">int</span> mod);
<a name="l00173"></a>00173
<a name="l00195"></a>00195 <span class="keywordtype">int</span>
<a name="l00196"></a>00196 <a class="code" href="libnet-functions_8h.html#ad36144707ce7994c12ef9d87dc9a2edf">libnet_toggle_checksum</a>(libnet_t *l, libnet_ptag_t ptag, <span class="keywordtype">int</span> mode);
<a name="l00197"></a>00197
<a name="l00210"></a>00210 <span class="keywordtype">char</span> *
<a name="l00211"></a>00211 <a class="code" href="libnet-functions_8h.html#af6b11f82cfc7982bd0b21a6d4a857d1a">libnet_addr2name4</a>(uint32_t in, uint8_t use_name);
<a name="l00212"></a>00212
<a name="l00226"></a>00226 uint32_t
<a name="l00227"></a>00227 <a class="code" href="libnet-functions_8h.html#a05a7f3f901c57be5aebfbd8b79416de9">libnet_name2addr4</a>(libnet_t *l, <span class="keywordtype">char</span> *host_name, uint8_t use_name);
<a name="l00228"></a>00228
<a name="l00229"></a>00229 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keyword">struct </span>libnet_in6_addr in6addr_error;
<a name="l00230"></a>00230
<a name="l00236"></a>00236 <span class="keywordtype">int</span>
<a name="l00237"></a>00237 <a class="code" href="libnet-functions_8h.html#a917ef012eab1449bba7a0fd33438b292">libnet_in6_is_error</a>(<span class="keyword">struct</span> libnet_in6_addr addr);
<a name="l00238"></a>00238
<a name="l00252"></a>00252 <span class="keyword">struct </span>libnet_in6_addr
<a name="l00253"></a>00253 <a class="code" href="libnet-functions_8h.html#a69a216eb71e3309c787bd00507148d15">libnet_name2addr6</a>(libnet_t *l, <span class="keyword">const</span> <span class="keywordtype">char</span> *host_name, uint8_t use_name);
<a name="l00254"></a>00254
<a name="l00258"></a>00258 <span class="keywordtype">void</span>
<a name="l00259"></a>00259 <a class="code" href="libnet-functions_8h.html#a5b7581c7b75c7ecd3e4220c72752efd4">libnet_addr2name6_r</a>(<span class="keyword">struct</span> libnet_in6_addr addr, uint8_t use_name,
<a name="l00260"></a>00260 <span class="keywordtype">char</span> *host_name, <span class="keywordtype">int</span> host_name_len);
<a name="l00261"></a>00261
<a name="l00277"></a>00277 <span class="keywordtype">int</span>
<a name="l00278"></a>00278 <a class="code" href="libnet-functions_8h.html#aaee8e5f54482bf3c9b7c5b101fa8f41f">libnet_plist_chain_new</a>(libnet_t *l, libnet_plist_t **plist, <span class="keywordtype">char</span> *token_list);
<a name="l00279"></a>00279
<a name="l00291"></a>00291 <span class="keywordtype">int</span>
<a name="l00292"></a>00292 <a class="code" href="libnet-functions_8h.html#aa4f1d2acd6b7411d3bf2be73cb617cb2">libnet_plist_chain_next_pair</a>(libnet_plist_t *plist, uint16_t *bport,
<a name="l00293"></a>00293 uint16_t *eport);
<a name="l00294"></a>00294
<a name="l00301"></a>00301 <span class="keywordtype">int</span>
<a name="l00302"></a>00302 <a class="code" href="libnet-functions_8h.html#a39e332daa771627372a01867818b4301">libnet_plist_chain_dump</a>(libnet_plist_t *plist);
<a name="l00303"></a>00303
<a name="l00312"></a>00312 <span class="keywordtype">char</span> *
<a name="l00313"></a>00313 <a class="code" href="libnet-functions_8h.html#ab854695d1306f9af440145fc6767d953">libnet_plist_chain_dump_string</a>(libnet_plist_t *plist);
<a name="l00314"></a>00314
<a name="l00320"></a>00320 <span class="keywordtype">int</span>
<a name="l00321"></a>00321 <a class="code" href="libnet-functions_8h.html#ab5cb1d70164207a7c279a909576058be">libnet_plist_chain_free</a>(libnet_plist_t *plist);
<a name="l00322"></a>00322
<a name="l00410"></a>00410 libnet_ptag_t
<a name="l00411"></a>00411 <a class="code" href="libnet-functions_8h.html#a0fdc98930697ff63e2938efd4082cc16">libnet_build_802_1q</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint16_t tpi,
<a name="l00412"></a>00412 uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto,
<a name="l00413"></a>00413 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00414"></a>00414
<a name="l00426"></a>00426 libnet_ptag_t
<a name="l00427"></a>00427 <a class="code" href="libnet-functions_8h.html#a9c6bae7032a3e32b70f9480f9a30a1ad">libnet_build_802_1x</a>(uint8_t eap_ver, uint8_t eap_type, uint16_t length,
<a name="l00428"></a>00428 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00429"></a>00429
<a name="l00441"></a>00441 libnet_ptag_t
<a name="l00442"></a>00442 <a class="code" href="libnet-functions_8h.html#a83c65a0bc641803572115f9f290f39fa">libnet_build_802_2</a>(uint8_t dsap, uint8_t ssap, uint8_t control,
<a name="l00443"></a>00443 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00444"></a>00444
<a name="l00458"></a>00458 libnet_ptag_t
<a name="l00459"></a>00459 <a class="code" href="libnet-functions_8h.html#a0780d8317f3bd7a5e4a2ed10abdbe39b">libnet_build_802_2snap</a>(uint8_t dsap, uint8_t ssap, uint8_t control,
<a name="l00460"></a>00460 uint8_t *oui, uint16_t type, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l00461"></a>00461 libnet_t *l, libnet_ptag_t ptag);
<a name="l00462"></a>00462
<a name="l00478"></a>00478 libnet_ptag_t
<a name="l00479"></a>00479 <a class="code" href="libnet-functions_8h.html#a5a200d8b8b3b2a64921db960e8b0da60">libnet_build_802_3</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint16_t len,
<a name="l00480"></a>00480 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00481"></a>00481
<a name="l00497"></a>00497 libnet_ptag_t
<a name="l00498"></a>00498 <a class="code" href="libnet-functions_8h.html#ac0e53234dfc5205142b0f53c69ab46ae">libnet_build_ethernet</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint16_t type,
<a name="l00499"></a>00499 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00500"></a>00500
<a name="l00512"></a>00512 libnet_ptag_t
<a name="l00513"></a>00513 <a class="code" href="libnet-functions_8h.html#acd0747f212c04efd2a4dcb947a3db40b">libnet_autobuild_ethernet</a>(<span class="keyword">const</span> uint8_t *dst, uint16_t type, libnet_t *l);
<a name="l00514"></a>00514
<a name="l00531"></a>00531 libnet_ptag_t
<a name="l00532"></a>00532 <a class="code" href="libnet-functions_8h.html#af313dd4a88c8bb42f023637aec5d7abf">libnet_build_fddi</a>(uint8_t fc, <span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint8_t dsap,
<a name="l00533"></a>00533 uint8_t ssap, uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type, <span class="keyword">const</span> uint8_t* payload,
<a name="l00534"></a>00534 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00535"></a>00535
<a name="l00548"></a>00548 libnet_ptag_t
<a name="l00549"></a>00549 <a class="code" href="libnet-functions_8h.html#a071f9dc69d6992e2c164ed3827f79cc1">libnet_autobuild_fddi</a>(uint8_t fc, <span class="keyword">const</span> uint8_t *dst, uint8_t dsap, uint8_t ssap,
<a name="l00550"></a>00550 uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type, libnet_t *l);
<a name="l00551"></a>00551
<a name="l00571"></a>00571 libnet_ptag_t
<a name="l00572"></a>00572 <a class="code" href="libnet-functions_8h.html#ac81464e42636bc0b9e4800bcf135da57">libnet_build_arp</a>(uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln,
<a name="l00573"></a>00573 uint16_t op, <span class="keyword">const</span> uint8_t *sha, <span class="keyword">const</span> uint8_t *spa, <span class="keyword">const</span> uint8_t *tha, <span class="keyword">const</span> uint8_t *tpa,
<a name="l00574"></a>00574 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00575"></a>00575
<a name="l00588"></a>00588 libnet_ptag_t
<a name="l00589"></a>00589 <a class="code" href="libnet-functions_8h.html#a11bb29bc300b46b1a59009b9e66b6dee">libnet_autobuild_arp</a>(uint16_t op, <span class="keyword">const</span> uint8_t *sha, <span class="keyword">const</span> uint8_t *spa, <span class="keyword">const</span> uint8_t *tha,
<a name="l00590"></a>00590 uint8_t *tpa, libnet_t *l);
<a name="l00591"></a>00591
<a name="l00609"></a>00609 libnet_ptag_t
<a name="l00610"></a>00610 <a class="code" href="libnet-functions_8h.html#a729cfdedc3e59a3152c99c914d66ec6f">libnet_build_tcp</a>(uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack,
<a name="l00611"></a>00611 uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len,
<a name="l00612"></a>00612 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00613"></a>00613
<a name="l00629"></a>00629 libnet_ptag_t
<a name="l00630"></a>00630 <a class="code" href="libnet-functions_8h.html#a11d0bd23cb198f3e940336b62a94839a">libnet_build_tcp_options</a>(<span class="keyword">const</span> uint8_t *options, uint32_t options_s, libnet_t *l,
<a name="l00631"></a>00631 libnet_ptag_t ptag);
<a name="l00632"></a>00632
<a name="l00645"></a>00645 libnet_ptag_t
<a name="l00646"></a>00646 <a class="code" href="libnet-functions_8h.html#a1dee17aa5276df3587ee276b1b90d8fa">libnet_build_udp</a>(uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum,
<a name="l00647"></a>00647 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00648"></a>00648
<a name="l00668"></a>00668 libnet_ptag_t
<a name="l00669"></a>00669 <a class="code" href="libnet-functions_8h.html#a0549535c9d15498e169bc5b96bc9c946">libnet_build_cdp</a>(uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type,
<a name="l00670"></a>00670 uint16_t value_s, <span class="keyword">const</span> uint8_t *value, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l00671"></a>00671 libnet_t *l, libnet_ptag_t ptag);
<a name="l00672"></a>00672
<a name="l00687"></a>00687 libnet_ptag_t
<a name="l00688"></a>00688 <a class="code" href="libnet-functions_8h.html#af2a31d44e931c774bfc50a8a8d0a71af">libnet_build_icmpv4_echo</a>(uint8_t type, uint8_t code, uint16_t sum,
<a name="l00689"></a>00689 uint16_t <span class="keywordtype">id</span>, uint16_t seq, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l00690"></a>00690 libnet_t *l, libnet_ptag_t ptag);
<a name="l00691"></a>00691
<a name="l00707"></a>00707 libnet_ptag_t
<a name="l00708"></a>00708 <a class="code" href="libnet-functions_8h.html#a6cff4ee3328d18a02de3ffa467b4a783">libnet_build_icmpv4_mask</a>(uint8_t type, uint8_t code, uint16_t sum,
<a name="l00709"></a>00709 uint16_t <span class="keywordtype">id</span>, uint16_t seq, uint32_t mask, <span class="keyword">const</span> uint8_t* payload,
<a name="l00710"></a>00710 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00711"></a>00711
<a name="l00725"></a>00725 libnet_ptag_t
<a name="l00726"></a>00726 <a class="code" href="libnet-functions_8h.html#aeb4d9c27fe201737ba139dde6c5c0f2e">libnet_build_icmpv4_unreach</a>(uint8_t type, uint8_t code, uint16_t sum,
<a name="l00727"></a>00727 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00728"></a>00728
<a name="l00743"></a>00743 libnet_ptag_t
<a name="l00744"></a>00744 <a class="code" href="libnet-functions_8h.html#a80e6e045aa6e2b249294112171129b28">libnet_build_icmpv4_redirect</a>(uint8_t type, uint8_t code, uint16_t sum,
<a name="l00745"></a>00745 uint32_t gateway, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l00746"></a>00746 libnet_ptag_t ptag);
<a name="l00747"></a>00747
<a name="l00762"></a>00762 libnet_ptag_t
<a name="l00763"></a>00763 <a class="code" href="libnet-functions_8h.html#a9f4204ece5d336ef11e777c2d5e50186">libnet_build_icmpv4_timeexceed</a>(uint8_t type, uint8_t code, uint16_t sum,
<a name="l00764"></a>00764 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00765"></a>00765
<a name="l00783"></a>00783 libnet_ptag_t
<a name="l00784"></a>00784 <a class="code" href="libnet-functions_8h.html#a68d0c6a2b394b15e9064e404842a1989">libnet_build_icmpv4_timestamp</a>(uint8_t type, uint8_t code, uint16_t sum,
<a name="l00785"></a>00785 uint16_t <span class="keywordtype">id</span>, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime,
<a name="l00786"></a>00786 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00787"></a>00787
<a name="l00802"></a>00802 libnet_ptag_t <a class="code" href="libnet-functions_8h.html#ab25c002229189641d723847c6fd06f5a">libnet_build_icmpv6_echo</a>(uint8_t type, uint8_t code, uint16_t
<a name="l00803"></a>00803 sum, uint16_t <span class="keywordtype">id</span>, uint16_t seq, uint8_t *payload, uint32_t payload_s,
<a name="l00804"></a>00804 libnet_t *l, libnet_ptag_t ptag);
<a name="l00805"></a>00805
<a name="l00819"></a>00819 libnet_ptag_t
<a name="l00820"></a>00820 <a class="code" href="libnet-functions_8h.html#a4e46b8ea4becc7fe4d10fc1af6a5aefa">libnet_build_icmpv6_unreach</a>(uint8_t type, uint8_t code, uint16_t sum,
<a name="l00821"></a>00821 uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00822"></a>00822
<a name="l00837"></a>00837 libnet_ptag_t <a class="code" href="libnet-functions_8h.html#a806d7200cc479b065f7a26d1057b4fcd">libnet_build_icmpv6_ndp_nsol</a>(uint8_t type, uint8_t code,
<a name="l00838"></a>00838 uint16_t sum, <span class="keyword">struct</span> libnet_in6_addr target, uint8_t *payload, uint32_t
<a name="l00839"></a>00839 payload_s, libnet_t* l, libnet_ptag_t ptag);
<a name="l00840"></a>00840
<a name="l00856"></a>00856 libnet_ptag_t <a class="code" href="libnet-functions_8h.html#a8351efc0261c66660b362e16a68f9001">libnet_build_icmpv6_ndp_nadv</a>(uint8_t type, uint8_t code,
<a name="l00857"></a>00857 uint16_t sum, uint32_t flags, <span class="keyword">struct</span> libnet_in6_addr target, uint8_t
<a name="l00858"></a>00858 *payload, uint32_t payload_s, libnet_t* l, libnet_ptag_t ptag);
<a name="l00859"></a>00859
<a name="l00869"></a>00869 libnet_ptag_t <a class="code" href="libnet-functions_8h.html#a0ac427a5e4fe8281724fd17619c0db12">libnet_build_icmpv6_ndp_opt</a>(uint8_t type, uint8_t* option,
<a name="l00870"></a>00870 uint32_t option_s, libnet_t* l, libnet_ptag_t ptag);
<a name="l00871"></a>00871
<a name="l00886"></a>00886 libnet_ptag_t
<a name="l00887"></a>00887 <a class="code" href="libnet-functions_8h.html#a66590b72b65d46bf15544327235edc66">libnet_build_igmp</a>(uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip,
<a name="l00888"></a>00888 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00889"></a>00889
<a name="l00909"></a>00909 libnet_ptag_t
<a name="l00910"></a>00910 <a class="code" href="libnet-functions_8h.html#a326cf29f24a37dc9232b8b6a56a3f12f">libnet_build_ipv4</a>(uint16_t ip_len, uint8_t tos, uint16_t <span class="keywordtype">id</span>, uint16_t frag,
<a name="l00911"></a>00911 uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst,
<a name="l00912"></a>00912 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00913"></a>00913
<a name="l00932"></a>00932 libnet_ptag_t
<a name="l00933"></a>00933 <a class="code" href="libnet-functions_8h.html#af1e1c66ed14370114d61ca919d558092">libnet_build_ipv4_options</a>(<span class="keyword">const</span> uint8_t *options, uint32_t options_s, libnet_t *l,
<a name="l00934"></a>00934 libnet_ptag_t ptag);
<a name="l00935"></a>00935
<a name="l00949"></a>00949 libnet_ptag_t
<a name="l00950"></a>00950 <a class="code" href="libnet-functions_8h.html#a17d44748537af9d97cbafe9c1040c7d3">libnet_autobuild_ipv4</a>(uint16_t len, uint8_t prot, uint32_t dst, libnet_t *l);
<a name="l00951"></a>00951
<a name="l00967"></a>00967 libnet_ptag_t
<a name="l00968"></a>00968 <a class="code" href="libnet-functions_8h.html#ae568214e9b386ca23e6628431eda1f7e">libnet_build_ipv6</a>(uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh,
<a name="l00969"></a>00969 uint8_t hl, <span class="keyword">struct</span> libnet_in6_addr src, <span class="keyword">struct</span> libnet_in6_addr dst,
<a name="l00970"></a>00970 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l00971"></a>00971
<a name="l00984"></a>00984 libnet_ptag_t
<a name="l00985"></a>00985 <a class="code" href="libnet-functions_8h.html#a16867e9f92b162ff4c00a5587fd3377d">libnet_build_ipv6_frag</a>(uint8_t nh, uint8_t reserved, uint16_t frag,
<a name="l00986"></a>00986 uint32_t <span class="keywordtype">id</span>, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l00987"></a>00987 libnet_ptag_t ptag);
<a name="l00988"></a>00988
<a name="l01006"></a>01006 libnet_ptag_t
<a name="l01007"></a>01007 <a class="code" href="libnet-functions_8h.html#a0aeda945e0b6d1ce4bee591107d8887b">libnet_build_ipv6_routing</a>(uint8_t nh, uint8_t len, uint8_t rtype,
<a name="l01008"></a>01008 uint8_t segments, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01009"></a>01009 libnet_ptag_t ptag);
<a name="l01010"></a>01010
<a name="l01024"></a>01024 libnet_ptag_t
<a name="l01025"></a>01025 <a class="code" href="libnet-functions_8h.html#a463971e2d708f4e14f2ed9bea7f197be">libnet_build_ipv6_destopts</a>(uint8_t nh, uint8_t len, <span class="keyword">const</span> uint8_t* payload,
<a name="l01026"></a>01026 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01027"></a>01027
<a name="l01042"></a>01042 libnet_ptag_t
<a name="l01043"></a>01043 <a class="code" href="libnet-functions_8h.html#accbcb7a6342997afd1a5410c7006f748">libnet_build_ipv6_hbhopts</a>(uint8_t nh, uint8_t len, <span class="keyword">const</span> uint8_t* payload,
<a name="l01044"></a>01044 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01045"></a>01045
<a name="l01062"></a>01062 libnet_ptag_t
<a name="l01063"></a>01063 <a class="code" href="libnet-functions_8h.html#a9af33cad0a1f688907c675fb577514dd">libnet_autobuild_ipv6</a>(uint16_t len, uint8_t nh, <span class="keyword">struct</span> libnet_in6_addr dst,
<a name="l01064"></a>01064 libnet_t *l, libnet_ptag_t ptag);
<a name="l01065"></a>01065
<a name="l01083"></a>01083 libnet_ptag_t
<a name="l01084"></a>01084 <a class="code" href="libnet-functions_8h.html#a8c3b2833b869c4628240bb5be8b7c864">libnet_build_isl</a>(uint8_t *dhost, uint8_t type, uint8_t user,
<a name="l01085"></a>01085 uint8_t *shost, uint16_t len, <span class="keyword">const</span> uint8_t *snap, uint16_t vid,
<a name="l01086"></a>01086 uint16_t portindex, uint16_t reserved, <span class="keyword">const</span> uint8_t* payload,
<a name="l01087"></a>01087 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01088"></a>01088
<a name="l01100"></a>01100 libnet_ptag_t
<a name="l01101"></a>01101 <a class="code" href="libnet-functions_8h.html#ad75f92207cb45587e18e898b344c7600">libnet_build_ipsec_esp_hdr</a>(uint32_t spi, uint32_t seq, uint32_t iv,
<a name="l01102"></a>01102 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01103"></a>01103
<a name="l01115"></a>01115 libnet_ptag_t
<a name="l01116"></a>01116 <a class="code" href="libnet-functions_8h.html#a277c0db9a61ea2d24b58b452df0edda0">libnet_build_ipsec_esp_ftr</a>(uint8_t len, uint8_t nh, int8_t *auth,
<a name="l01117"></a>01117 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01118"></a>01118
<a name="l01133"></a>01133 libnet_ptag_t
<a name="l01134"></a>01134 <a class="code" href="libnet-functions_8h.html#a9506a46bfe340f8284ae58656a02c574">libnet_build_ipsec_ah</a>(uint8_t nh, uint8_t len, uint16_t res,
<a name="l01135"></a>01135 uint32_t spi, uint32_t seq, uint32_t auth, <span class="keyword">const</span> uint8_t* payload,
<a name="l01136"></a>01136 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01137"></a>01137
<a name="l01154"></a>01154 libnet_ptag_t
<a name="l01155"></a>01155 <a class="code" href="libnet-functions_8h.html#a5b4d53861194f34da21ca87bcc158517">libnet_build_dnsv4</a>(uint16_t h_len, uint16_t <span class="keywordtype">id</span>, uint16_t flags,
<a name="l01156"></a>01156 uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr,
<a name="l01157"></a>01157 uint16_t num_addi_rr, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01158"></a>01158 libnet_ptag_t ptag);
<a name="l01159"></a>01159
<a name="l01177"></a>01177 libnet_ptag_t
<a name="l01178"></a>01178 <a class="code" href="libnet-functions_8h.html#ad8e0469edf11477ccc3fc0b9cb031d00">libnet_build_rip</a>(uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af,
<a name="l01179"></a>01179 uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop,
<a name="l01180"></a>01180 uint32_t metric, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01181"></a>01181 libnet_ptag_t ptag);
<a name="l01182"></a>01182
<a name="l01205"></a>01205 libnet_ptag_t
<a name="l01206"></a>01206 <a class="code" href="libnet-functions_8h.html#a7bc36e79f132c1b7ff449e9df2a459b7">libnet_build_rpc_call</a>(uint32_t rm, uint32_t xid, uint32_t prog_num,
<a name="l01207"></a>01207 uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength,
<a name="l01208"></a>01208 uint8_t *cdata, uint32_t vflavor, uint32_t vlength, <span class="keyword">const</span> uint8_t *vdata,
<a name="l01209"></a>01209 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01210"></a>01210
<a name="l01233"></a>01233 libnet_ptag_t
<a name="l01234"></a>01234 <a class="code" href="libnet-functions_8h.html#a5051a29044af5ac103f6604ef8d480e5">libnet_build_stp_conf</a>(uint16_t <span class="keywordtype">id</span>, uint8_t version, uint8_t bpdu_type,
<a name="l01235"></a>01235 uint8_t flags, <span class="keyword">const</span> uint8_t *root_id, uint32_t root_pc, <span class="keyword">const</span> uint8_t *bridge_id,
<a name="l01236"></a>01236 uint16_t port_id, uint16_t message_age, uint16_t max_age,
<a name="l01237"></a>01237 uint16_t hello_time, uint16_t f_delay, <span class="keyword">const</span> uint8_t* payload,
<a name="l01238"></a>01238 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01239"></a>01239
<a name="l01253"></a>01253 libnet_ptag_t
<a name="l01254"></a>01254 <a class="code" href="libnet-functions_8h.html#a20cda717c9254f73230b95f9eb808bc1">libnet_build_stp_tcn</a>(uint16_t <span class="keywordtype">id</span>, uint8_t version, uint8_t bpdu_type,
<a name="l01255"></a>01255 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01256"></a>01256
<a name="l01274"></a>01274 libnet_ptag_t
<a name="l01275"></a>01275 <a class="code" href="libnet-functions_8h.html#aed08f26e3bc9afd750a3b515a8d83526">libnet_build_token_ring</a>(uint8_t ac, uint8_t fc, <span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src,
<a name="l01276"></a>01276 uint8_t dsap, uint8_t ssap, uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type,
<a name="l01277"></a>01277 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01278"></a>01278
<a name="l01292"></a>01292 libnet_ptag_t
<a name="l01293"></a>01293 <a class="code" href="libnet-functions_8h.html#a4280cf3a4ffdff6d11c11dcd5f69f0d7">libnet_autobuild_token_ring</a>(uint8_t ac, uint8_t fc, <span class="keyword">const</span> uint8_t *dst,
<a name="l01294"></a>01294 uint8_t dsap, uint8_t ssap, uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type,
<a name="l01295"></a>01295 libnet_t *l);
<a name="l01296"></a>01296
<a name="l01316"></a>01316 libnet_ptag_t
<a name="l01317"></a>01317 <a class="code" href="libnet-functions_8h.html#a687daca40884d1125c4115ce215060f6">libnet_build_vrrp</a>(uint8_t version, uint8_t type, uint8_t vrouter_id,
<a name="l01318"></a>01318 uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int,
<a name="l01319"></a>01319 uint16_t sum, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01320"></a>01320 libnet_ptag_t ptag);
<a name="l01321"></a>01321
<a name="l01334"></a>01334 libnet_ptag_t
<a name="l01335"></a>01335 <a class="code" href="libnet-functions_8h.html#ada1854f38dd301252fc97c93084ac4eb">libnet_build_mpls</a>(uint32_t label, uint8_t experimental, uint8_t bos,
<a name="l01336"></a>01336 uint8_t ttl, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01337"></a>01337 libnet_ptag_t ptag);
<a name="l01338"></a>01338
<a name="l01366"></a>01366 libnet_ptag_t
<a name="l01367"></a>01367 <a class="code" href="libnet-functions_8h.html#a8a13581c5722c0ee77c2486465c10275">libnet_build_ntp</a>(uint8_t leap_indicator, uint8_t version, uint8_t mode,
<a name="l01368"></a>01368 uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int,
<a name="l01369"></a>01369 uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac,
<a name="l01370"></a>01370 uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac,
<a name="l01371"></a>01371 uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int,
<a name="l01372"></a>01372 uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac,
<a name="l01373"></a>01373 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01374"></a>01374
<a name="l01388"></a>01388 libnet_ptag_t
<a name="l01389"></a>01389 <a class="code" href="libnet-functions_8h.html#a215924e3d5c0cbcc4479579e45e60b58">libnet_build_ospfv2</a>(uint16_t len, uint8_t type, uint32_t rtr_id,
<a name="l01390"></a>01390 uint32_t area_id, uint16_t sum, uint16_t autype, <span class="keyword">const</span> uint8_t* payload,
<a name="l01391"></a>01391 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01392"></a>01392
<a name="l01407"></a>01407 libnet_ptag_t
<a name="l01408"></a>01408 <a class="code" href="libnet-functions_8h.html#aff42a70a3b00a91d14200798d10889f2">libnet_build_ospfv2_hello</a>(uint32_t netmask, uint16_t interval, uint8_t opts,
<a name="l01409"></a>01409 uint8_t priority, uint dead_int, uint32_t des_rtr, uint32_t bkup_rtr,
<a name="l01410"></a>01410 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01411"></a>01411
<a name="l01423"></a>01423 libnet_ptag_t
<a name="l01424"></a>01424 <a class="code" href="libnet-functions_8h.html#a08a78bd747a22581c5ab036b73ca8867">libnet_build_ospfv2_dbd</a>(uint16_t dgram_len, uint8_t opts, uint8_t type,
<a name="l01425"></a>01425 uint seqnum, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01426"></a>01426 libnet_ptag_t ptag);
<a name="l01427"></a>01427
<a name="l01438"></a>01438 libnet_ptag_t
<a name="l01439"></a>01439 <a class="code" href="libnet-functions_8h.html#a1cfa7596a2f85b2b7226d81fa47e7d39">libnet_build_ospfv2_lsr</a>(uint type, uint lsid, uint32_t advrtr,
<a name="l01440"></a>01440 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01441"></a>01441
<a name="l01450"></a>01450 libnet_ptag_t
<a name="l01451"></a>01451 <a class="code" href="libnet-functions_8h.html#a65617e2355459bc9ec2db6b979bee9d4">libnet_build_ospfv2_lsu</a>(uint num, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l01452"></a>01452 libnet_t *l, libnet_ptag_t ptag);
<a name="l01453"></a>01453
<a name="l01469"></a>01469 libnet_ptag_t
<a name="l01470"></a>01470 <a class="code" href="libnet-functions_8h.html#a611d140c425ab18996909be01e02f1c6">libnet_build_ospfv2_lsa</a>(uint16_t age, uint8_t opts, uint8_t type,
<a name="l01471"></a>01471 uint lsid, uint32_t advrtr, uint seqnum, uint16_t sum, uint16_t len,
<a name="l01472"></a>01472 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01473"></a>01473
<a name="l01488"></a>01488 libnet_ptag_t
<a name="l01489"></a>01489 <a class="code" href="libnet-functions_8h.html#ad85342b88f62015f11c85e5b387af465">libnet_build_ospfv2_lsa_rtr</a>(uint16_t flags, uint16_t num, uint <span class="keywordtype">id</span>,
<a name="l01490"></a>01490 uint data, uint8_t type, uint8_t tos, uint16_t metric, <span class="keyword">const</span> uint8_t* payload,
<a name="l01491"></a>01491 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01492"></a>01492
<a name="l01502"></a>01502 libnet_ptag_t
<a name="l01503"></a>01503 <a class="code" href="libnet-functions_8h.html#a0e067929f1e1dfe92062603c6ba12e71">libnet_build_ospfv2_lsa_net</a>(uint32_t nmask, uint rtrid, <span class="keyword">const</span> uint8_t* payload,
<a name="l01504"></a>01504 uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01505"></a>01505
<a name="l01516"></a>01516 libnet_ptag_t
<a name="l01517"></a>01517 <a class="code" href="libnet-functions_8h.html#af3a2ccf97bfd42d3e4760ebf10d71fa5">libnet_build_ospfv2_lsa_sum</a>(uint32_t nmask, uint metric, uint tos,
<a name="l01518"></a>01518 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01519"></a>01519
<a name="l01531"></a>01531 libnet_ptag_t
<a name="l01532"></a>01532 <a class="code" href="libnet-functions_8h.html#ab1a6927f757475cd9734772cc93779a7">libnet_build_ospfv2_lsa_as</a>(uint32_t nmask, uint metric, uint32_t fwdaddr,
<a name="l01533"></a>01533 uint tag, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01534"></a>01534 libnet_ptag_t ptag);
<a name="l01535"></a>01535
<a name="l01547"></a>01547 libnet_ptag_t
<a name="l01548"></a>01548 <a class="code" href="libnet-functions_8h.html#a6b46a684b738fde7b4012e55eff31b73">libnet_build_data</a>(<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01549"></a>01549 libnet_ptag_t ptag);
<a name="l01550"></a>01550
<a name="l01572"></a>01572 libnet_ptag_t
<a name="l01573"></a>01573 <a class="code" href="libnet-functions_8h.html#a399fd399a3cbb884ca3cd9dc7a22509f">libnet_build_dhcpv4</a>(uint8_t opcode, uint8_t htype, uint8_t hlen,
<a name="l01574"></a>01574 uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags,
<a name="l01575"></a>01575 uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, <span class="keyword">const</span> uint8_t *chaddr,
<a name="l01576"></a>01576 <span class="keyword">const</span> <span class="keywordtype">char</span> *sname, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l01577"></a>01577 libnet_t *l, libnet_ptag_t ptag);
<a name="l01578"></a>01578
<a name="l01600"></a>01600 libnet_ptag_t
<a name="l01601"></a>01601 <a class="code" href="libnet-functions_8h.html#aeb5caf6fd933b6e909f427405fa99f96">libnet_build_bootpv4</a>(uint8_t opcode, uint8_t htype, uint8_t hlen,
<a name="l01602"></a>01602 uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags,
<a name="l01603"></a>01603 uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, <span class="keyword">const</span> uint8_t *chaddr,
<a name="l01604"></a>01604 <span class="keyword">const</span> <span class="keywordtype">char</span> *sname, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l01605"></a>01605 libnet_t *l, libnet_ptag_t ptag);
<a name="l01606"></a>01606
<a name="l01611"></a>01611 uint32_t
<a name="l01612"></a>01612 <a class="code" href="libnet-functions_8h.html#a223c01dcaba5f098964342ef2737fd85">libnet_getgre_length</a>(uint16_t fv);
<a name="l01613"></a>01613
<a name="l01636"></a>01636 libnet_ptag_t
<a name="l01637"></a>01637 <a class="code" href="libnet-functions_8h.html#a8406f0a8d836df764bedd849ce24a14c">libnet_build_gre</a>(uint16_t fv, uint16_t type, uint16_t sum,
<a name="l01638"></a>01638 uint16_t offset, uint32_t key, uint32_t seq, uint16_t len,
<a name="l01639"></a>01639 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01640"></a>01640
<a name="l01662"></a>01662 libnet_ptag_t
<a name="l01663"></a>01663 <a class="code" href="libnet-functions_8h.html#aa62e7006bab99d1528571bba42118350">libnet_build_egre</a>(uint16_t fv, uint16_t type, uint16_t sum,
<a name="l01664"></a>01664 uint16_t offset, uint32_t key, uint32_t seq, uint16_t len,
<a name="l01665"></a>01665 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01666"></a>01666
<a name="l01678"></a>01678 libnet_ptag_t
<a name="l01679"></a>01679 <a class="code" href="libnet-functions_8h.html#abf78669b728f6ec879a38bc9fcf7e4d4">libnet_build_gre_sre</a>(uint16_t af, uint8_t offset, uint8_t length,
<a name="l01680"></a>01680 uint8_t *routing, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,
<a name="l01681"></a>01681 libnet_ptag_t ptag);
<a name="l01682"></a>01682
<a name="l01688"></a>01688 libnet_ptag_t
<a name="l01689"></a>01689 <a class="code" href="libnet-functions_8h.html#a578594ad820ae9d82fe3f9ea470f0b27">libnet_build_gre_last_sre</a>(libnet_t *l, libnet_ptag_t ptag);
<a name="l01690"></a>01690
<a name="l01712"></a>01712 libnet_ptag_t
<a name="l01713"></a>01713 <a class="code" href="libnet-functions_8h.html#a9ba6e1d6e95256e67f4a8765bacb901d">libnet_build_bgp4_header</a>(uint8_t marker[LIBNET_BGP4_MARKER_SIZE],
<a name="l01714"></a>01714 uint16_t len, uint8_t type, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l01715"></a>01715 libnet_t *l, libnet_ptag_t ptag);
<a name="l01716"></a>01716
<a name="l01733"></a>01733 libnet_ptag_t
<a name="l01734"></a>01734 <a class="code" href="libnet-functions_8h.html#a99eadbed880ccc2cd3334fa4e32ca193">libnet_build_bgp4_open</a>(uint8_t version, uint16_t src_as, uint16_t hold_time,
<a name="l01735"></a>01735 uint32_t bgp_id, uint8_t opt_len, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l01736"></a>01736 libnet_t *l, libnet_ptag_t ptag);
<a name="l01737"></a>01737
<a name="l01753"></a>01753 libnet_ptag_t
<a name="l01754"></a>01754 <a class="code" href="libnet-functions_8h.html#ad2111145ddb5222d70025f568ab22b75">libnet_build_bgp4_update</a>(uint16_t unfeasible_rt_len, <span class="keyword">const</span> uint8_t *withdrawn_rt,
<a name="l01755"></a>01755 uint16_t total_path_attr_len, <span class="keyword">const</span> uint8_t *path_attributes, uint16_t info_len,
<a name="l01756"></a>01756 uint8_t *reachability_info, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,
<a name="l01757"></a>01757 libnet_t *l, libnet_ptag_t ptag);
<a name="l01758"></a>01758
<a name="l01771"></a>01771 libnet_ptag_t
<a name="l01772"></a>01772 <a class="code" href="libnet-functions_8h.html#a8bbc446c78e7201faf61e8e732919527">libnet_build_bgp4_notification</a>(uint8_t err_code, uint8_t err_subcode,
<a name="l01773"></a>01773 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01774"></a>01774
<a name="l01796"></a>01796 libnet_ptag_t
<a name="l01797"></a>01797 <a class="code" href="libnet-functions_8h.html#a9a182529f97b05e9a2a5bd120f2f8456">libnet_build_sebek</a>(uint32_t magic, uint16_t version, uint16_t type,
<a name="l01798"></a>01798 uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid,
<a name="l01799"></a>01799 uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length,
<a name="l01800"></a>01800 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01801"></a>01801
<a name="l01821"></a>01821 libnet_ptag_t
<a name="l01822"></a>01822 <a class="code" href="libnet-functions_8h.html#a673f627bdc332ec131135d58a1e44a9d">libnet_build_hsrp</a>(uint8_t version, uint8_t opcode, uint8_t state,
<a name="l01823"></a>01823 uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group,
<a name="l01824"></a>01824 uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip,
<a name="l01825"></a>01825 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01826"></a>01826
<a name="l01841"></a>01841 libnet_ptag_t
<a name="l01842"></a>01842 <a class="code" href="libnet-functions_8h.html#a76a5b279a29e54057b1fb3e3786ce32f">libnet_build_link</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, <span class="keyword">const</span> uint8_t *oui, uint16_t type,
<a name="l01843"></a>01843 <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
<a name="l01844"></a>01844
<a name="l01855"></a>01855 libnet_ptag_t
<a name="l01856"></a>01856 <a class="code" href="libnet-functions_8h.html#a84b5f1f2c40e2411e5792dcfc152c988">libnet_autobuild_link</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *oui, uint16_t type,
<a name="l01857"></a>01857 libnet_t *l);
<a name="l01858"></a>01858
<a name="l01871"></a>01871 <span class="keywordtype">int</span>
<a name="l01872"></a>01872 <a class="code" href="libnet-functions_8h.html#a53375552efe95906e152152fc170cc0d">libnet_write</a>(libnet_t *l);
<a name="l01873"></a>01873
<a name="l01883"></a>01883 uint32_t
<a name="l01884"></a>01884 <a class="code" href="libnet-functions_8h.html#ae1981c8f0923176ecf484e9cd07fea15">libnet_get_ipaddr4</a>(libnet_t *l);
<a name="l01885"></a>01885
<a name="l01895"></a>01895 <span class="keyword">struct </span>libnet_in6_addr
<a name="l01896"></a>01896 <a class="code" href="libnet-functions_8h.html#a3d7de8968c2087df7a22140d7993e267">libnet_get_ipaddr6</a>(libnet_t *l);
<a name="l01897"></a>01897
<a name="l01906"></a>01906 <span class="keyword">struct </span>libnet_ether_addr *
<a name="l01907"></a>01907 <a class="code" href="libnet-functions_8h.html#a6531e479687de8d195bd1605422735ca">libnet_get_hwaddr</a>(libnet_t *l);
<a name="l01908"></a>01908
<a name="l01918"></a>01918 uint8_t *
<a name="l01919"></a>01919 <a class="code" href="libnet-functions_8h.html#a0b668af5fd10b0a2879a9a0ea343dce4">libnet_hex_aton</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *s, <span class="keywordtype">int</span> *len);
<a name="l01920"></a>01920
<a name="l01925"></a>01925 <span class="keyword">const</span> <span class="keywordtype">char</span> *
<a name="l01926"></a>01926 <a class="code" href="libnet-functions_8h.html#a5264b060183d307688780bf862fae37c">libnet_version</a>(<span class="keywordtype">void</span>);
<a name="l01927"></a>01927
<a name="l01943"></a>01943 <span class="keywordtype">int</span>
<a name="l01944"></a>01944 <a class="code" href="libnet-functions_8h.html#a42d0af11102be3209e3f207072946906">libnet_adv_cull_packet</a>(libnet_t *l, uint8_t **packet, uint32_t *packet_s);
<a name="l01945"></a>01945
<a name="l01958"></a>01958 <span class="keywordtype">int</span>
<a name="l01959"></a>01959 <a class="code" href="libnet-functions_8h.html#a5297581f7aec5f42abede6bd45cd46e9">libnet_adv_cull_header</a>(libnet_t *l, libnet_ptag_t ptag, uint8_t **header,
<a name="l01960"></a>01960 uint32_t *header_s);
<a name="l01961"></a>01961
<a name="l01975"></a>01975 <span class="keywordtype">int</span>
<a name="l01976"></a>01976 <a class="code" href="libnet-functions_8h.html#a760ea88b395ac3baad0111d569132ae7">libnet_adv_write_link</a>(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t packet_s);
<a name="l01977"></a>01977
<a name="l01991"></a>01991 <span class="keywordtype">int</span>
<a name="l01992"></a>01992 <a class="code" href="libnet-functions_8h.html#ae339adcfdccf212acf3f27538d22c1c5">libnet_adv_write_raw_ipv4</a>(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t packet_s);
<a name="l01993"></a>01993
<a name="l02000"></a>02000 <span class="keywordtype">void</span>
<a name="l02001"></a>02001 <a class="code" href="libnet-functions_8h.html#a1309b57e3571306d9bad13ae93600644">libnet_adv_free_packet</a>(libnet_t *l, uint8_t *packet);
<a name="l02002"></a>02002
<a name="l02016"></a>02016 <span class="keywordtype">int</span>
<a name="l02017"></a>02017 <a class="code" href="libnet-functions_8h.html#a20887ffe940f1d2c5bcae79a188176c6">libnet_cq_add</a>(libnet_t *l, <span class="keywordtype">char</span> *label);
<a name="l02018"></a>02018
<a name="l02033"></a>02033 libnet_t *
<a name="l02034"></a>02034 <a class="code" href="libnet-functions_8h.html#a29f60504a0fe9b7bf6f5a962063118bb">libnet_cq_remove</a>(libnet_t *l);
<a name="l02035"></a>02035
<a name="l02047"></a>02047 libnet_t *
<a name="l02048"></a>02048 <a class="code" href="libnet-functions_8h.html#a4e972664a0d839eab039f8fb2379987a">libnet_cq_remove_by_label</a>(<span class="keywordtype">char</span> *label);
<a name="l02049"></a>02049
<a name="l02056"></a>02056 <span class="keyword">const</span> <span class="keywordtype">char</span> *
<a name="l02057"></a>02057 <a class="code" href="libnet-functions_8h.html#abb1341d217de4d9c39ec484951e518b0">libnet_cq_getlabel</a>(libnet_t *l);
<a name="l02058"></a>02058
<a name="l02065"></a>02065 libnet_t *
<a name="l02066"></a>02066 <a class="code" href="libnet-functions_8h.html#a0cd216f0e5563ee06043a8ebfa16fe57">libnet_cq_find_by_label</a>(<span class="keywordtype">char</span> *label);
<a name="l02067"></a>02067
<a name="l02073"></a>02073 <span class="keywordtype">void</span>
<a name="l02074"></a>02074 <a class="code" href="libnet-functions_8h.html#a565d99e292980d5033bef2d186596217">libnet_cq_destroy</a>(<span class="keywordtype">void</span>);
<a name="l02075"></a>02075
<a name="l02095"></a>02095 libnet_t *
<a name="l02096"></a>02096 <a class="code" href="libnet-functions_8h.html#a7e98a045ac6e29ca421507d9a200b5aa">libnet_cq_head</a>(<span class="keywordtype">void</span>);
<a name="l02097"></a>02097
<a name="l02103"></a>02103 <span class="keywordtype">int</span>
<a name="l02104"></a>02104 <a class="code" href="libnet-functions_8h.html#aab1eb1e3ae64cde579a5a6035d5406c8">libnet_cq_last</a>(<span class="keywordtype">void</span>);
<a name="l02105"></a>02105
<a name="l02111"></a>02111 libnet_t *
<a name="l02112"></a>02112 <a class="code" href="libnet-functions_8h.html#ad312f3182e3e5367db87fc6bab32604d">libnet_cq_next</a>(<span class="keywordtype">void</span>);
<a name="l02113"></a>02113
<a name="l02119"></a>02119 uint32_t
<a name="l02120"></a>02120 <a class="code" href="libnet-functions_8h.html#ad26ce874f56c59091f4811a7816400a8">libnet_cq_size</a>(<span class="keywordtype">void</span>);
<a name="l02121"></a>02121
<a name="l02125"></a>02125 uint32_t
<a name="l02126"></a>02126 <a class="code" href="libnet-functions_8h.html#a127764f17e4457f96fb4b976a1666efa">libnet_cq_end_loop</a>(<span class="keywordtype">void</span>);
<a name="l02127"></a>02127
<a name="l02133"></a>02133 <span class="keywordtype">void</span>
<a name="l02134"></a>02134 <a class="code" href="libnet-functions_8h.html#a3aa6623246e13310dc6f9f9834e7313b">libnet_diag_dump_context</a>(libnet_t *l);
<a name="l02135"></a>02135
<a name="l02141"></a>02141 <span class="keywordtype">void</span>
<a name="l02142"></a>02142 <a class="code" href="libnet-functions_8h.html#a9825c6c69efd6ef24545d59177a333e6">libnet_diag_dump_pblock</a>(libnet_t *l);
<a name="l02143"></a>02143
<a name="l02150"></a>02150 <span class="keywordtype">char</span> *
<a name="l02151"></a>02151 <a class="code" href="libnet-functions_8h.html#a57fed7106abf515c5883611eded7ad88">libnet_diag_dump_pblock_type</a>(uint8_t type);
<a name="l02152"></a>02152
<a name="l02166"></a>02166 <span class="keywordtype">void</span>
<a name="l02167"></a>02167 <a class="code" href="libnet-functions_8h.html#adb2f7d417f05a058c0c2c7f76b6f66e6">libnet_diag_dump_hex</a>(<span class="keyword">const</span> uint8_t *packet, uint32_t len, <span class="keywordtype">int</span> swap, FILE *stream);
<a name="l02168"></a>02168
<a name="l02169"></a>02169 <span class="comment">/*</span>
<a name="l02170"></a>02170 <span class="comment"> * [Internal] </span>
<a name="l02171"></a>02171 <span class="comment"> */</span>
<a name="l02172"></a>02172 <span class="keywordtype">int</span>
<a name="l02173"></a>02173 libnet_write_raw_ipv4(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t size);
<a name="l02174"></a>02174
<a name="l02175"></a>02175 <span class="comment">/*</span>
<a name="l02176"></a>02176 <span class="comment"> * [Internal] </span>
<a name="l02177"></a>02177 <span class="comment"> */</span>
<a name="l02178"></a>02178 <span class="keywordtype">int</span>
<a name="l02179"></a>02179 libnet_write_raw_ipv6(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t size);
<a name="l02180"></a>02180
<a name="l02181"></a>02181 <span class="comment">/*</span>
<a name="l02182"></a>02182 <span class="comment"> * [Internal] </span>
<a name="l02183"></a>02183 <span class="comment"> */</span>
<a name="l02184"></a>02184 <span class="keywordtype">int</span>
<a name="l02185"></a>02185 libnet_write_link(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t size);
<a name="l02186"></a>02186
<a name="l02187"></a>02187 <span class="preprocessor">#if ((__WIN32__) && !(__CYGWIN__))</span>
<a name="l02188"></a>02188 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l02189"></a>02189 <span class="comment"> * [Internal] </span>
<a name="l02190"></a>02190 <span class="comment"> */</span>
<a name="l02191"></a>02191 SOCKET
<a name="l02192"></a>02192 libnet_open_raw4(libnet_t *l);
<a name="l02193"></a>02193 <span class="preprocessor">#else</span>
<a name="l02194"></a>02194 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l02195"></a>02195 <span class="comment"> * [Internal] </span>
<a name="l02196"></a>02196 <span class="comment"> */</span>
<a name="l02197"></a>02197 <span class="keywordtype">int</span>
<a name="l02198"></a>02198 libnet_open_raw4(libnet_t *l);
<a name="l02199"></a>02199 <span class="preprocessor">#endif</span>
<a name="l02200"></a>02200 <span class="preprocessor"></span>
<a name="l02201"></a>02201 <span class="comment">/*</span>
<a name="l02202"></a>02202 <span class="comment"> * [Internal] </span>
<a name="l02203"></a>02203 <span class="comment"> */</span>
<a name="l02204"></a>02204 <span class="keywordtype">int</span>
<a name="l02205"></a>02205 libnet_close_raw4(libnet_t *l);
<a name="l02206"></a>02206
<a name="l02207"></a>02207 <span class="comment">/*</span>
<a name="l02208"></a>02208 <span class="comment"> * [Internal] </span>
<a name="l02209"></a>02209 <span class="comment"> */</span>
<a name="l02210"></a>02210 <span class="keywordtype">int</span>
<a name="l02211"></a>02211 libnet_open_raw6(libnet_t *l);
<a name="l02212"></a>02212
<a name="l02213"></a>02213 <span class="comment">/*</span>
<a name="l02214"></a>02214 <span class="comment"> * [Internal] </span>
<a name="l02215"></a>02215 <span class="comment"> */</span>
<a name="l02216"></a>02216 <span class="keywordtype">int</span>
<a name="l02217"></a>02217 libnet_close_raw6(libnet_t *l);
<a name="l02218"></a>02218
<a name="l02219"></a>02219 <span class="comment">/*</span>
<a name="l02220"></a>02220 <span class="comment"> * [Internal] </span>
<a name="l02221"></a>02221 <span class="comment"> */</span>
<a name="l02222"></a>02222 <span class="keywordtype">int</span>
<a name="l02223"></a>02223 libnet_select_device(libnet_t *l);
<a name="l02224"></a>02224
<a name="l02225"></a>02225 <span class="comment">/*</span>
<a name="l02226"></a>02226 <span class="comment"> * [Internal] </span>
<a name="l02227"></a>02227 <span class="comment"> */</span>
<a name="l02228"></a>02228 <span class="keywordtype">int</span>
<a name="l02229"></a>02229 libnet_open_link(libnet_t *l);
<a name="l02230"></a>02230
<a name="l02231"></a>02231 <span class="comment">/*</span>
<a name="l02232"></a>02232 <span class="comment"> * [Internal] </span>
<a name="l02233"></a>02233 <span class="comment"> */</span>
<a name="l02234"></a>02234 <span class="keywordtype">int</span>
<a name="l02235"></a>02235 libnet_close_link(libnet_t *l);
<a name="l02236"></a>02236
<a name="l02237"></a>02237 <span class="comment">/*</span>
<a name="l02238"></a>02238 <span class="comment"> * [Internal]</span>
<a name="l02239"></a>02239 <span class="comment"> * THIS FUNCTION IS BROKEN. IT WILL SEGFAULT OR CORRUPT MEMORY, OR JUST SILENTLY DO THE</span>
<a name="l02240"></a>02240 <span class="comment"> * WRONG THING IF NOT CALLED CORRECTLY, AND CALLING IT CORRECTLY IS UNDOCUMENTED, AND</span>
<a name="l02241"></a>02241 <span class="comment"> * ALMOST IMPOSSIBLE. YOU HAVE BEEN WARNED.</span>
<a name="l02242"></a>02242 <span class="comment"> */</span>
<a name="l02243"></a>02243 <span class="keywordtype">int</span>
<a name="l02244"></a>02244 libnet_do_checksum(libnet_t *l, uint8_t *iphdr, <span class="keywordtype">int</span> protocol, <span class="keywordtype">int</span> h_len);
<a name="l02245"></a>02245
<a name="l02246"></a>02246 <span class="comment">/* Calculate internet checksums.</span>
<a name="l02247"></a>02247 <span class="comment"> *</span>
<a name="l02248"></a>02248 <span class="comment"> * IP (TCP, UDP, IGMP, ICMP, etc...) checksums usually need information from</span>
<a name="l02249"></a>02249 <span class="comment"> * the IP header to construct the "pseudo header", this function takes a</span>
<a name="l02250"></a>02250 <span class="comment"> * pointer to that header, the buffer boundaries, the "h_len" (see pblock_t for</span>
<a name="l02251"></a>02251 <span class="comment"> * a description, it is increasinly unused, though, and I'm trying to remove it</span>
<a name="l02252"></a>02252 <span class="comment"> * altogether), and the protocol number for the protocol that is to be</span>
<a name="l02253"></a>02253 <span class="comment"> * checksummed.</span>
<a name="l02254"></a>02254 <span class="comment"> *</span>
<a name="l02255"></a>02255 <span class="comment"> * Finding that protocol requires that the IP header be well-formed... so this</span>
<a name="l02256"></a>02256 <span class="comment"> * won't work well for invalid packets. But then, what is the valid checksum</span>
<a name="l02257"></a>02257 <span class="comment"> * for a valid packet, anyhow?</span>
<a name="l02258"></a>02258 <span class="comment"> *</span>
<a name="l02259"></a>02259 <span class="comment"> * This doesn't work well for non-inet checksums, sorry, that's an original design</span>
<a name="l02260"></a>02260 <span class="comment"> * flaw. pblock_t needs a pointer in it, to a packet assembly function that can be</span>
<a name="l02261"></a>02261 <span class="comment"> * called at runtime to do assembly and checksumming.</span>
<a name="l02262"></a>02262 <span class="comment"> */</span>
<a name="l02263"></a>02263 <span class="keywordtype">int</span>
<a name="l02264"></a>02264 libnet_inet_checksum(libnet_t *l, uint8_t *iphdr, <span class="keywordtype">int</span> protocol, <span class="keywordtype">int</span> h_len, <span class="keyword">const</span> uint8_t *beg, <span class="keyword">const</span> uint8_t * end);
<a name="l02265"></a>02265
<a name="l02266"></a>02266 <span class="comment">/*</span>
<a name="l02267"></a>02267 <span class="comment"> * [Internal] </span>
<a name="l02268"></a>02268 <span class="comment"> */</span>
<a name="l02269"></a>02269 uint32_t
<a name="l02270"></a>02270 libnet_compute_crc(uint8_t *buf, uint32_t len);
<a name="l02271"></a>02271
<a name="l02272"></a>02272 <span class="comment">/*</span>
<a name="l02273"></a>02273 <span class="comment"> * [Internal] </span>
<a name="l02274"></a>02274 <span class="comment"> */</span>
<a name="l02275"></a>02275 uint16_t
<a name="l02276"></a>02276 libnet_ip_check(uint16_t *addr, <span class="keywordtype">int</span> len);
<a name="l02277"></a>02277
<a name="l02278"></a>02278 <span class="comment">/*</span>
<a name="l02279"></a>02279 <span class="comment"> * [Internal] </span>
<a name="l02280"></a>02280 <span class="comment"> */</span>
<a name="l02281"></a>02281 <span class="keywordtype">int</span>
<a name="l02282"></a>02282 libnet_in_cksum(uint16_t *addr, <span class="keywordtype">int</span> len);
<a name="l02283"></a>02283
<a name="l02284"></a>02284 <span class="comment">/*</span>
<a name="l02285"></a>02285 <span class="comment"> * [Internal] </span>
<a name="l02286"></a>02286 <span class="comment"> * If ptag is 0, function will create a pblock for the protocol unit type,</span>
<a name="l02287"></a>02287 <span class="comment"> * append it to the list and return a pointer to it. If ptag is not 0,</span>
<a name="l02288"></a>02288 <span class="comment"> * function will search the pblock list for the specified protocol block </span>
<a name="l02289"></a>02289 <span class="comment"> * and return a pointer to it.</span>
<a name="l02290"></a>02290 <span class="comment"> */</span>
<a name="l02291"></a>02291 libnet_pblock_t *
<a name="l02292"></a>02292 libnet_pblock_probe(libnet_t *l, libnet_ptag_t ptag, uint32_t b_len,
<a name="l02293"></a>02293 uint8_t type);
<a name="l02294"></a>02294
<a name="l02295"></a>02295 <span class="comment">/*</span>
<a name="l02296"></a>02296 <span class="comment"> * [Internal] </span>
<a name="l02297"></a>02297 <span class="comment"> * Function creates the pblock list if l->protocol_blocks == NULL or appends</span>
<a name="l02298"></a>02298 <span class="comment"> * an entry to the doubly linked list.</span>
<a name="l02299"></a>02299 <span class="comment"> */</span>
<a name="l02300"></a>02300 libnet_pblock_t *
<a name="l02301"></a>02301 libnet_pblock_new(libnet_t *l, uint32_t b_len);
<a name="l02302"></a>02302
<a name="l02303"></a>02303 <span class="comment">/*</span>
<a name="l02304"></a>02304 <span class="comment"> * [Internal] </span>
<a name="l02305"></a>02305 <span class="comment"> * Function swaps two pblocks in memory.</span>
<a name="l02306"></a>02306 <span class="comment"> */</span>
<a name="l02307"></a>02307 <span class="keywordtype">int</span>
<a name="l02308"></a>02308 libnet_pblock_swap(libnet_t *l, libnet_ptag_t ptag1, libnet_ptag_t ptag2);
<a name="l02309"></a>02309
<a name="l02310"></a>02310 <span class="comment">/*</span>
<a name="l02311"></a>02311 <span class="comment"> * [Internal] </span>
<a name="l02312"></a>02312 <span class="comment"> * Function inserts ptag2 before ptag1 in the doubly linked list.</span>
<a name="l02313"></a>02313 <span class="comment"> */</span>
<a name="l02314"></a>02314 <span class="keywordtype">int</span>
<a name="l02315"></a>02315 libnet_pblock_insert_before(libnet_t *l, libnet_ptag_t ptag1,
<a name="l02316"></a>02316 libnet_ptag_t ptag2);
<a name="l02317"></a>02317
<a name="l02318"></a>02318 <span class="comment">/*</span>
<a name="l02319"></a>02319 <span class="comment"> * [Internal] </span>
<a name="l02320"></a>02320 <span class="comment"> * Function removes a pblock from context </span>
<a name="l02321"></a>02321 <span class="comment"> */</span>
<a name="l02322"></a>02322 <span class="keywordtype">void</span>
<a name="l02323"></a>02323 libnet_pblock_delete(libnet_t *l, libnet_pblock_t *p);
<a name="l02324"></a>02324
<a name="l02325"></a>02325 <span class="comment">/*</span>
<a name="l02326"></a>02326 <span class="comment"> * [Internal] </span>
<a name="l02327"></a>02327 <span class="comment"> * Function updates the pblock meta-inforation. Internally it updates the</span>
<a name="l02328"></a>02328 <span class="comment"> * ptag with a monotonically increasing variable kept in l. This way each</span>
<a name="l02329"></a>02329 <span class="comment"> * pblock has a succesively increasing ptag identifier.</span>
<a name="l02330"></a>02330 <span class="comment"> */</span>
<a name="l02331"></a>02331 libnet_ptag_t
<a name="l02332"></a>02332 libnet_pblock_update(libnet_t *l, libnet_pblock_t *p, uint32_t h, uint8_t type);
<a name="l02333"></a>02333
<a name="l02334"></a>02334
<a name="l02335"></a>02335 <span class="comment">/*</span>
<a name="l02336"></a>02336 <span class="comment"> * [Internal] </span>
<a name="l02337"></a>02337 <span class="comment"> * Function locates a given block by it's ptag. </span>
<a name="l02338"></a>02338 <span class="comment"> */</span>
<a name="l02339"></a>02339 libnet_pblock_t *
<a name="l02340"></a>02340 libnet_pblock_find(libnet_t *l, libnet_ptag_t ptag);
<a name="l02341"></a>02341
<a name="l02342"></a>02342 <span class="comment">/*</span>
<a name="l02343"></a>02343 <span class="comment"> * [Internal] </span>
<a name="l02344"></a>02344 <span class="comment"> * Function copies protocol block data over.</span>
<a name="l02345"></a>02345 <span class="comment"> */</span>
<a name="l02346"></a>02346 <span class="keywordtype">int</span>
<a name="l02347"></a>02347 libnet_pblock_append(libnet_t *l, libnet_pblock_t *p, <span class="keyword">const</span> <span class="keywordtype">void</span> *buf, uint32_t len);
<a name="l02348"></a>02348
<a name="l02349"></a>02349 <span class="comment">/*</span>
<a name="l02350"></a>02350 <span class="comment"> * [Internal] </span>
<a name="l02351"></a>02351 <span class="comment"> * Function sets pblock flags.</span>
<a name="l02352"></a>02352 <span class="comment"> */</span>
<a name="l02353"></a>02353 <span class="keywordtype">void</span>
<a name="l02354"></a>02354 libnet_pblock_setflags(libnet_pblock_t *p, uint8_t flags);
<a name="l02355"></a>02355
<a name="l02356"></a>02356 <span class="comment">/*</span>
<a name="l02357"></a>02357 <span class="comment"> * [Internal] </span>
<a name="l02358"></a>02358 <span class="comment"> * Function returns the protocol number for the protocol block type. If</span>
<a name="l02359"></a>02359 <span class="comment"> * the type is unknown, the function defaults to returning IPPROTO_IP.</span>
<a name="l02360"></a>02360 <span class="comment"> */</span>
<a name="l02361"></a>02361 <span class="keywordtype">int</span>
<a name="l02362"></a>02362 libnet_pblock_p2p(uint8_t type);
<a name="l02363"></a>02363
<a name="l02364"></a>02364 <span class="comment">/*</span>
<a name="l02365"></a>02365 <span class="comment"> * [Internal] </span>
<a name="l02366"></a>02366 <span class="comment"> * Function assembles the protocol blocks into a packet, checksums are</span>
<a name="l02367"></a>02367 <span class="comment"> * calculated if that was requested.</span>
<a name="l02368"></a>02368 <span class="comment"> */</span>
<a name="l02369"></a>02369 <span class="keywordtype">int</span>
<a name="l02370"></a>02370 libnet_pblock_coalesce(libnet_t *l, uint8_t **packet, uint32_t *size);
<a name="l02371"></a>02371
<a name="l02372"></a>02372 <span class="preprocessor">#if !(__WIN32__)</span>
<a name="l02373"></a>02373 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l02374"></a>02374 <span class="comment"> * [Internal] </span>
<a name="l02375"></a>02375 <span class="comment"> * By testing if we can retrieve the FLAGS of an iface</span>
<a name="l02376"></a>02376 <span class="comment"> * we can know if it exists or not and if it is up.</span>
<a name="l02377"></a>02377 <span class="comment"> */</span>
<a name="l02378"></a>02378 <span class="keywordtype">int</span>
<a name="l02379"></a>02379 libnet_check_iface(libnet_t *l);
<a name="l02380"></a>02380 <span class="preprocessor">#endif</span>
<a name="l02381"></a>02381 <span class="preprocessor"></span>
<a name="l02382"></a>02382 <span class="preprocessor">#if defined(__WIN32__)</span>
<a name="l02383"></a>02383 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l02384"></a>02384 <span class="comment"> * [Internal] </span>
<a name="l02385"></a>02385 <span class="comment"> */</span>
<a name="l02386"></a>02386 BYTE *
<a name="l02387"></a>02387 libnet_win32_get_remote_mac(libnet_t *l, DWORD IP);
<a name="l02388"></a>02388
<a name="l02389"></a>02389 <span class="comment">/*</span>
<a name="l02390"></a>02390 <span class="comment"> * [Internal] </span>
<a name="l02391"></a>02391 <span class="comment"> */</span>
<a name="l02392"></a>02392 <span class="keywordtype">int</span>
<a name="l02393"></a>02393 libnet_close_link_interface(libnet_t *l);
<a name="l02394"></a>02394
<a name="l02395"></a>02395 <span class="comment">/*</span>
<a name="l02396"></a>02396 <span class="comment"> * [Internal] </span>
<a name="l02397"></a>02397 <span class="comment"> */</span>
<a name="l02398"></a>02398 BYTE *
<a name="l02399"></a>02399 libnet_win32_read_arp_table(DWORD IP);
<a name="l02400"></a>02400 <span class="preprocessor">#endif</span>
<a name="l02401"></a>02401 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __LIBNET_FUNCTIONS_H */</span>
<a name="l02402"></a>02402
<a name="l02403"></a>02403 <span class="comment">/* EOF */</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Mar 29 2012 14:19:18 for libnet by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>