|
| #define | SOCKET uint8_t |
| | SOCKET type define for legacy driver. More...
|
| |
| #define | SOCK_OK 1 |
| | Result is OK about socket process. More...
|
| |
| #define | SOCK_BUSY 0 |
| | Socket is busy on processing the operation. Valid only Non-block IO Mode. More...
|
| |
| #define | SOCK_FATAL (-1000) |
| | Result is fatal error about socket process. More...
|
| |
| #define | SOCK_ERROR 0 |
| |
| #define | SOCKERR_SOCKNUM (SOCK_ERROR - 1) |
| | Invalid socket number. More...
|
| |
| #define | SOCKERR_SOCKOPT (SOCK_ERROR - 2) |
| | Invalid socket option. More...
|
| |
| #define | SOCKERR_SOCKINIT (SOCK_ERROR - 3) |
| | Socket is not initialized or SIPR is Zero IP address when Sn_MR_TCP. More...
|
| |
| #define | SOCKERR_SOCKCLOSED (SOCK_ERROR - 4) |
| | Socket unexpectedly closed. More...
|
| |
| #define | SOCKERR_SOCKMODE (SOCK_ERROR - 5) |
| | Invalid socket mode for socket operation. More...
|
| |
| #define | SOCKERR_SOCKFLAG (SOCK_ERROR - 6) |
| | Invalid socket flag. More...
|
| |
| #define | SOCKERR_SOCKSTATUS (SOCK_ERROR - 7) |
| | Invalid socket status for socket operation. More...
|
| |
| #define | SOCKERR_ARG (SOCK_ERROR - 10) |
| | Invalid argument. More...
|
| |
| #define | SOCKERR_PORTZERO (SOCK_ERROR - 11) |
| | Port number is zero. More...
|
| |
| #define | SOCKERR_IPINVALID (SOCK_ERROR - 12) |
| | Invalid source or destination IP address. More...
|
| |
| #define | SOCKERR_TIMEOUT (SOCK_ERROR - 13) |
| | Timeout occurred. More...
|
| |
| #define | SOCKERR_DATALEN (SOCK_ERROR - 14) |
| | Invalid data length. More...
|
| |
| #define | SOCKERR_BUFFER (SOCK_ERROR - 15) |
| | Socket buffer is not enough for data communication. More...
|
| |
| #define | SOCKFATAL_PACKLEN (SOCK_FATAL - 1) |
| | Invalid packet length. Fatal Error. More...
|
| |
| #define | SF_MULTI_ENABLE (Sn_MR_MULTI) |
| | In UDP mode such as Sn_MR_UDP4 and Sn_MR_UDP6, Sn_MR_UDP6, Enable multicast mode. When Sn_MR_UDP6, Enable only IPv6 Multicating. More...
|
| |
| #define | SF_ETHER_OWN (Sn_MR_MF) |
| | In MACRAW mode such as Sn_MR_MACRAW, Receive only the packet as broadcast, multicast and own packet. More...
|
| |
| #define | SF_BROAD_BLOCK (Sn_MR_BRDB) |
| | In UDP mode such as Sn_MR_UDP4, Sn_MR_UDP6 and Sn_MR_UDPD, or In MACRAW mode sucha as Sn_MR_MACRAW, Block a broadcast packet. More...
|
| |
| #define | SF_TCP_FPSH (Sn_MR_FPSH) |
| | In TCP mode such as Sn_MR_TCP4, Sn_MR_TCP6 and Sn_MR_TCPD, Use to forced push flag. More...
|
| |
| #define | SF_TCP_NODELAY (Sn_MR_ND) |
| | In TCP mode such as Sn_MR_TCP4, Sn_MR_TCP6 and Sn_MR_TCPD, Use to nodelayed ack. More...
|
| |
| #define | SF_IGMP_VER2 (Sn_MR_MC) |
| | In UDP mode such as Sn_MR_UDP4 with SF_MULTI_ENABLE, Select IGMP version 2. More...
|
| |
| #define | SF_SOLICIT_BLOCK (Sn_MR_SMB) |
| | In UDP mode such as Sn_MR_UDP6 and Sn_MR_UDPD, Block a solicited mutlicast packet. More...
|
| |
| #define | SF_ETHER_MULTI4B (Sn_MR_MMB4) |
| | In MACRAW mode such as Sn_MR_MACRAW with SF_MULTI_ENABLE, Block a IPv4 multicast packet. More...
|
| |
| #define | SF_UNI_BLOCK (Sn_MR_UNIB) |
| | In UDP mdoe such as Sn_MR_UDP4, Sn_MR_UDP6 and Sn_MR_UDPD with SF_MULTI_ENABLE, Block a unicast packet. More...
|
| |
| #define | SF_ETHER_MULIT6B (Sn_MR_MMB6) |
| | In MACRAW mode such as Sn_MR_MACRAW with SF_MULTI_ENABLE, Block a IPv6 multicast packet. More...
|
| |
| #define | SF_FORCE_ARP (Sn_MR2_FARP) |
| | Force to APR. More...
|
| |
| #define | SF_DHA_MANUAL (Sn_MR2_DHAM) |
| | The destination hardware address of packet to be transmitted is set by user through _Sn_DHAR_. It is invalid in MACRAW mode such as Sn_MR_MACRAW. More...
|
| |
| #define | SF_IO_NONBLOCK (0x01 << 3) |
| | Socket nonblock io mode. It used parameter in socket(). More...
|
| |
| #define | PACK_IPv6 (1<<7) |
| | It indicates the destination IP address of the received packet is IPv6 or IPv4. More...
|
| |
| #define | PACK_IPV6_ALLNODE (PACK_IPv6 | (1<<6)) |
| | It indicates the destination IP address of the received packet is allnode multicast(broadcast) address or not. More...
|
| |
| #define | PACK_IPV6_MULTI (PACK_IPv6 | (1<<5)) |
| | It indicates the destination IP address of the received packet is multicast address or not. More...
|
| |
| #define | PACK_IPV6_LLA (PACK_IPv6 | (1<<4)) |
| | It indicates the destination IP address of the received packet is lla or gua. More...
|
| |
| #define | PACK_COMPLETED (1<<3) |
| | It indicates the read data is last in the received packet. More...
|
| |
| #define | PACK_REMAINED (1<<2) |
| | It indicates to remain data in the received packet. More...
|
| |
| #define | PACK_FIRST (1<<1) |
| | It indicates the read data is first in the received packet. More...
|
| |
| #define | PACK_NONE (0x00) |
| | It indicates no information of a packet. More...
|
| |
| #define | SRCV6_PREFER_AUTO (PSR_AUTO) |
| | Soruce IPv6 address is preferred to auto-selection. Refer to _Sn_PSR_. More...
|
| |
| #define | SRCV6_PREFER_LLA (PSR_LLA) |
| | Soruce IPv6 address is preferred to link local address. Refer to _Sn_PSR_. More...
|
| |
| #define | SRCV6_PREFER_GUA (PSR_GUA) |
| | Soruce IPv6 address is preferred to global unique address. Refer to _Sn_PSR_. More...
|
| |
| #define | TCPSOCK_MODE (Sn_ESR_TCPM) |
| | It indicates the IP version when SOCKETn is opened as TCP6 or TCPD mode.(0 - IPv4 , 1 - IPv6) More...
|
| |
| #define | TCPSOCK_OP (Sn_ESR_TCPOP) |
| | It indicates the operation mode when SOCKETn is connected.(0 - TCP CLIENT , 1 - TCP SERVER) More...
|
| |
| #define | TCPSOCK_SIP (Sn_ESR_IP6T) |
| | It indicates the source ip address type when SOCKET is connected. (0 - Link Local, 1 - Global Unique) More...
|
| |
| #define | SOCK_IO_BLOCK 0 |
| | Socket Block IO Mode in setsockopt(). More...
|
| |
| #define | SOCK_IO_NONBLOCK 1 |
| | Socket Non-block IO Mode in setsockopt(). More...
|
| |
|
| int8_t | socket (uint8_t sn, uint8_t protocol, uint16_t port, uint8_t flag) |
| | Open a socket. More...
|
| |
| int8_t | close (uint8_t sn) |
| | Close a SOCKET. More...
|
| |
| int8_t | listen (uint8_t sn) |
| | Listen to a connection request from a TCP CLIENT. More...
|
| |
| int8_t | connect (uint8_t sn, uint8_t *addr, uint16_t port, uint8_t addrlen) |
| | Try to connect to a TCP SERVER. More...
|
| |
| int8_t | disconnect (uint8_t sn) |
| | Try to disconnect to the connected peer. More...
|
| |
| datasize_t | send (uint8_t sn, uint8_t *buf, datasize_t len) |
| | Send data to the connected peer. More...
|
| |
| datasize_t | recv (uint8_t sn, uint8_t *buf, datasize_t len) |
| | Receive data from the connected peer. More...
|
| |
| datasize_t | sendto (uint8_t sn, uint8_t *buf, datasize_t len, uint8_t *addr, uint16_t port, uint8_t addrlen) |
| | Send datagram to the peer specifed by destination IP address and port number passed as parameter. More...
|
| |
| datasize_t | recvfrom (uint8_t sn, uint8_t *buf, datasize_t len, uint8_t *addr, uint16_t *port, uint8_t *addrlen) |
| | Receive datagram from a peer. More...
|
| |
| int8_t | ctlsocket (uint8_t sn, ctlsock_type cstype, void *arg) |
| | Control SOCKETn. More...
|
| |
| int8_t | setsockopt (uint8_t sn, sockopt_type sotype, void *arg) |
| | Set SOCKETn options. More...
|
| |
| int8_t | getsockopt (uint8_t sn, sockopt_type sotype, void *arg) |
| | get SOCKETn options More...
|
| |
| int16_t | peeksockmsg (uint8_t sn, uint8_t *submsg, uint16_t subsize) |
| | Peeks a sub-message in SOCKETn RX buffer. More...
|
| |
SOCKET APIs Header File.
- Version
- 1.0.0
- Date
- 2019/01/01
- Revision history
- <2019/01/01> 1st Release
- Author
- MidnightCow
- Copyright
Copyright (c) 2019, WIZnet Co., LTD.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file socket.h.