File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / dhcdrop / src / dhcp_functions.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 22:25:35 2012 UTC (12 years, 4 months ago) by misho
Branches: dhcdrop, MAIN
CVS tags: v0_5, HEAD
dhcdrop

    1: /*
    2:  * dhcdrop_functions.h
    3:  *
    4:  *  Created on: 30.07.2009
    5:  *      Author: root
    6:  */
    7: 
    8: #ifndef DHCP_FUNCTIONS_H_
    9: #define DHCP_FUNCTIONS_H_
   10: 
   11: uint16_t make_dhcp_req	/* Return length of field DHCP-options */
   12:     (
   13: 		struct  dhcp_packet * dhcp_data,	/* Pointer to structure of DHCP packet. Can't be NULL*/
   14: 		const uint8_t message_type,			/* DHCPDISCOVER, DHCPREQUEST... */
   15: 		const uint8_t * ether_src_addr,		/* Ethernet address of pseudo client. Can't be NULL */
   16: 		const uint32_t server_address,	/* NULL for DHCPDISCOVER */
   17: 		const uint32_t cl_ip_addr,		/* NULL for DHCPDISCOVER */
   18: 		const int xid,							/* XID for DHCP transaction */
   19: 		const struct config_params * config		/* Pointer to structure of programm configuration */
   20:     );
   21: uint16_t set_dhcp_type(const struct dhcp_packet *request, const uint16_t new_type);
   22: int get_dhcp_option(const struct dhcp_packet *request, const uint16_t packet_len,
   23:                         const int req_option, void * option_value, int option_size);
   24: void packet_handler(u_char *out_packet, const struct pcap_pkthdr *h,
   25:                                    const u_char *packet);
   26: int get_packet(pcap_t * descr, u_char * ether_packet, const int wait_seconds);
   27: 
   28: #endif /* DHCP_FUNCTIONS_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>