31#ifndef __LIBNET_FUNCTIONS_H
32#define __LIBNET_FUNCTIONS_H
64libnet_init(
int injection_type,
const char *device,
char *err_buf);
247extern const struct libnet_in6_addr in6addr_error;
273struct libnet_in6_addr
282char *host_name,
int host_name_len);
445uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto,
446const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
463const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
480const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
499uint8_t *oui, uint16_t type,
const uint8_t* payload, uint32_t payload_s,
500libnet_t *l, libnet_ptag_t ptag);
521const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
542const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
580uint8_t ssap, uint8_t cf,
const uint8_t *oui, uint16_t type,
const uint8_t* payload,
581uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
599uint8_t cf,
const uint8_t *oui, uint16_t type, libnet_t *l);
624uint16_t op,
const uint8_t *sha,
const uint8_t *spa,
const uint8_t *tha,
const uint8_t *tpa,
625const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
643const uint8_t *tpa, libnet_t *l);
666uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len,
667const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
706const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
731uint16_t value_s,
const uint8_t *value,
const uint8_t* payload, uint32_t payload_s,
732libnet_t *l, libnet_ptag_t ptag);
752uint16_t
id, uint16_t seq,
const uint8_t* payload, uint32_t payload_s,
753libnet_t *l, libnet_ptag_t ptag);
774uint16_t
id, uint16_t seq, uint32_t mask,
const uint8_t* payload,
775uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
794const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
814uint32_t gateway,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
835const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
858uint16_t
id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime,
859const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
878 sum, uint16_t
id, uint16_t seq, uint8_t *payload, uint32_t payload_s,
879 libnet_t *l, libnet_ptag_t ptag);
898uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
917 uint16_t sum,
struct libnet_in6_addr target, uint8_t *payload, uint32_t
918 payload_s, libnet_t* l, libnet_ptag_t ptag);
938 uint16_t sum, uint32_t flags,
struct libnet_in6_addr target, uint8_t
939 *payload, uint32_t payload_s, libnet_t* l, libnet_ptag_t ptag);
953 uint32_t option_s, libnet_t* l, libnet_ptag_t ptag);
973const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
998uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst,
999const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1062uint8_t hl,
struct libnet_in6_addr src,
struct libnet_in6_addr dst,
1063const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1081uint32_t
id,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1105uint8_t segments,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1125uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1145uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1167libnet_t *l, libnet_ptag_t ptag);
1190uint8_t *shost, uint16_t len,
const uint8_t *snap, uint16_t vid,
1191uint16_t portindex, uint16_t reserved,
const uint8_t* payload,
1192uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1209const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1226const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1246uint32_t spi, uint32_t seq, uint32_t auth,
const uint8_t* payload,
1247uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1269uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr,
1270uint16_t num_addi_rr,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1294uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop,
1295uint32_t metric,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1324uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength,
1325uint8_t *cdata, uint32_t vflavor, uint32_t vlength,
const uint8_t *vdata,
1326const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1354uint8_t flags,
const uint8_t *root_id, uint32_t root_pc,
const uint8_t *bridge_id,
1355uint16_t port_id, uint16_t message_age, uint16_t max_age,
1356uint16_t hello_time, uint16_t f_delay,
const uint8_t* payload,
1357uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1376const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1399uint8_t dsap, uint8_t ssap, uint8_t cf,
const uint8_t *oui, uint16_t type,
1400const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1419uint8_t dsap, uint8_t ssap, uint8_t cf,
const uint8_t *oui, uint16_t type,
1445uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int,
1446uint16_t sum,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1465uint8_t ttl,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1499uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int,
1500uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac,
1501uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac,
1502uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int,
1503uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac,
1504const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1523uint32_t area_id, uint16_t sum, uint16_t autype,
const uint8_t* payload,
1524uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1544uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr,
1545const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1565uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, uint32_t neighbor,
1566const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1583uint32_t seqnum,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1600const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1614libnet_t *l, libnet_ptag_t ptag);
1635uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len,
1636const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1656uint32_t data, uint8_t type, uint8_t tos, uint16_t metric,
const uint8_t* payload,
1657uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1672uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1688const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1705uint32_t tag,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1750uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags,
1751uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip,
const uint8_t *chaddr,
1752const char *sname,
const char *file,
const uint8_t* payload, uint32_t payload_s,
1753libnet_t *l, libnet_ptag_t ptag);
1780uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags,
1781uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip,
const uint8_t *chaddr,
1782const char *sname,
const char *file,
const uint8_t* payload, uint32_t payload_s,
1783libnet_t *l, libnet_ptag_t ptag);
1820uint16_t offset, uint32_t key, uint32_t seq, uint16_t len,
1821const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1848uint16_t offset, uint32_t key, uint32_t seq, uint16_t len,
1849const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1866uint8_t *routing,
const uint8_t* payload, uint32_t payload_s, libnet_t *l,
1904uint16_t len, uint8_t type,
const uint8_t* payload, uint32_t payload_s,
1905libnet_t *l, libnet_ptag_t ptag);
1927uint32_t bgp_id, uint8_t opt_len,
const uint8_t* payload, uint32_t payload_s,
1928libnet_t *l, libnet_ptag_t ptag);
1949uint16_t total_path_attr_len,
const uint8_t *path_attributes, uint16_t info_len,
1950uint8_t *reachability_info,
const uint8_t* payload, uint32_t payload_s,
1951libnet_t *l, libnet_ptag_t ptag);
1969const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
1996uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid,
1997uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length,
1998const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
2023uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group,
2024uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip,
2025const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
2045const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
2103struct libnet_in6_addr
2115struct libnet_ether_addr *
2413libnet_write_raw_ipv4(libnet_t *l,
const uint8_t *packet, uint32_t size);
2420libnet_write_raw_ipv6(libnet_t *l,
const uint8_t *packet, uint32_t size);
2427libnet_write_link(libnet_t *l,
const uint8_t *packet, uint32_t size);
2433libnet_open_raw4(libnet_t *l);
2440libnet_close_raw4(libnet_t *l);
2446libnet_open_raw6(libnet_t *l);
2452libnet_close_raw6(libnet_t *l);
2458libnet_select_device(libnet_t *l);
2464libnet_open_link(libnet_t *l);
2470libnet_close_link(libnet_t *l);
2479libnet_do_checksum(libnet_t *l, uint8_t *iphdr,
int protocol,
int h_len);
2500libnet_inet_checksum(libnet_t *l, uint8_t *iphdr,
int protocol,
int h_len,
const uint8_t *beg,
const uint8_t * end);
2507libnet_compute_crc(uint8_t *buf, uint32_t len);
2514libnet_ip_check(uint16_t *addr,
int len);
2521libnet_in_cksum(uint16_t *addr,
int len);
2532libnet_pblock_probe(libnet_t *l, libnet_ptag_t ptag, uint32_t b_len,
2542libnet_pblock_new(libnet_t *l, uint32_t b_len);
2550libnet_pblock_swap(libnet_t *l, libnet_ptag_t ptag1, libnet_ptag_t ptag2);
2558libnet_pblock_insert_before(libnet_t *l, libnet_ptag_t ptag1,
2559libnet_ptag_t ptag2);
2567libnet_pblock_delete(libnet_t *l, libnet_pblock_t *p);
2577libnet_pblock_update(libnet_t *l, libnet_pblock_t *p, uint32_t h, uint8_t type);
2586libnet_pblock_find(libnet_t *l, libnet_ptag_t ptag);
2594libnet_pblock_append(libnet_t *l, libnet_pblock_t *p,
const void *buf, uint32_t len);
2602libnet_pblock_setflags(libnet_pblock_t *p, uint8_t flags);
2611libnet_pblock_p2p(uint8_t type);
2620libnet_pblock_coalesce(libnet_t *l, uint8_t **packet, uint32_t *size);
2629libnet_check_iface(libnet_t *l);
2632#if defined(__WIN32__)
2637libnet_win32_get_remote_mac(libnet_t *l, DWORD IP);
2643libnet_close_link_interface(libnet_t *l);
2649libnet_win32_read_arp_table(DWORD IP);
LIBNET_API libnet_ptag_t libnet_build_egre(uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_icmpv6_echo(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_in6_is_error(struct libnet_in6_addr addr)
LIBNET_API int libnet_seed_prand(libnet_t *l)
LIBNET_API uint32_t libnet_get_ipaddr4(libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_udp(uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_t * libnet_cq_remove_by_label(char *label)
LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nadv(uint8_t type, uint8_t code, uint16_t sum, uint32_t flags, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_sebek(uint32_t magic, uint16_t version, uint16_t type, uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid, uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_ftr(uint8_t len, uint8_t nh, int8_t *auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_rip(uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af, uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop, uint32_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_plist_chain_dump(libnet_plist_t *plist)
LIBNET_API void libnet_cq_destroy(void)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsr(uint32_t type, uint32_t lsid, uint32_t advrtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ipv6_hbhopts(uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ipv6_destopts(uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API void libnet_diag_dump_context(libnet_t *l)
int libnet_cq_add(libnet_t *l, char *label)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_hello(uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ipsec_ah(uint8_t nh, uint8_t len, uint16_t res, uint32_t spi, uint32_t seq, uint32_t auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_802_2snap(uint8_t dsap, uint8_t ssap, uint8_t control, uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_net(uint32_t nmask, uint32_t rtrid, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API char * libnet_diag_dump_pblock_type(uint8_t type)
LIBNET_API libnet_ptag_t libnet_build_ipv4(uint16_t ip_len, uint8_t tos, uint16_t id, uint16_t frag, uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_getfd(libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_dhcpv4(uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_adv_write_raw_ipv4(libnet_t *l, const uint8_t *packet, uint32_t packet_s)
LIBNET_API libnet_ptag_t libnet_autobuild_fddi(uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)
LIBNET_API int libnet_write(libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_bgp4_header(uint8_t marker[LIBNET_BGP4_MARKER_SIZE], uint16_t len, uint8_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_gre(uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ospfv2(uint16_t len, uint8_t type, uint32_t rtr_id, uint32_t area_id, uint16_t sum, uint16_t autype, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API void libnet_diag_dump_pblock(libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_icmpv4_echo(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_rpc_call(uint32_t rm, uint32_t xid, uint32_t prog_num, uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength, uint8_t *cdata, uint32_t vflavor, uint32_t vlength, const uint8_t *vdata, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_bgp4_open(uint8_t version, uint16_t src_as, uint16_t hold_time, uint32_t bgp_id, uint8_t opt_len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_token_ring(uint8_t ac, uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_icmpv4_timeexceed(uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API char * libnet_addr2name4(uint32_t in, uint8_t use_name)
LIBNET_API libnet_ptag_t libnet_build_ipv6(uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh, uint8_t hl, struct libnet_in6_addr src, struct libnet_in6_addr dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API void libnet_addr2name6_r(struct libnet_in6_addr addr, uint8_t use_name, char *host_name, int host_name_len)
LIBNET_API libnet_ptag_t libnet_build_mpls(uint32_t label, uint8_t experimental, uint8_t bos, uint8_t ttl, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_bootpv4(uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_dnsv4(uint16_t h_len, uint16_t id, uint16_t flags, uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr, uint16_t num_addi_rr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_plist_chain_free(libnet_plist_t *plist)
LIBNET_API libnet_ptag_t libnet_build_vrrp(uint8_t version, uint8_t type, uint8_t vrouter_id, uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_t * libnet_cq_head(void)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsu(uint32_t num, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_autobuild_ipv6(uint16_t len, uint8_t nh, struct libnet_in6_addr dst, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API uint32_t libnet_getgre_length(uint16_t fv)
LIBNET_API uint32_t libnet_name2addr4(libnet_t *l, const char *host_name, uint8_t use_name)
LIBNET_API uint32_t libnet_cq_end_loop(void)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_rtr(uint16_t flags, uint16_t num, uint32_t id, uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_autobuild_ipv4(uint16_t len, uint8_t prot, uint32_t dst, libnet_t *l)
LIBNET_API const char * libnet_getdevice(libnet_t *l)
LIBNET_API uint32_t libnet_getpbuf_size(libnet_t *l, libnet_ptag_t ptag)
LIBNET_API char * libnet_geterror(libnet_t *l)
LIBNET_API libnet_ptag_t libnet_autobuild_ethernet(const uint8_t *dst, uint16_t type, libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_icmpv4_redirect(uint8_t type, uint8_t code, uint16_t sum, uint32_t gateway, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_802_2(uint8_t dsap, uint8_t ssap, uint8_t control, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa(uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API struct libnet_in6_addr libnet_get_ipaddr6(libnet_t *l)
LIBNET_API int libnet_cq_last(void)
LIBNET_API libnet_ptag_t libnet_build_ipv6_routing(uint8_t nh, uint8_t len, uint8_t rtype, uint8_t segments, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_icmpv4_unreach(uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_icmpv6_unreach(uint8_t type, uint8_t code, uint16_t sum, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_bgp4_update(uint16_t unfeasible_rt_len, const uint8_t *withdrawn_rt, uint16_t total_path_attr_len, const uint8_t *path_attributes, uint16_t info_len, uint8_t *reachability_info, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_autobuild_link(const uint8_t *dst, const uint8_t *oui, uint16_t type, libnet_t *l)
LIBNET_API void libnet_destroy(libnet_t *l)
LIBNET_API void libnet_stats(libnet_t *l, struct libnet_stats *ls)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_as(uint32_t nmask, uint32_t metric, uint32_t fwdaddr, uint32_t tag, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_stp_tcn(uint16_t id, uint8_t version, uint8_t bpdu_type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_icmpv4_timestamp(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API void libnet_adv_free_packet(libnet_t *l, uint8_t *packet)
LIBNET_API const char * libnet_cq_getlabel(libnet_t *l)
LIBNET_API void libnet_clear_packet(libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_link(const uint8_t *dst, const uint8_t *src, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ipv6_frag(uint8_t nh, uint8_t reserved, uint16_t frag, uint32_t id, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_dbd(uint16_t dgram_len, uint8_t opts, uint8_t type, uint32_t seqnum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_adv_cull_packet(libnet_t *l, uint8_t **packet, uint32_t *packet_s)
LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nsol(uint8_t type, uint8_t code, uint16_t sum, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ipv4_options(const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_data(const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag, uint8_t **header, uint32_t *header_s)
libnet_ptag_t libnet_build_ospfv2_hello_neighbor(uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, uint32_t neighbor, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_plist_chain_new(libnet_t *l, libnet_plist_t **plist, char *token_list)
LIBNET_API libnet_ptag_t libnet_build_802_1x(uint8_t eap_ver, uint8_t eap_type, uint16_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API uint8_t * libnet_hex_aton(const char *s, int *len)
LIBNET_API libnet_ptag_t libnet_build_icmpv4_mask(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t mask, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_arp(uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln, uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, const uint8_t *tpa, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_802_3(const uint8_t *dst, const uint8_t *src, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_fddi(uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_autobuild_arp(uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, const uint8_t *tpa, libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_hsrp(uint8_t version, uint8_t opcode, uint8_t state, uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group, uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_plist_chain_next_pair(libnet_plist_t *plist, uint16_t *bport, uint16_t *eport)
LIBNET_API libnet_ptag_t libnet_autobuild_token_ring(uint8_t ac, uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_ethernet(const uint8_t *dst, const uint8_t *src, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_802_1q(const uint8_t *dst, const uint8_t *src, uint16_t tpi, uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_adv_write_link(libnet_t *l, const uint8_t *packet, uint32_t packet_s)
LIBNET_API libnet_ptag_t libnet_build_tcp(uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack, uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API const char * libnet_version(void)
LIBNET_API uint32_t libnet_getpacket_size(libnet_t *l)
LIBNET_API libnet_ptag_t libnet_build_stp_conf(uint16_t id, uint8_t version, uint8_t bpdu_type, uint8_t flags, const uint8_t *root_id, uint32_t root_pc, const uint8_t *bridge_id, uint16_t port_id, uint16_t message_age, uint16_t max_age, uint16_t hello_time, uint16_t f_delay, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_hdr(uint32_t spi, uint32_t seq, uint32_t iv, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API struct libnet_ether_addr * libnet_get_hwaddr(libnet_t *l)
void libnet_diag_dump_hex(const uint8_t *packet, uint32_t len, int swap, FILE *stream)
LIBNET_API libnet_t * libnet_cq_remove(libnet_t *l)
LIBNET_API char * libnet_plist_chain_dump_string(libnet_plist_t *plist)
LIBNET_API uint8_t * libnet_getpbuf(libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_t * libnet_init(int injection_type, const char *device, char *err_buf)
LIBNET_API uint32_t libnet_cq_size(void)
LIBNET_API libnet_t * libnet_cq_next(void)
LIBNET_API uint32_t libnet_get_prand(int mod)
LIBNET_API libnet_ptag_t libnet_build_gre_sre(uint16_t af, uint8_t offset, uint8_t length, uint8_t *routing, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_gre_last_sre(libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_sum(uint32_t nmask, uint32_t metric, uint32_t tos, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_tcp_options(const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_opt(uint8_t type, uint8_t *option, uint32_t option_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_cdp(uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type, uint16_t value_s, const uint8_t *value, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API int libnet_toggle_checksum(libnet_t *l, libnet_ptag_t ptag, int mode)
LIBNET_API libnet_ptag_t libnet_build_ntp(uint8_t leap_indicator, uint8_t version, uint8_t mode, uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int, uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac, uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac, uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int, uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API struct libnet_in6_addr libnet_name2addr6(libnet_t *l, const char *host_name, uint8_t use_name)
LIBNET_API libnet_t * libnet_cq_find_by_label(char *label)
LIBNET_API libnet_ptag_t libnet_build_igmp(uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_isl(uint8_t *dhost, uint8_t type, uint8_t user, uint8_t *shost, uint16_t len, const uint8_t *snap, uint16_t vid, uint16_t portindex, uint16_t reserved, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
LIBNET_API libnet_ptag_t libnet_build_bgp4_notification(uint8_t err_code, uint8_t err_subcode, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)