Update of /cvsroot/dhcp-agent/dhcp-agent/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26746/src
Modified Files:
dhcp-librawnet.h
Log Message:
added prototypes and globalized address constants
Index: dhcp-librawnet.h
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-librawnet.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** dhcp-librawnet.h 25 Jul 2003 02:36:21 -0000 1.23
--- dhcp-librawnet.h 5 Aug 2003 05:00:38 -0000 1.24
***************
*** 180,183 ****
--- 180,184 ----
uint16_t src_port, dst_port; /* udp ports for writing packets. */
+
char *device; /* device name. */
***************
*** 223,226 ****
--- 224,232 ----
/* constants. */
+ extern const eth_addr_t eth_null;
+ extern const eth_addr_t eth_broadcast;
+ extern const ip_addr_t ip_addr_broadcast;
+ extern const ip_addr_t ip_addr_null;
+
/* Reasonable defaults in case services db isn't up to date. */
#define BOOTP_CLIENT 68
***************
*** 389,392 ****
--- 395,401 ----
extern int rawnet_get_datalink_type(rawnet_t *net);
extern int rawnet_send_packet(rawnet_t *net);
+ extern int rawnet_send_packet_udp_socket_unicast(int sockd, rawnet_t *rawnet, ip_addr_t ip_addr);
+ extern int rawnet_send_packet_udp_socket_broadcast(int sockd, rawnet_t *rawnet);
+ extern int rawnet_get_packet_udp_socket(int sockd, rawnet_t *net);
/* packet building routines. */
***************
*** 401,404 ****
--- 410,416 ----
ip_addr_t sip_addr, eth_addr_t shw_addr);
extern void build_dhcp_decline(rawnet_t *net, uint32_t xid, time_t secs, list_t *options);
+ extern void build_dhcp_offer_unicast(rawnet_t *net, uint32_t xid, ip_addr_t yiaddr, ip_addr_t siaddr,
+ ip_addr_t to_addr, eth_addr_t to_eth_addr, list_t *options);
+ extern void build_dhcp_offer_broadcast(rawnet_t *net, uint32_t xid, ip_addr_t yiaddr, ip_addr_t siaddr, list_t *options);
/* arp packet routines. */
***************
*** 442,445 ****
--- 454,458 ----
extern uint8_t *dhcp_get_filename(dhcp_obj * dhcp);
extern uint32_t dhcp_get_magic_cookie(dhcp_obj * dhcp);
+ extern int dhcp_get_type(dhcp_obj *dhcp);
extern void dhcp_set_op(dhcp_obj * dhcp, uint8_t op);
|