u_char *host_lookup(u_long in, u_short use_name); void host_lookup_r(u_long in, u_short use_name, u_char *buf); u_long name_resolve(u_char *hostname, u_short use_name); int open_raw_sock(int protocol); struct link_int *open_link_interface(char *device, char *ebuf); u_long get_ipaddr(struct link_int *l, const u_char *device, const u_char *buf); struct ether_addr *get_hwaddr(struct link_int *l, const u_char *device, const u_char *buf); void build_arp(u_short hrd, u_short pro, u_short hln, u_short pln, u_short op, u_char *sha, u_char *spa, u_char *tha, u_char *tpa, const u_char *payload, int payload_s, u_char *buf); void build_dns(u_short id, u_short flags, u_short num_q, u_short num_anws_rr, u_short num_auth_rr, u_short num_addi_rr, const u_char *payload, int payload_s, u_char *buf); void build_ethernet(u_char *daddr, u_char *saddr, u_short id, const u_char *payload, int payload_s, u_char *buf); void build_icmp_echo(u_char type, u_char code, u_short id, u_short seq, const u_char *payload, int payload_s, u_char *buf); void build_icmp_mask(u_char type, u_char code, u_short id, u_short seq, u_long mask, const u_char *payload, int payload_s, u_char *buf); void build_igmp(u_char type, u_char code, u_long ip, u_char *buf); void build_ip(u_short len, u_char tos, u_short id, u_short frag, u_char ttl, u_char prot, u_long saddr, u_long daddr, const u_char *payload, int payload_s, u_char *buf); void build_rip(u_char command, u_char ver, u_short rd, u_short af, u_short rt, u_long addr, u_long mask, u_long next_hop, u_long metric, const u_char *payload, int payload_s, u_char *buf) void build_tcp(u_short sport, u_short dport, u_long seq, u_long ack, u_char control, u_short win, u_short urg, const u_char *payload, int payload_s, u_char *buf); void build_udp(u_short sport, u_short dport, const u_char *payload, int payload_s, u_char *buf); int insert_ipo(struct ipoption *opt, u_char opt_len, u_char *buf); int insert_tcpo(struct tcpoption *opt, u_char opt_len, u_char *buf); int write_ip(int sock, const u_char *pak, int len); int write_link_layer(struct link_int *l, const u_char *device, const u_char *buf, int len); void do_checksum(u_char *buf, int protocol, int len); u_short ip_check(u_short *buf, int len) u_short tcp_check(struct tcphdr *th, int len, u_long src, u_long dst); int seed_prand(); u_long get_prand(int type); EOF