ioLibrary for Cortex M series
|
Network Control Driver Header File - Common. More...
Go to the source code of this file.
Classes | |
struct | wiz_NetInfo_t |
Typedefs | |
typedef struct wiz_NetInfo_t | wiz_NetInfo |
Enumerations | |
enum | dhcp_mode { NETINFO_STATIC = 1, NETINFO_DHCP } |
enum | netinfo_member { NI_IP_ADDR, NI_SN_MASK, NI_GW_ADDR, NI_DNS_ADDR } |
Functions | |
void | SetNetInfo (wiz_NetInfo *netinfo) |
void | ClsNetInfo (netinfo_member member) |
void | GetNetInfo (wiz_NetInfo *netinfo) |
void | GetDstInfo (uint8_t s, uint8_t *dstip, uint16_t *dstport) |
void | SetSocketOption (uint8_t option_type, uint16_t option_value) |
int8_t | GetTCPSocketStatus (uint8_t s) |
int8_t | GetUDPSocketStatus (uint8_t s) |
uint16_t | GetSocketTxFreeBufferSize (uint8_t s) |
uint16_t | GetSocketRxRecvBufferSize (uint8_t s) |
Network Control Driver Header File - Common.
Definition in file netctrl.h.
typedef struct wiz_NetInfo_t wiz_NetInfo |
Common Network Information Structure. This is used for everywhere related with network config
enum dhcp_mode |
DHCP mode value of wiz_NetInfo. 'dhcp' member variable of wiz_NetInfo struct can have one of these value
Enumerator | |
---|---|
NETINFO_STATIC |
Indicate DHCP is disabled. |
NETINFO_DHCP |
Indicate DHCP is working. |
enum netinfo_member |
Indicate the member variable of wiz_NetInfo. This is used as a param of ClsNetInfo function.
Enumerator | |
---|---|
NI_IP_ADDR |
Indicate IP Address. |
NI_SN_MASK |
Indicate Subnet Mask. |
NI_GW_ADDR |
Indicate Gateway Address. |
NI_DNS_ADDR |
Indicate DNS Address. |
void SetNetInfo | ( | wiz_NetInfo * | netinfo) |
Definition at line 18 of file netctrl.c.
References wiz_NetInfo_t::gw, wiz_NetInfo_t::ip, wiz_NetInfo_t::mac, setGAR(), setSHAR(), setSIPR(), setSUBR(), and wiz_NetInfo_t::sn.
Referenced by network_init().
void ClsNetInfo | ( | netinfo_member | member) |
Definition at line 31 of file netctrl.c.
References DBGA, ERRA, NI_GW_ADDR, NI_IP_ADDR, NI_SN_MASK, setGAR(), setSIPR(), and setSUBR().
void GetNetInfo | ( | wiz_NetInfo * | netinfo) |
Definition at line 54 of file netctrl.c.
References getGAR(), getSHAR(), getSIPR(), getSUBR(), wiz_NetInfo_t::gw, wiz_NetInfo_t::ip, wiz_NetInfo_t::mac, and wiz_NetInfo_t::sn.
Referenced by network_disp().
void GetDstInfo | ( | uint8_t | s, |
uint8_t * | dstip, | ||
uint16_t * | dstport | ||
) |
Definition at line 62 of file netctrl.c.
References getSn_DIPR(), and getSn_DPORT().
void SetSocketOption | ( | uint8_t | option_type, |
uint16_t | option_value | ||
) |
int8_t GetTCPSocketStatus | ( | uint8_t | s) |
Definition at line 89 of file netctrl.c.
References _WIZCHIP_SOCK_NUM_, ERRA, getMR(), getSn_SR(), Sn_MR_TCP, SOCK_CLOSE_WAIT, SOCK_CLOSED, SOCK_CLOSING, SOCK_ESTABLISHED, SOCK_FIN_WAIT, SOCK_INIT, SOCK_LAST_ACK, SOCK_LISTEN, SOCK_SYNRECV, SOCK_SYNSENT, SOCK_TIME_WAIT, SOCKERR_NOT_TCP, SOCKERR_WRONG_STATUS, SOCKSTAT_CLOSE_WAIT, SOCKSTAT_CLOSED, SOCKSTAT_CLOSING, SOCKSTAT_ESTABLISHED, SOCKSTAT_FIN_WAIT, SOCKSTAT_INIT, SOCKSTAT_LAST_ACK, SOCKSTAT_LISTEN, SOCKSTAT_SYNRECV, SOCKSTAT_SYNSENT, and SOCKSTAT_TIME_WAIT.
Referenced by loopback_tcpc(), and loopback_tcps().
int8_t GetUDPSocketStatus | ( | uint8_t | s) |
Definition at line 115 of file netctrl.c.
References _WIZCHIP_SOCK_NUM_, ERRA, getMR(), getSn_SR(), Sn_MR_UDP, SOCK_CLOSED, SOCK_MACRAW, SOCK_UDP, SOCKERR_NOT_UDP, SOCKERR_WRONG_STATUS, SOCKSTAT_CLOSED, and SOCKSTAT_UDP.
uint16_t GetSocketTxFreeBufferSize | ( | uint8_t | s) |
uint16_t GetSocketRxRecvBufferSize | ( | uint8_t | s) |
Definition at line 141 of file netctrl.c.
References getSn_RX_RSR().
Referenced by sockwatch_run(), TCPRecv(), and UDPRecv().