[Dhcp-agent-commits] CVS: dhcp-agent Makefile.am,1.10,1.11 Makefile.in,1.10,1.11 README,1.4,1.5 TODO
Status: Alpha
Brought to you by:
actmodern
From: Thamer Al-H. <act...@us...> - 2002-02-16 17:54:37
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory usw-pr-cvs1:/tmp/cvs-serv10882 Modified Files: Makefile.am Makefile.in README TODO dhcp-agent.h dhcp-client-control.c dhcp-client-states.c dhcp-client.c dhcp-interface.c dhcp-net.c dhcp-sniff.c Log Message: moved client_transact to a rawnet generic function; this is to make it useable for icmp discovery; still broken because of libdnet-1.1 but we're compatible with it too :-); Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 15 Feb 2002 09:19:52 -0000 1.10 --- Makefile.am 16 Feb 2002 17:54:33 -0000 1.11 *************** *** 10,14 **** dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c \ dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c @DHCP_SNPRINTF@ \ ! dhcp-sniffer-ohandlers.c dhcpsniff_LDADD = @PCAP_LIB@ @DNET_LIB@ --- 10,14 ---- dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c \ dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c @DHCP_SNPRINTF@ \ ! dhcp-sniffer-ohandlers.c dhcp-rtt.c dhcpsniff_LDADD = @PCAP_LIB@ @DNET_LIB@ Index: Makefile.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/Makefile.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.in 15 Feb 2002 09:19:52 -0000 1.10 --- Makefile.in 16 Feb 2002 17:54:33 -0000 1.11 *************** *** 78,82 **** bin_PROGRAMS = dhcpsniff dhcpclient ! dhcpsniff_SOURCES = dhcp-sniff.c dhcp-print.c dhcp-util.c dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c @DHCP_SNPRINTF@ dhcp-sniffer-ohandlers.c --- 78,82 ---- bin_PROGRAMS = dhcpsniff dhcpclient ! dhcpsniff_SOURCES = dhcp-sniff.c dhcp-print.c dhcp-util.c dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c @DHCP_SNPRINTF@ dhcp-sniffer-ohandlers.c dhcp-rtt.c *************** *** 106,110 **** dhcpsniff_OBJECTS = dhcp-sniff.o dhcp-print.o dhcp-util.o dhcp-align.o \ dhcp-net.o dhcp-list.o dhcp-com.o dhcp-eth.o dhcp-ip.o dhcp-udp.o \ ! dhcp-arp.o dhcp-icmp.o dhcp-log.o dhcp-sniffer-ohandlers.o dhcpsniff_DEPENDENCIES = dhcpsniff_LDFLAGS = --- 106,110 ---- dhcpsniff_OBJECTS = dhcp-sniff.o dhcp-print.o dhcp-util.o dhcp-align.o \ dhcp-net.o dhcp-list.o dhcp-com.o dhcp-eth.o dhcp-ip.o dhcp-udp.o \ ! dhcp-arp.o dhcp-icmp.o dhcp-log.o dhcp-sniffer-ohandlers.o dhcp-rtt.o dhcpsniff_DEPENDENCIES = dhcpsniff_LDFLAGS = Index: README =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/README,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** README 1 Feb 2002 00:42:03 -0000 1.4 --- README 16 Feb 2002 17:54:33 -0000 1.5 *************** *** 35,46 **** http://www.tcpdump.org/ ! You will also need Dug Song's libdnet (0.8 or above). http://libdnet.sourceforge.net/ Please note that if you wish to get dhcp-agent ported to another ! operating system, you should first check if libdnet and libpcap have ! been ported to that system. dhcp-agent relies on these two libraries ! for a portable raw network layer. See the CAVEATS file for more known issues. --- 35,47 ---- http://www.tcpdump.org/ ! You will also need Dug Song's libdnet (1.1 or above). http://libdnet.sourceforge.net/ Please note that if you wish to get dhcp-agent ported to another ! operating system, you should first check if libdnet and libpcap ! can be ported to that system. dhcp-agent relies on these two ! libraries for a portable raw network layer as well as a portable ! method of setting up networking. See the CAVEATS file for more known issues. *************** *** 94,97 **** --- 95,109 ---- For announcements. + + For filing a support request or bug report please consider + visiting dhcp-agent's page at sourceforge and using the + applicable forum: + + http://www.sourceforge.net/projects/dhcp-agent/ + + Although I do try to reply to mails sent to me personaly, please + know that you are more likely to receive a response from others + on the list, or receive better support from the support forums. I + am slower than a greater collective of users. About the license Index: TODO =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/TODO,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TODO 15 Feb 2002 09:19:52 -0000 1.9 --- TODO 16 Feb 2002 17:54:33 -0000 1.10 *************** *** 51,52 **** --- 51,53 ---- address. check, fix, clean. -- clean up dhcp-packet-build.c + -- need a proper rtt featured re/send/accept routine for raw packets. \ No newline at end of file Index: dhcp-agent.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-agent.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** dhcp-agent.h 15 Feb 2002 09:19:52 -0000 1.28 --- dhcp-agent.h 16 Feb 2002 17:54:33 -0000 1.29 *************** *** 20,24 **** * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! * check specific source files for their licenses. */ --- 20,24 ---- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! * */ *************** *** 337,341 **** typedef struct { intf_t *interface_handle; ! struct intf_entry *interface_entry; } interface_control_t; --- 337,341 ---- typedef struct { intf_t *interface_handle; ! struct intf_entry interface_entry; } interface_control_t; *************** *** 487,491 **** extern int resolv(char *address, uint32_t *addr); ! extern rawnet_t *net_create(char *device, char *filter, int sport, int dport, int promiscious); extern void rawnet_destroy(rawnet_t *net); extern int rawnet_get_packet(rawnet_t *net); --- 487,491 ---- extern int resolv(char *address, uint32_t *addr); ! extern rawnet_t *rawnet_create(char *device, char *filter, int sport, int dport, int promiscious); extern void rawnet_destroy(rawnet_t *net); extern int rawnet_get_packet(rawnet_t *net); *************** *** 517,520 **** --- 517,524 ---- extern int rawnet_up(rawnet_t *net); extern void rawnet_down(rawnet_t *net); + + extern int rawnet_packet_transact(rawnet_t *net, void *arg, + void (*update)(void *arg), + int (*check)(void *arg)); /* Daemon routines. */ Index: dhcp-client-control.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client-control.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** dhcp-client-control.c 15 Feb 2002 09:19:52 -0000 1.13 --- dhcp-client-control.c 16 Feb 2002 17:54:33 -0000 1.14 *************** *** 113,117 **** char filter_buff[GENERIC_BUFFSIZE]; eth_addr_t interface_addr; - int retval; #ifdef HAVE_UNAME --- 113,116 ---- *************** *** 135,157 **** * even if its not initialized properly. */ ! retval = interface_is_up(dc->interface_control); ! ! switch(retval) { ! ! case -1: ! destroy_dhcp_client_control(dc); ! return NULL; ! ! case 0: ! if(interface_up(dc->interface_control, INADDR_ANY, 0xffffffff, -1)) { ! error_message("could not bring up interface: %s: %s", dc->interface, strerror(errno)); ! destroy_dhcp_client_control(dc); ! return NULL; ! } - case 1: /* is up: fallthrough. */ - default: - break; } --- 134,143 ---- * even if its not initialized properly. */ ! if(interface_up(dc->interface_control, 0, 0xffffffff, -1)) { ! error_message("could not bring up interface: %s: %s", dc->interface, strerror(errno)); ! destroy_dhcp_client_control(dc); ! return NULL; } *************** *** 179,183 **** dport, sport); ! if((dc->rawnet = net_create(interface, filter_buff, sport, dport, promiscious)) == NULL) { destroy_dhcp_client_control(dc); return NULL; --- 165,169 ---- dport, sport); ! if((dc->rawnet = rawnet_create(interface, filter_buff, sport, dport, promiscious)) == NULL) { destroy_dhcp_client_control(dc); return NULL; Index: dhcp-client-states.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client-states.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dhcp-client-states.c 15 Feb 2002 09:19:52 -0000 1.17 --- dhcp-client-states.c 16 Feb 2002 17:54:33 -0000 1.18 *************** *** 76,86 **** } ! /* these checking routines are independant of the checks done ! * in client_transact. they're a more specific type of check.*/ ! /* filter to check for valid discover responses. */ ! static int client_discover_check(dhcp_client_control_t *dc) { ! if(dhcp_is_type(dc->rawnet->dhcp_p, DHCP_OFFER_TM) || dhcp_have_atleast_requested_options(dc->rawnet->dhcp_p, dc->conf->options)) return 1; --- 76,103 ---- } ! /* Basic DHCP test on incoming rawnet packet. */ ! static int client_check_dhcp(dhcp_client_control_t *dc) ! { ! /* check for generic dhcp response. ! * we check for type, validity and ! * matching xid. */ ! if(dc->rawnet->type != RAWNET_DHCP || ! (!rawnet_is_valid(dc->rawnet)) || ! (dhcp_get_xid(dc->rawnet->dhcp_p) != dc->xid)) ! return 0; ! ! /* great: valid dhcp response. */ ! return 1; ! ! } ! ! /* check for valid discover responses. */ ! static int client_discover_check(void *arg) { ! dhcp_client_control_t *dc = arg; ! ! if(client_check_dhcp(dc) || ! dhcp_is_type(dc->rawnet->dhcp_p, DHCP_OFFER_TM) || dhcp_have_atleast_requested_options(dc->rawnet->dhcp_p, dc->conf->options)) return 1; *************** *** 89,96 **** } ! /* filter to check for valid request responses. */ ! static int client_request_check(dhcp_client_control_t *dc) { ! if(dhcp_is_type(dc->rawnet->dhcp_p, DHCP_DHCPACK_TM) || dhcp_is_type(dc->rawnet->dhcp_p, DHCP_DHCPNAK_TM)) return 1; --- 106,116 ---- } ! /* check for valid request responses. */ ! static int client_request_check(void *arg) { ! dhcp_client_control_t *dc = arg; ! ! if(client_check_dhcp(dc) || ! dhcp_is_type(dc->rawnet->dhcp_p, DHCP_DHCPACK_TM) || dhcp_is_type(dc->rawnet->dhcp_p, DHCP_DHCPNAK_TM)) return 1; *************** *** 141,229 **** } ! /* Send and wait for reply. */ ! static int client_transact(dhcp_client_control_t *dc, unsigned update_secs, ! int (*check)(dhcp_client_control_t *dc)) { ! rtt_t *rtt; ! int retval; ! unsigned char send_packet = 1; ! ! rtt = rtt_create(); ! ! while(1) { ! ! if(send_packet) { ! ! send_packet = 0; ! ! if(rawnet_send_packet(dc->rawnet) < 0) { ! error_message("could not send packet: %s", strerror(errno)); ! rtt_destroy(rtt); ! return -1; ! } ! ! } ! ! retval = rawnet_wait(dc->rawnet, rtt_get_timeout(rtt)); ! ! switch(retval) { ! ! case RAWNET_PCAP_ERROR: ! error_message("couldn't wait for packets: %s : %s", dc->interface, ! strerror(errno)); ! rtt_destroy(rtt); ! return -1; ! ! case RAWNET_TIMEOUT: ! ! rtt_timeout(rtt); ! if(!rtt_can_retry(rtt)) { ! rtt_destroy(rtt); ! return -1; ! } ! ! /* During DISCOVER we keep updating our seconds field. */ ! ! if(update_secs) { ! dhcp_client_update_secs(dc); ! rawnet_dhcp_update(dc->rawnet, (uint16_t)dc->secs); ! } ! ! send_packet = 1; ! break; ! ! case RAWNET_OK: ! ! /* Fixme: update timeout if packet isn't right. */ ! ! rawnet_get_packet(dc->rawnet); ! ! /* run tests. */ ! ! /* is it dhcp?. */ ! if(dc->rawnet->type != RAWNET_DHCP) ! break; ! ! /* is it valid? */ ! if(!rawnet_is_valid(dc->rawnet)) ! break; ! ! /* does it have the right xid? */ ! if(dhcp_get_xid(dc->rawnet->dhcp_p) != dc->xid) ! break; ! ! /* run check routine. */ ! if(!check(dc)) ! break; ! ! /* great: valid packet. destroy rtt object and return. */ ! rtt_destroy(rtt); ! return 0; ! default: ! break; ! ! } ! } } --- 161,172 ---- } ! /* update secs field. */ ! static void client_update_packet(void *arg) { ! dhcp_client_control_t *dc = arg; ! dhcp_client_update_secs(dc); ! rawnet_dhcp_update(dc->rawnet, (uint16_t)dc->secs); ! return; } *************** *** 248,252 **** build_dhcp_discover(dc->rawnet, dc->xid, dc->secs, options); ! if(client_transact(dc, 1, client_discover_check)) { error_message("timeout on DHCP DISCOVER."); return -1; --- 191,196 ---- build_dhcp_discover(dc->rawnet, dc->xid, dc->secs, options); ! if(rawnet_packet_transact(dc->rawnet, dc, client_update_packet, ! client_discover_check)) { error_message("timeout on DHCP DISCOVER."); return -1; *************** *** 299,303 **** build_dhcp_request(dc->rawnet, dc->xid, dc->secs, options); ! if(client_transact(dc, 1, client_request_check)) { error_message("timeout on DHCP REQUEST."); return -1; --- 243,247 ---- build_dhcp_request(dc->rawnet, dc->xid, dc->secs, options); ! if(rawnet_packet_transact(dc->rawnet, dc, NULL, client_request_check)) { error_message("timeout on DHCP REQUEST."); return -1; Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** dhcp-client.c 15 Feb 2002 09:19:52 -0000 1.15 --- dhcp-client.c 16 Feb 2002 17:54:33 -0000 1.16 *************** *** 230,234 **** int promiscious = 0; ! while((c = getopt(argc, argv, "gcdavim:kwh:l:")) != -1) { switch(c) { --- 230,234 ---- int promiscious = 0; ! while((c = getopt(argc, argv, "gcdavi:m:kwh:l:")) != -1) { switch(c) { *************** *** 247,250 **** --- 247,251 ---- case 'i': + printf("%s\n",optarg); interface = strdup(optarg); break; Index: dhcp-interface.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-interface.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dhcp-interface.c 15 Feb 2002 09:19:52 -0000 1.11 --- dhcp-interface.c 16 Feb 2002 17:54:33 -0000 1.12 *************** *** 32,37 **** { ! if(intf_get(ic->interface_handle, ic->interface_entry) < 0) { ! error_message("could not lookup interface %s : %d", ic->interface_entry->intf_name, strerror(errno)); return -1; } --- 32,37 ---- { ! if(intf_get(ic->interface_handle, &ic->interface_entry) < 0) { ! error_message("could not lookup interface %s : %d", ic->interface_entry.intf_name, strerror(errno)); return -1; } *************** *** 42,47 **** static int interface_set_info(interface_control_t *ic) { ! if(intf_set(ic->interface_handle, ic->interface_entry) < 0) { ! error_message("could not lookup interface %s : %d", ic->interface_entry->intf_name, strerror(errno)); return -1; } --- 42,47 ---- static int interface_set_info(interface_control_t *ic) { ! if(intf_set(ic->interface_handle, &ic->interface_entry) < 0) { ! error_message("could not lookup interface %s : %d", ic->interface_entry.intf_name, strerror(errno)); return -1; } *************** *** 51,60 **** /* Initialize interface handle. */ - interface_control_t *create_interface_control(char *name) { interface_control_t *ic; ! ic = xmalloc(sizeof(interface_control_t)); ic->interface_handle = intf_open(); --- 51,59 ---- /* Initialize interface handle. */ interface_control_t *create_interface_control(char *name) { interface_control_t *ic; ! ic = xcalloc(sizeof(interface_control_t)); ic->interface_handle = intf_open(); *************** *** 62,71 **** fatal_error("could not acquire interface handler"); ! ic->interface_entry = xmalloc(1024); ! memset(ic->interface_entry, 0, sizeof(struct intf_entry)); ! ic->interface_entry->intf_len = 1024; ! ! strlcpy(ic->interface_entry->intf_name, name, sizeof(ic->interface_entry->intf_name) -1); ! ic->interface_entry->intf_name[sizeof(ic->interface_entry->intf_name) -1] = 0; return ic; --- 61,66 ---- fatal_error("could not acquire interface handler"); ! strncpy(ic->interface_entry.intf_name, name, sizeof(ic->interface_entry.intf_name) -1); ! ic->interface_entry.intf_name[sizeof(ic->interface_entry.intf_name) -1] = 0; return ic; *************** *** 79,83 **** /* Check to see if an interface is up. */ - int interface_is_up(interface_control_t *ic) { --- 74,77 ---- *************** *** 86,90 **** return -1; ! return(ic->interface_entry->intf_flags&INTF_FLAG_UP); } --- 80,84 ---- return -1; ! return(ic->interface_entry.intf_flags&INTF_FLAG_UP); } *************** *** 99,105 **** if(addr != INADDR_ANY) { ! ic->interface_entry->intf_addr->addr_type = ADDR_TYPE_IP; ! addr_mtob(&netmask, IP_ADDR_LEN, &ic->interface_entry->intf_addr->addr_bits); ! memcpy(&ic->interface_entry->intf_addr->addr_ip, &addr, IP_ADDR_LEN); } --- 93,99 ---- if(addr != INADDR_ANY) { ! ic->interface_entry.intf_addr->addr_type = ADDR_TYPE_IP; ! addr_mtob(&netmask, IP_ADDR_LEN, &ic->interface_entry.intf_addr->addr_bits); ! memcpy(&ic->interface_entry.intf_addr->addr_ip, &addr, IP_ADDR_LEN); } *************** *** 107,115 **** if(mtu != -1) ! ic->interface_entry->intf_mtu = mtu; else ! ic->interface_entry->intf_mtu = DEFAULT_MTU; ! ic->interface_entry->intf_flags |= INTF_FLAG_UP; if(interface_set_info(ic)) --- 101,109 ---- if(mtu != -1) ! ic->interface_entry.intf_mtu = mtu; else ! ic->interface_entry.intf_mtu = DEFAULT_MTU; ! ic->interface_entry.intf_flags |= INTF_FLAG_UP; if(interface_set_info(ic)) *************** *** 126,130 **** return -1; ! ic->interface_entry->intf_flags &= ~INTF_FLAG_UP; if(interface_set_info(ic)) --- 120,124 ---- return -1; ! ic->interface_entry.intf_flags &= ~INTF_FLAG_UP; if(interface_set_info(ic)) *************** *** 140,144 **** return -1; ! memcpy(addr, &ic->interface_entry->intf_addr->addr_ip, IP_ADDR_LEN); return 0; --- 134,138 ---- return -1; ! memcpy(addr, &ic->interface_entry.intf_addr->addr_ip, IP_ADDR_LEN); return 0; Index: dhcp-net.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-net.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dhcp-net.c 15 Feb 2002 02:00:24 -0000 1.14 --- dhcp-net.c 16 Feb 2002 17:54:33 -0000 1.15 *************** *** 164,170 **** /* Create the workhorse network module. */ ! rawnet_t *net_create(char *device, char *filter, ! int dhcp_src_port, int dhcp_dst_port, ! int promiscious) { rawnet_t *net; --- 164,170 ---- /* Create the workhorse network module. */ ! rawnet_t *rawnet_create(char *device, char *filter, ! int dhcp_src_port, int dhcp_dst_port, ! int promiscious) { rawnet_t *net; *************** *** 481,483 **** --- 481,565 ---- return 0; + } + + /* Generic send and wait for reply: + * + * Calls update() after timeout. + * Calls check() on every packet coming in. + * + */ + + int rawnet_packet_transact(rawnet_t *net, void *arg, void (*update)(void *arg), + int (*check)(void *arg)) + { + rtt_t *rtt; + int retval; + unsigned char send_packet = 1; + + /* create rtt mechanism. */ + rtt = rtt_create(); + + /* We loop here and re-send packets if we timeout, or fail a + * check on an incoming packets. */ + + while(1) { + + if(send_packet) { + + send_packet = 0; + + if(rawnet_send_packet(net) < 0) { + error_message("could not send packet: %s", strerror(errno)); + rtt_destroy(rtt); + return -1; + } + + } + + retval = rawnet_wait(net, rtt_get_timeout(rtt)); + + switch(retval) { + + case RAWNET_PCAP_ERROR: + error_message("couldn't wait for packets: %s : %s", net->device, + strerror(errno)); + rtt_destroy(rtt); + return -1; + + case RAWNET_TIMEOUT: + + rtt_timeout(rtt); + if(!rtt_can_retry(rtt)) { + rtt_destroy(rtt); + return -1; + } + + if(update) /* update if needed. only called after timeout. */ + update(arg); + + send_packet = 1; + break; + + case RAWNET_OK: + + rawnet_get_packet(net); + + if(!check) /* no check? return 0 anyway (we want + * any packet it seems). */ + return 0; + + if(check(arg)) { /* if we have a check + * then check packet. */ + rtt_destroy(rtt); + return 0; /* it's good. let's return. */ + } + + /* otherwise we should just continue. */ + break; + + default: + error_message("invalid return from rawnet_send_packet() -- this is a bug report it please"); + break; + } + } } Index: dhcp-sniff.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-sniff.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dhcp-sniff.c 9 Feb 2002 16:34:42 -0000 1.5 --- dhcp-sniff.c 16 Feb 2002 17:54:33 -0000 1.6 *************** *** 79,83 **** /* It's ok not to set ports since we're not writing any packets. */ ! net = net_create(interface_name, filter_buff, 0, 0, 1); if(net == NULL) --- 79,83 ---- /* It's ok not to set ports since we're not writing any packets. */ ! net = rawnet_create(interface_name, filter_buff, 0, 0, 1); if(net == NULL) |