CDC/ECM driver for mbed, based on USBDevice by mbed-official. Uses PicoTCP to access Ethernet USB device. License: GPLv2
Fork of USB_Ethernet by
pico_dhcp_client.h
00001 /********************************************************************* 00002 PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved. 00003 See LICENSE and COPYING for usage. 00004 00005 . 00006 00007 *********************************************************************/ 00008 #ifndef _INCLUDE_PICO_DHCP_CLIENT 00009 #define _INCLUDE_PICO_DHCP_CLIENT 00010 00011 00012 #include "pico_dhcp_common.h" 00013 #include "pico_addressing.h" 00014 #include "pico_protocol.h" 00015 00016 00017 int pico_dhcp_initiate_negotiation(struct pico_device *device, void (*callback)(void* cli, int code), uint32_t *xid); 00018 void pico_dhcp_process_incoming_message(uint8_t *data, int len); 00019 void *pico_dhcp_get_identifier(uint32_t xid); 00020 struct pico_ip4 pico_dhcp_get_address(void *cli); 00021 struct pico_ip4 pico_dhcp_get_gateway(void *cli); 00022 struct pico_ip4 pico_dhcp_get_nameserver(void* cli); 00023 00024 /* possible codes for the callback */ 00025 #define PICO_DHCP_SUCCESS 0 00026 #define PICO_DHCP_ERROR 1 00027 #define PICO_DHCP_RESET 2 00028 00029 /* DHCP EVENT TYPE 00030 * these come after the message types, used for the state machine*/ 00031 #define PICO_DHCP_EVENT_T1 9 00032 #define PICO_DHCP_EVENT_T2 10 00033 #define PICO_DHCP_EVENT_LEASE 11 00034 #define PICO_DHCP_EVENT_RETRANSMIT 12 00035 00036 #endif
Generated on Wed Jul 13 2022 02:20:45 by 1.7.2