33#include "contiki-net.h"
34#include "ip64/ip64-dhcpc.h"
36#include "ip64/ip64-eth.h"
37#include "ipv6/ip64-addr.h"
42#define LOG_MODULE "IP64"
43#define LOG_LEVEL LOG_LEVEL_IP64
47PROCESS(ip64_ipv4_dhcp_process,
"IPv4 DHCP");
49uip_ipaddr_t uip_hostaddr;
54ip64_ipv4_dhcp_init(
void)
56 LOG_INFO(
"Starting DHCPv4\n");
66 LOG_INFO(
"IPv4 DHCP Inited\n");
69 LOG_DBG(
"IPv4 DHCP Requested\n");
74 ev == PROCESS_EVENT_TIMER) {
75 ip64_dhcpc_appcall(ev, data);
83ip64_dhcpc_configured(
const struct ip64_dhcpc_state *s)
85 uip_ip6addr_t ip6dnsaddr;
86 LOG_INFO(
"DHCP Configured with %d.%d.%d.%d\n",
87 s->ipaddr.u8[0], s->ipaddr.u8[1],
88 s->ipaddr.u8[2], s->ipaddr.u8[3]);
99 uip_nameserver_update(&ip6dnsaddr, uip_ntohs(s->lease_time[0])*65536ul + uip_ntohs(s->lease_time[1]));
105ip64_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.
Header file for the logging system.
Representation of an IP address.