io6Library
WIZnet Dual Stack TCP/IP Ethernet Controller Driver
Macros | Enumerations | Functions
dhcpv6.h File Reference
#include <stdint.h>
#include "w6100.h"
#include "socket.h"

Go to the source code of this file.

Macros

#define MAX_DHCP_RETRY   2
 Maxium retry count. More...
 
#define DHCP_WAIT_TIME   10
 Wait Time 10s. More...
 
#define DHCP_SERVER_PORT   547
 DHCP server port number. More...
 
#define DHCP_CLIENT_PORT   546
 DHCP client port number. More...
 
#define DCHP_HOST_NAME   "WIZnet\0"
 

Enumerations

enum  {
  DHCP_FAILED = 0, DHCP_RUNNING, DHCP_IP_ASSIGN, DHCP_IP_CHANGED,
  DHCP_IP_LEASED, DHCP_STOPPED
}
 

Functions

void InitDhcpOption (unsigned asize, unsigned agrowby)
 
void AppendDhcpOption (uint8_t value)
 
void DumpDhcpOption (char *sMark)
 
void DHCP_Option_Select (uint8_t Option)
 
void DHCP_init (uint8_t s, uint8_t *buf)
 
void DHCP_time_handler (void)
 
uint8_t DHCP_run (wiz_NetInfo *netinfo)
 
uint8_t DHCP_run2 (void)
 
void DHCP_stop (void)
 

Macro Definition Documentation

◆ MAX_DHCP_RETRY

#define MAX_DHCP_RETRY   2

Maxium retry count.

Definition at line 55 of file dhcpv6.h.

◆ DHCP_WAIT_TIME

#define DHCP_WAIT_TIME   10

Wait Time 10s.

Definition at line 56 of file dhcpv6.h.

◆ DHCP_SERVER_PORT

#define DHCP_SERVER_PORT   547

DHCP server port number.

Definition at line 59 of file dhcpv6.h.

◆ DHCP_CLIENT_PORT

#define DHCP_CLIENT_PORT   546

DHCP client port number.

Definition at line 60 of file dhcpv6.h.

◆ DCHP_HOST_NAME

#define DCHP_HOST_NAME   "WIZnet\0"

Definition at line 62 of file dhcpv6.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DHCP_FAILED 

Procssing Fail.

DHCP_RUNNING 

Procssing DHCP proctocol.

DHCP_IP_ASSIGN 

First Occupy IP from DHPC server (if cbfunc == null, act as default default_ip_assign)

DHCP_IP_CHANGED 

Change IP address by new ip from DHCP (if cbfunc == null, act as default default_ip_update)

DHCP_IP_LEASED 

Stand by.

DHCP_STOPPED 

Stop procssing DHCP protocol.

Definition at line 67 of file dhcpv6.h.

Function Documentation

◆ InitDhcpOption()

void InitDhcpOption ( unsigned  asize,
unsigned  agrowby 
)
Parameters
asize
agrowby

Definition at line 188 of file dhcpv6.c.

References growby, num, and size.

Referenced by send_DHCP_INFOREQ(), send_DHCP_REQUEST(), and send_DHCP_SOLICIT().

◆ AppendDhcpOption()

void AppendDhcpOption ( uint8_t  value)
Parameters
value

Definition at line 200 of file dhcpv6.c.

References num, RIP_MSG::OPT, pDHCPMSG, and size.

Referenced by send_DHCP_INFOREQ(), send_DHCP_REQUEST(), and send_DHCP_SOLICIT().

◆ DumpDhcpOption()

void DumpDhcpOption ( char *  sMark)
Parameters
sMark

Definition at line 218 of file dhcpv6.c.

References num, num2, RIP_MSG::OPT, pDHCPMSG, and size.

Referenced by send_DHCP_INFOREQ(), send_DHCP_REQUEST(), and send_DHCP_SOLICIT().

◆ DHCP_Option_Select()

void DHCP_Option_Select ( uint8_t  option)

◆ DHCP_init()

void DHCP_init ( uint8_t  s,
uint8_t *  buf 
)
Parameters
s
buf

Definition at line 1228 of file dhcpv6.c.

References DHCP_CHADDR, DHCP_SOCKET, dhcp_state, DHCP_XID, getSHAR, RIP_MSG::OPT, pDHCPMSG, reset_DHCP_timeout(), setSHAR, and STATE_DHCP6_INIT.

◆ DHCP_time_handler()

void DHCP_time_handler ( void  )

Definition at line 1272 of file dhcpv6.c.

References dhcp_tick_1s.

◆ DHCP_run()

uint8_t DHCP_run ( wiz_NetInfo netinfo)

◆ DHCP_run2()

uint8_t DHCP_run2 ( void  )

◆ DHCP_stop()

void DHCP_stop ( void  )

Definition at line 1165 of file dhcpv6.c.

References close(), DHCP_SOCKET, dhcp_state, and STATE_DHCP6_STOP.