XINU
|
#include <xinu.h>
Go to the source code of this file.
Functions | |
void | dhcp_bld_bootp_msg (struct dhcpmsg *dmsg) |
int32 | dhcp_bld_disc (struct dhcpmsg *dmsg) |
int32 | dhcp_bld_req (struct dhcpmsg *dmsg, const struct dhcpmsg *dmsg_offer, uint32 dsmg_offer_size) |
char * | dhcp_get_opt_val (const struct dhcpmsg *dmsg, uint32 dmsg_size, uint8 option_key) |
uint32 | getlocalip (void) |
void dhcp_bld_bootp_msg | ( | struct dhcpmsg * | dmsg | ) |
Definition at line 45 of file dhcp.c.
References dhcpmsg::dc_bootp, dhcpmsg::dc_bop, dhcpmsg::dc_chaddr, dhcpmsg::dc_cip, dhcpmsg::dc_cookie, dhcpmsg::dc_flags, dhcpmsg::dc_gip, dhcpmsg::dc_hlen, dhcpmsg::dc_hops, dhcpmsg::dc_htype, dhcpmsg::dc_secs, dhcpmsg::dc_sip, dhcpmsg::dc_xid, dhcpmsg::dc_yip, ETH_ADDR_LEN, network::ethucast, htonl, memcpy(), memset(), and NetData.
Referenced by dhcp_bld_disc(), and dhcp_bld_req().
Definition at line 74 of file dhcp.c.
References dhcpmsg::dc_opt, and dhcp_bld_bootp_msg().
Referenced by getlocalip().
int32 dhcp_bld_req | ( | struct dhcpmsg * | dmsg, |
const struct dhcpmsg * | dmsg_offer, | ||
uint32 | dsmg_offer_size | ||
) |
Definition at line 98 of file dhcp.c.
References dhcpmsg::dc_opt, dhcpmsg::dc_sip, dhcpmsg::dc_yip, dhcp_bld_bootp_msg(), dhcp_get_opt_val(), DHCP_SERVER_ID, kprintf(), memcpy(), and SYSERR.
Referenced by getlocalip().
Definition at line 10 of file dhcp.c.
References dhcpmsg::dc_opt, and NULL.
Referenced by dhcp_bld_req(), and getlocalip().
uint32 getlocalip | ( | void | ) |
Definition at line 142 of file dhcp.c.
References network::bootfile, network::bootserver, dhcp_bld_disc(), dhcp_bld_req(), dhcp_get_opt_val(), DHCP_RETRY, DHCP_SERVER_ID, network::dnsserver, dot2ip(), IP_BCAST, network::ipbcast, network::ipmask, network::ipprefix, network::iprouter, network::ipucast, network::ipvalid, kprintf(), memcpy(), NetData, ntohl, network::ntpserver, OK, SYSERR, TIMEOUT, TRUE, UDP_DHCP_CPORT, UDP_DHCP_SPORT, udp_recv(), udp_register(), udp_release(), and udp_sendto().
Referenced by dnslookup(), getutime(), rdscomm(), startup(), xsh_netinfo(), and xsh_udpeserver().