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

Socket Utility Header File. More...

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

Go to the source code of this file.

Macros

#define WATCH_SOCK_UDP_SEND   0x01
 Indicate that 'UDP SEND' completion of this socket has to be watched.
 
#define WATCH_SOCK_TCP_SEND   0x02
 Indicate that 'TCP SEND' completion of this socket has to be watched.
 
#define WATCH_SOCK_CONN_TRY   0x04
 Indicate that 'CONNECT' completion of this socket has to be watched.
 
#define WATCH_SOCK_CLS_TRY   0x08
 Indicate that 'CLOSE' completion of this socket has to be watched.
 
#define WATCH_SOCK_CONN_EVT   0x10
 Indicate that 'CONNECT' event of this socket has to be watched.
 
#define WATCH_SOCK_CLS_EVT   0x20
 Indicate that 'CLOSE' event of this socket has to be watched.
 
#define WATCH_SOCK_RECV   0x40
 Indicate that 'RECEIVE' event of this socket has to be watched.
 
#define WATCH_SOCK_MASK_LOW   0x0F
 Mask all Completions of the socket.
 
#define WATCH_SOCK_MASK_HIGH   0x70
 Mask all Events of the socket.
 
#define WATCH_SOCK_ALL_MASK   0x7F
 Mask all Completions and Events.
 
#define DEVICE_INIT_WITH_MEMCHK(tx_size_v, rx_size_v)
 Call device_init after array param check.
 

Typedefs

typedef void(* watch_cbfunc )(uint8 id, uint8 item, int32 ret)
 Watch call back function form.
 

Functions

int8 sockwatch_open (uint8 sock, watch_cbfunc cb)
 Assign a callback function to a socket. More...
 
int8 sockwatch_close (uint8 sock)
 Remove callback function from a socket and Stop to watch all event. More...
 
int8 sockwatch_set (uint8 sock, uint8 item)
 Set a item of event to watch at sockwatch_run. More...
 
int8 sockwatch_clr (uint8 sock, uint8 item)
 Clear a item of event which you don't care anymore. More...
 
int8 sockwatch_chk (uint8 sock, uint8 item)
 Check a item of event has been set on the socket. More...
 
void sockwatch_run (void)
 Sockwatch Module Handler If you use Sockwatch Module, this should run in the main loop.
 
int8 network_init (uint8 dhcp_sock, void_func ip_update, void_func ip_conflict)
 Initialize Network. More...
 
void network_disp (wiz_NetInfo *netinfo)
 Display Current Network Information. More...
 
int8 ip_check (int8 *str, uint8 *ip)
 Check a string is right IP Address, and if right, copy the address to the 'ip' variable as array. More...
 
int8 port_check (int8 *str, uint16 *port)
 Check a string is right TCP Port number, and if right, copy the number to the 'port' variable. More...
 
int8 mac_check (int8 *str, uint8 *mac)
 Check a string is right MAC Address, and if right, copy the address to the 'mac' variable as array. More...
 
int8 * inet_ntoa (uint32 addr)
 Convert a 32bit Address into a Dotted Decimal Format string. More...
 
int8 * inet_ntoa_pad (uint32 addr)
 Convert a 32bit Address into a Dotted Decimal Format string. More...
 
uint32 inet_addr (uint8 *addr)
 Converts a string containing an (Ipv4) Internet Protocol decimal dotted address into a 32bit address. More...
 
uint16 htons (uint16 hostshort)
 htons function converts a unsigned short from host to TCP/IP network byte order (which is big-endian). More...
 
uint32 htonl (uint32 hostlong)
 htonl function converts a unsigned long from host to TCP/IP network byte order (which is big-endian). More...
 
uint32 ntohs (uint16 netshort)
 ntohs function converts a unsigned short from TCP/IP network byte order to host byte order (which is little-endian on Intel processors). More...
 
uint32 ntohl (uint32 netlong)
 converts a unsigned long from TCP/IP network byte order to host byte order (which is little-endian on Intel processors). More...
 

Detailed Description

Socket Utility Header File.

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 sockutil.h.