#ifndef _CLIENTPACKET_H
#define _CLIENTPACKET_H

unsigned long random_xid(void);
int send_discover(unsigned long xid, unsigned long requested);
int send_selecting(unsigned long xid, unsigned long server, unsigned long requested);

#if 0 /* wuyun, 2009-09-19, Always use raw socket to send dhcp renew packet */
int send_renew(unsigned long xid, unsigned long server, unsigned long ciaddr);
#else
int send_renew(unsigned long xid, unsigned long server, unsigned long ciaddr, unsigned char dstmac[]);
#endif

int send_release(unsigned long server, unsigned long ciaddr);

#if 0 /* wuyun, 2009-09-21, return packet src mac, and verify packet more strictly */
int get_raw_packet(struct dhcpMessage *payload, int fd);
#else
int get_raw_packet(struct dhcpMessage *payload, int fd, u_char *srcmac);
#endif

#endif
