33#include "contiki-net.h"
34#include "ip64/ip64-dhcpc.h"
37#include "ip64/ip64-eth.h"
38#include "ipv6/ip64-addr.h"
42#define DEBUG DEBUG_NONE
45PROCESS(ip64_ipv4_dhcp_process,
"IPv4 DHCP");
47uip_ipaddr_t uip_hostaddr;
52ip64_ipv4_dhcp_init(
void)
54 printf(
"IP64: Starting DHCPv4\n");
64 PRINTF(
"IP64: Inited\n");
67 PRINTF(
"IP64: Requested\n");
72 ev == PROCESS_EVENT_TIMER) {
73 ip64_dhcpc_appcall(ev, data);
81ip64_dhcpc_configured(
const struct ip64_dhcpc_state *s)
83 uip_ip6addr_t ip6dnsaddr;
84 PRINTF(
"IP64: DHCP Configured with %d.%d.%d.%d\n",
85 s->ipaddr.u8[0], s->ipaddr.u8[1],
86 s->ipaddr.u8[2], s->ipaddr.u8[3]);
97 uip_nameserver_update(&ip6dnsaddr, uip_ntohs(s->lease_time[0])*65536ul + uip_ntohs(s->lease_time[1]));
103ip64_dhcpc_unconfigured(
const struct ip64_dhcpc_state *s)
PROCESS_THREAD(cc2538_rf_process, ev, data)
Implementation of the cc2538 RF driver process.
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_WAIT_EVENT()
Wait for an event to be posted to the process.
#define PROCESS_BEGIN()
Define the beginning of a process.
#define PROCESS_END()
Define the end of a process.
void process_start(struct process *p, process_data_t data)
Start a process.
process_event_t tcpip_event
The uIP event.
#define uip_is_addr_unspecified(a)
Is IPv6 address a the unspecified address a is of type uip_ipaddr_t.
void uip_nameserver_update(const uip_ipaddr_t *nameserver, uint32_t lifetime)
Initialize the module variables.
uip_ipaddr_t * uip_nameserver_get(uint8_t num)
Get a Nameserver ip address given in RA.
#define uip_ip4addr_cmp(addr1, addr2)
Compare two IP addresses.
A set of debugging macros for the IP stack.
Representation of an IP address.