[dhcp-agent-commits] dhcp-agent/src dhcp-packet-build.c,1.3,1.4 dhcp-librawnet.h,1.6,1.7
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2002-12-27 02:53:24
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv9499 Modified Files: dhcp-packet-build.c dhcp-librawnet.h Log Message: renamed dest/source in functions to be more standard Index: dhcp-packet-build.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-packet-build.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-packet-build.c 16 Nov 2002 00:23:43 -0000 1.3 --- dhcp-packet-build.c 27 Dec 2002 02:53:21 -0000 1.4 *************** *** 142,147 **** eth_addr_t source_hw_addr, eth_addr_t dest_hw_addr, uint16_t type) { ! eth_set_dst_address(net->ether_p, dest_hw_addr); ! eth_set_src_address(net->ether_p, source_hw_addr); eth_set_type(net->ether_p, type); --- 142,147 ---- eth_addr_t source_hw_addr, eth_addr_t dest_hw_addr, uint16_t type) { ! eth_set_dst_addr(net->ether_p, dest_hw_addr); ! eth_set_src_addr(net->ether_p, source_hw_addr); eth_set_type(net->ether_p, type); *************** *** 264,269 **** /* Do checksum later. */ ! ip_set_source_addr(net->ip_p, source_addr); ! ip_set_dest_addr(net->ip_p, dest_addr); return; --- 264,269 ---- /* Do checksum later. */ ! ip_set_src_addr(net->ip_p, source_addr); ! ip_set_dst_addr(net->ip_p, dest_addr); return; *************** *** 417,423 **** /* Create dhcp request message: broadcast */ ! void build_dhcp_request_broadcast(rawnet_t *net, uint32_t xid, time_t secs, list_t *options) { ! build_dhcp(net, xid, secs, net->cip_addr, 0, 0, 0, (ip_addr_t)0, eth_null, 1, options, DHCP_BOOTP_REQUEST); } --- 417,423 ---- /* Create dhcp request message: broadcast */ ! void build_dhcp_request_broadcast(rawnet_t *net, uint32_t xid, time_t secs, ip_addr_t cip_addr, ip_addr_t sip_addr, list_t *options) { ! build_dhcp(net, xid, secs, 0, cip_addr, sip_addr, 0, (ip_addr_t)0, eth_null, 1, options, DHCP_BOOTP_REQUEST); } Index: dhcp-librawnet.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-librawnet.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dhcp-librawnet.h 19 Dec 2002 03:11:45 -0000 1.6 --- dhcp-librawnet.h 27 Dec 2002 02:53:21 -0000 1.7 *************** *** 349,353 **** extern void build_dhcp_request_unicast(rawnet_t *net, uint32_t xid, time_t secs, list_t *options, ip_addr_t sip_addr, eth_addr_t shw_addr); ! extern void build_dhcp_request_broadcast(rawnet_t *net, uint32_t xid, time_t secs, list_t *options); extern void build_dhcp_release(rawnet_t *net, uint32_t xid, list_t *options, ip_addr_t sip_addr, eth_addr_t shw_addr); --- 349,353 ---- extern void build_dhcp_request_unicast(rawnet_t *net, uint32_t xid, time_t secs, list_t *options, ip_addr_t sip_addr, eth_addr_t shw_addr); ! extern void build_dhcp_request_broadcast(rawnet_t *net, uint32_t xid, time_t secs, ip_addr_t cip_addr, ip_addr_t sip_addr, list_t *options); extern void build_dhcp_release(rawnet_t *net, uint32_t xid, list_t *options, ip_addr_t sip_addr, eth_addr_t shw_addr); *************** *** 428,433 **** extern int dhcp_is_type(dhcp_obj * dhcp, unsigned char type); extern int dhcp_option_is_valid(unsigned char tag, unsigned char tag_len); - extern int dhcp_have_atleast_requested_options(dhcp_obj * dhcp, unsigned char *option); - extern int dhcp_have_exact_requested_options(dhcp_obj * dhcp, unsigned char *options); extern int dhcp_have_option(dhcp_obj * dhcp, unsigned char tag); extern int dhcp_is_file_overload(dhcp_obj * dhcp); --- 428,431 ---- *************** *** 451,460 **** extern void eth_write_packet_image(eth_obj * eth, unsigned char *packet); ! extern eth_addr_t eth_get_src_address(eth_obj * eth); ! extern eth_addr_t eth_get_dst_address(eth_obj * eth); extern uint16_t eth_get_type(eth_obj * eth); ! extern void eth_set_src_address(eth_obj * eth, eth_addr_t addr); ! extern void eth_set_dst_address(eth_obj * eth, eth_addr_t addr); extern void eth_set_type(eth_obj * eth, uint16_t type); --- 449,458 ---- extern void eth_write_packet_image(eth_obj * eth, unsigned char *packet); ! extern eth_addr_t eth_get_src_addr(eth_obj * eth); ! extern eth_addr_t eth_get_dst_addr(eth_obj * eth); extern uint16_t eth_get_type(eth_obj * eth); ! extern void eth_set_src_addr(eth_obj * eth, eth_addr_t addr); ! extern void eth_set_dst_addr(eth_obj * eth, eth_addr_t addr); extern void eth_set_type(eth_obj * eth, uint16_t type); *************** *** 465,470 **** extern void ip_write_packet_image(ip_obj * ip, unsigned char *packet); ! extern ip_addr_t ip_get_source_addr(ip_obj * ip); ! extern ip_addr_t ip_get_dest_addr(ip_obj * ip); extern unsigned char ip_get_hl(ip_obj * ip); extern uint8_t ip_get_proto(ip_obj * ip); --- 463,468 ---- extern void ip_write_packet_image(ip_obj * ip, unsigned char *packet); ! extern ip_addr_t ip_get_src_addr(ip_obj * ip); ! extern ip_addr_t ip_get_dst_addr(ip_obj * ip); extern unsigned char ip_get_hl(ip_obj * ip); extern uint8_t ip_get_proto(ip_obj * ip); *************** *** 477,482 **** extern void ip_set_ttl(ip_obj * ip, uint8_t ip_ttl); extern void ip_set_proto(ip_obj * ip, unsigned char ip_proto); ! extern void ip_set_source_addr(ip_obj * ip, uint32_t ip_src); ! extern void ip_set_dest_addr(ip_obj * ip, uint32_t ip_src); /* ARP obj routines. */ --- 475,480 ---- extern void ip_set_ttl(ip_obj * ip, uint8_t ip_ttl); extern void ip_set_proto(ip_obj * ip, unsigned char ip_proto); ! extern void ip_set_src_addr(ip_obj * ip, uint32_t ip_src); ! extern void ip_set_dst_addr(ip_obj * ip, uint32_t ip_src); /* ARP obj routines. */ |