WIZlib Library API  ver 1.0
WIZlib Library API User Menual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
socket.h File Reference

Socket Driver Header File - Common. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  wiz_NetInfo_t
 Common Network Information Structure. More...
 

Macros

#define SOCKSTAT_CLOSED   -1
 Indicate the socket is closed state. More...
 
#define SOCKSTAT_INIT   0
 Indicate the socket is init state. More...
 
#define SOCKSTAT_LISTEN   1
 Indicate the socket is listen state. More...
 
#define SOCKSTAT_SYNSENT   2
 Indicate the socket is syn-sent state (momentary state). More...
 
#define SOCKSTAT_SYNRECV   3
 Indicate the socket is syn-received state (momentary state). More...
 
#define SOCKSTAT_ESTABLISHED   4
 Indicate the socket is established state. More...
 
#define SOCKSTAT_FIN_WAIT   5
 Indicate the socket is finish-wait state (momentary state). More...
 
#define SOCKSTAT_CLOSING   6
 Indicate the socket is closing state (momentary state). More...
 
#define SOCKSTAT_TIME_WAIT   7
 Indicate the socket is time-wait state (momentary state). More...
 
#define SOCKSTAT_CLOSE_WAIT   8
 Indicate the socket is close-wait state (momentary state). More...
 
#define SOCKSTAT_LAST_ACK   9
 Indicate the socket is last-ack state (momentary state). More...
 
#define SOCKSTAT_UDP   10
 Indicate the socket is opened as UDP. More...
 
#define SOCKERR_BUSY   -1
 Error because the socket is busy.
 
#define SOCKERR_NOT_TCP   -2
 Error because the socket is not opened as TCP.
 
#define SOCKERR_NOT_UDP   -3
 Error because the socket is not opened as UDP.
 
#define SOCKERR_WRONG_ARG   -4
 Error because the parameter is wrong.
 
#define SOCKERR_WRONG_STATUS   -5
 Error because the socket is unknown state.
 
#define SOCKERR_CLOSED   -6
 Error because the socket is closed state.
 
#define SOCKERR_CLOSE_WAIT   -7
 Error because the socket is close wait state.
 
#define SOCKERR_FIN_WAIT   -8
 Error because the socket is fin wait state.
 
#define SOCKERR_NOT_ESTABLISHED   -9
 Error because the socket is not established state.
 
#define SOCKERR_WINDOW_FULL   -10
 Error because of network window full.
 
#define SOCKERR_TIME_OUT   -11
 Error because of time out.
 
#define SOCKERR_NULL_SRC_IP   -12
 Error because source IP is wrong.
 
#define SOCKERR_BUF_NOT_ENOUGH   -13
 Error because buffer is not enough.
 
#define SOCKERR_NOT_SPECIFIED   -14
 Error because of not specified reason.
 

Typedefs

typedef struct wiz_NetInfo_t wiz_NetInfo
 Common Network Information Structure. More...
 

Enumerations

enum  dhcp_mode { NETINFO_STATIC = 1, NETINFO_DHCP }
 DHCP mode value of wiz_NetInfo. More...
 
enum  netinfo_member { NI_IP_ADDR, NI_SN_MASK, NI_GW_ADDR, NI_DNS_ADDR }
 Indicate the member variable of wiz_NetInfo. More...
 

Functions

void device_init (uint8 *tx_size, uint8 *rx_size)
 Initialize the w5200 device. More...
 
void device_SW_reset (void)
 Reset w5200 device. More...
 
void device_mem_init (uint8 *tx_size, uint8 *rx_size)
 Initialize the Tx, Rx buffer size as per the channels. More...
 
void SetNetInfo (wiz_NetInfo *netinfo)
 This function set the network information. More...
 
void ClsNetInfo (netinfo_member member)
 Clear specific device address to zero. More...
 
void GetNetInfo (wiz_NetInfo *netinfo)
 This function get the network information. More...
 
void GetDstInfo (uint8 s, uint8 *dstip, uint16 *dstport)
 Get Destination Information. More...
 
void SetSocketOption (uint8 option_type, uint16 option_value)
 Set the network option. More...
 
int8 GetTCPSocketStatus (uint8 s)
 Get the TCP socket status. More...
 
int8 GetUDPSocketStatus (uint8 s)
 Get the UDP socket status. More...
 
uint16 GetSocketTxFreeBufferSize (uint8 s)
 Get the TX free buffer size. More...
 
uint16 GetSocketRxRecvBufferSize (uint8 s)
 Get the RX recv buffer size. More...
 
int8 TCPServerOpen (uint8 s, uint16 port)
 Open a TCP server socket. More...
 
int8 TCPClientOpen (uint8 s, uint16 sport, uint8 *dip, uint16 dport)
 Open a TCP client socket. More...
 
int8 TCPCltOpenNB (uint8 s, uint16 sport, uint8 *dip, uint16 dport)
 Open a TCP client socket without blocking. More...
 
int8 TCPConnChk (uint8 s)
 Check if a TCP Socket is connected. More...
 
int8 TCPClose (uint8 s)
 Close a TCP socket. More...
 
int8 TCPCloseNB (uint8 s)
 Close a TCP socket without blocking. More...
 
int8 TCPCloseCHK (uint8 s)
 Check if a TCP Socket is closed. More...
 
int8 TCPClsRcvCHK (uint8 s)
 Check TCP Connection Close which is not intentional. More...
 
int32 TCPSend (uint8 s, const int8 *buf, uint16 len)
 Send the data in TCP mode. More...
 
int8 TCPSendNB (uint8 s, const int8 *buf, uint16 len)
 Send the data in TCP mode without blocking. More...
 
int32 TCPReSend (uint8 s)
 Re-Send the data in TCP mode. More...
 
int8 TCPReSendNB (uint8 s)
 Re-Send the data in TCP mode without blocking. More...
 
int32 TCPSendCHK (uint8 s)
 Check if TCP Send action completed. More...
 
int32 TCPRecv (uint8 s, int8 *buf, uint16 len)
 Receive the data in TCP mode. More...
 
int8 UDPOpen (uint8 s, uint16 port)
 Open a UDP socket. More...
 
int8 UDPClose (uint8 s)
 Close a UDP socket. More...
 
int32 UDPSend (uint8 s, const int8 *buf, uint16 len, uint8 *addr, uint16 port)
 Send the data in UDP mode. More...
 
int32 UDPSendNB (uint8 s, const int8 *buf, uint16 len, uint8 *addr, uint16 port)
 Send the data in UDP mode without blocking. More...
 
int8 UDPSendCHK (uint8 s)
 Check if UDP Send action completed. More...
 
int32 UDPRecv (uint8 s, int8 *buf, uint16 len, uint8 *addr, uint16 *port)
 Receive the data in UDP mode. More...
 

Detailed Description

Socket Driver Header File - Common.

Version
1.0
Date
2013/02/22
Revision
2013/02/22 - 1.0 Release
Author
modified by Mike Jeong

Copyright (C) 2013 WIZnet. All rights reserved.

Definition in file socket.h.

Typedef Documentation

typedef struct wiz_NetInfo_t wiz_NetInfo

Common Network Information Structure.

This is used for everywhere related with network config

Enumeration Type Documentation

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.

Definition at line 50 of file socket.h.

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.

Definition at line 59 of file socket.h.