16 #include "RTE_Components.h"
23 #define __weak __attribute__((weak))
27 #if defined(__BIG_ENDIAN) || defined(__ARM_BIG_ENDIAN)
28 #define ntohl(v) (uint32_t)(v)
29 #define ntohs(v) (uint16_t)(v)
30 #elif defined (__CC_ARM)
32 #define ntohl(v) (uint32_t)(__rev(v))
33 #define ntohs(v) (uint16_t)(__rev(v) >> 16)
36 #define ntohl(v) __builtin_bswap32((uint32_t)(v))
37 #define ntohs(v) __builtin_bswap16((uint16_t)(v))
41 #define htons(v) ntohs(v)
42 #define htonl(v) ntohl(v)
45 #define NET_ADDR_ETH_LEN 6
46 #define NET_ADDR_IP4_LEN 4
47 #define NET_ADDR_IP6_LEN 16
48 #define NET_HOSTNAME_LEN 16
49 #define NET_ROOT_DIR_LEN 80
52 #define NET_ADDR_ANY (-1)
53 #define NET_ADDR_IP4 0
54 #define NET_ADDR_IP6 1
57 typedef struct net_addr {
64 typedef struct net_addr4 {
71 #define NET_USERNAME_LEN 16
72 #define NET_PASSWORD_LEN 16
75 #define NET_ACCESS_FILE_READ 0x01
76 #define NET_ACCESS_FILE_WRITE 0x02
77 #define NET_ACCESS_DIRECTORY_CREATE 0x04
78 #define NET_ACCESS_DIRECTORY_REMOVE 0x08
79 #define NET_ACCESS_DIRECTORY_LIST 0x10
97 #define NET_UDP_CHECKSUM_SEND 0x01
98 #define NET_UDP_CHECKSUM_VERIFY 0x02
151 #ifdef RTE_Network_Socket_BSD
168 #define SOCK_STREAM 1
172 #define IPPROTO_TCP 1
173 #define IPPROTO_UDP 2
176 #define INADDR_ANY 0x00000000
177 #define INADDR_NONE 0xffffffff
178 #define INADDR_LOOPBACK 0x7f000001
181 #define MSG_DONTWAIT 0x01
182 #define MSG_PEEK 0x02
183 #define MSG_TRUNC 0x04
184 #define MSG_CTRUNC 0x08
192 #define IPPROTO_IPV6 3
195 #define SO_KEEPALIVE 1
196 #define SO_RCVTIMEO 2
197 #define SO_SNDTIMEO 3
203 #define IP_RECVDSTADDR 3
206 #define IPV6_TCLASS 1
207 #define IPV6_MULTICAST_HOPS 2
208 #define IPV6_RECVDSTADDR 3
211 #define BSD_ERROR (-1)
212 #define BSD_ESOCK (-2)
213 #define BSD_EINVAL (-3)
214 #define BSD_ENOTSUP (-11)
215 #define BSD_ENOMEM (-5)
216 #define BSD_ELOCKED (-7)
217 #define BSD_EWOULDBLOCK (-4)
218 #define BSD_ETIMEDOUT (-8)
219 #define BSD_EINPROGRESS (-9)
220 #define BSD_ENOTCONN (-6)
221 #define BSD_EISCONN (-12)
222 #define BSD_ECONNREFUSED (-13)
223 #define BSD_ECONNRESET (-14)
224 #define BSD_ECONNABORTED (-15)
225 #define BSD_EALREADY (-16)
226 #define BSD_EADDRINUSE (-17)
227 #define BSD_EDESTADDRREQ (-18)
228 #define BSD_EHOSTNOTFOUND (-10)
231 #define BSD_SUCCESS 0
232 #define BSD_ERROR_SOCKET BSD_ESOCK
233 #define BSD_ERROR_PARAMETER BSD_EINVAL
234 #define BSD_ERROR_WOULDBLOCK BSD_EWOULDBLOCK
235 #define BSD_ERROR_NOMEMORY BSD_ENOMEM
236 #define BSD_ERROR_CLOSED BSD_ENOTCONN
237 #define BSD_ERROR_LOCKED BSD_ELOCKED
238 #define BSD_ERROR_TIMEOUT BSD_ETIMEDOUT
239 #define BSD_ERROR_INPROGRESS BSD_EINPROGRESS
240 #define BSD_ERROR_NONAME BSD_EHOSTNOTFOUND
245 typedef struct sockaddr {
250 #if defined(__CC_ARM)
253 #elif defined(__clang__)
254 #pragma clang diagnostic push
255 #pragma clang diagnostic ignored "-Wc11-extensions"
259 typedef struct in_addr {
262 uint8_t s_b1,s_b2,s_b3,s_b4;
272 typedef struct in6_addr {
280 #if defined(__CC_ARM)
282 #elif defined(__clang__)
283 #pragma clang diagnostic pop
287 typedef struct sockaddr_in {
295 typedef struct sockaddr_in6 {
303 typedef struct sockaddr_storage {
307 int8_t __ss_pad2[16];
311 typedef struct hostent {
320 #define INET_ADDRSTRLEN 16
321 #define INET6_ADDRSTRLEN 46
324 #define FD_SETSIZE 64
338 #define FD_WR(fd,code) if ((fd > 0) && (fd <= FD_SETSIZE)) { code; }
339 #define FD_RD(fd,code) (((fd > 0) && (fd <= FD_SETSIZE)) ? (code) : 0)
342 #define FD_SET(fd,set) FD_WR(fd, (set)->fd_bits[(fd-1)>>5] |= (1U << ((fd-1)&0x1F)))
343 #define FD_CLR(fd,set) FD_WR(fd, (set)->fd_bits[(fd-1)>>5] &= ~(1U << ((fd-1)&0x1F)))
344 #define FD_ISSET(fd,set) FD_RD(fd, (set)->fd_bits[(fd-1)>>5] & (1U << ((fd-1)&0x1F)))
345 #define FD_ZERO(set) memset(set, 0, sizeof(*set))
348 typedef struct iovec {
354 typedef struct msghdr {
365 typedef struct cmsghdr {
372 #define CMSG_FIRSTHDR(mhdr) ((mhdr)->msg_controllen >= sizeof(CMSGHDR)) ? \
373 (CMSGHDR *)(mhdr)->msg_control : \
375 #define CMSG_NXTHDR(mhdr,cmsg) (CMSG_ALIGN((uint32_t)(cmsg) + (cmsg)->cmsg_len) + sizeof(CMSGHDR) > \
376 (uint32_t)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
378 (CMSGHDR *)CMSG_ALIGN((uint32_t)(cmsg) + (cmsg)->cmsg_len)
379 #define CMSG_DATA(cmsg) ((uint8_t *)(cmsg) + sizeof(CMSGHDR))
380 #define CMSG_ALIGN(len) (((len) + 3) & ~3U)
381 #define CMSG_LEN(len) ((len) + sizeof(CMSGHDR))
382 #define CMSG_SPACE(len) CMSG_ALIGN((len) + sizeof(CMSGHDR))
387 #define NET_IF_CLASS_ETH (1U << 8)
388 #define NET_IF_CLASS_WIFI (2U << 8)
389 #define NET_IF_CLASS_PPP (3U << 8)
390 #define NET_IF_CLASS_SLIP (4U << 8)
419 #define NET_ETH_SPEED_10M 0
420 #define NET_ETH_SPEED_100M 1
421 #define NET_ETH_SPEED_1G 2
424 #define NET_ETH_DUPLEX_HALF 0
425 #define NET_ETH_DUPLEX_FULL 1
428 typedef struct net_eth_link_info {
467 typedef struct net_wifi_config {
478 typedef struct net_wifi_net_info {
487 typedef struct net_wifi_scan_info {
502 #define NET_DHCP_OPTION_IP_ADDRESS 0
503 #define NET_DHCP_OPTION_NTP_SERVERS 42
504 #define NET_DHCP_OPTION_CLIENT_ID 61
505 #define NET_DHCP_OPTION_BOOTFILE_NAME 67
508 #define NET_DHCP6_OPTION_IP_ADDRESS 0
511 typedef struct net_dhcp_option_item {
534 #define NET_PING_IP4_ONLY 0x01
535 #define NET_PING_IP6_ONLY 0x02
653 #define NET_SMTP_MTA_USETLS 0x01
656 typedef struct net_smtp_mail {
668 typedef struct net_smtp_mta {
698 #define NET_SNMP_MIB_INTEGER 0x02
699 #define NET_SNMP_MIB_OCTET_STR 0x04
700 #define NET_SNMP_MIB_OBJECT_ID 0x06
701 #define NET_SNMP_MIB_IP_ADDR 0x40
702 #define NET_SNMP_MIB_COUNTER 0x41
703 #define NET_SNMP_MIB_GAUGE 0x42
704 #define NET_SNMP_MIB_TIME_TICKS 0x43
705 #define NET_SNMP_MIB_ATR_RO 0x80
706 #define NET_SNMP_MIB_OID_SIZE 17
707 #define NET_SNMP_MIB_STR_SIZE 110
708 #define NET_SNMP_MIB_READ 0
709 #define NET_SNMP_MIB_WRITE 1
712 #define NET_SNMP_MIB_STR(s) sizeof(s)-1, s
713 #define NET_SNMP_MIB_INT(o) sizeof(o), (void *)&o
714 #define NET_SNMP_MIB_IP(ip) 4, (void *)&ip
715 #define NET_SNMP_MIB_OID0(f,s) (f*40 + s)
718 typedef struct net_snmp_mib_info {
724 void (*cb_func)(int32_t mode);
900 #ifdef RTE_Network_Socket_BSD
916 extern int socket (
int family,
int type,
int protocol);
928 extern int bind (
int sock,
const SOCKADDR *addr,
int addrlen);
939 extern int listen (
int sock,
int backlog);
996 extern int send (
int sock,
const char *buf,
int len,
int flags);
1020 extern int sendto (
int sock,
const char *buf,
int len,
int flags,
const SOCKADDR *to,
int tolen);
1041 extern int sendmsg (
int sock,
const MSGHDR *msg,
int flags);
1062 extern int recv (
int sock,
char *buf,
int len,
int flags);
1086 extern int recvfrom (
int sock,
char *buf,
int len,
int flags,
SOCKADDR *from,
int *fromlen);
1165 extern int getsockopt (
int sock,
int level,
int optname,
char *optval,
int *optlen);
1190 extern int setsockopt (
int sock,
int level,
int optname,
const char *optval,
int optlen);
1202 extern int ioctlsocket (
int sock,
long cmd,
unsigned long *argp);
1264 extern int inet_pton (
int af,
const char *src,
void *dst);
1277 extern const char *
inet_ntop (
int af,
const void *src,
char *dst,
int size);
1429 extern void netETH_ReceiveRaw (uint32_t if_num,
const uint8_t *buf, uint32_t len);
1437 extern void netDHCP_Notify (uint32_t if_id, uint8_t option,
const uint8_t *val, uint32_t len);
1445 extern void netDHCP6_Notify (uint32_t if_id, uint8_t option,
const uint8_t *val, uint32_t len);
1681 extern bool netFTPs_FileAccess (uint8_t user_id,
const char *fname, uint32_t access);
1705 extern void *
netFTPs_fopen (
const char *fname,
const char *mode);
1717 extern uint32_t
netFTPs_fread (
void *file, uint8_t *buf, uint32_t len);
1724 extern uint32_t
netFTPs_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
1767 extern uint32_t
netFTPs_ffind (uint8_t code,
char *buf, uint32_t buf_len,
const char *mask);
1802 extern void *
netFTPc_fopen (
const char *fname,
const char *mode);
1814 extern uint32_t
netFTPc_fread (
void *file, uint8_t *buf, uint32_t len);
1821 extern uint32_t
netFTPc_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
1877 extern void *
netTFTPs_fopen (
const char *fname,
const char *mode);
1889 extern uint32_t
netTFTPs_fread (
void *file, uint8_t *buf, uint32_t len);
1896 extern uint32_t
netTFTPs_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
1932 extern void *
netTFTPc_fopen (
const char *fname,
const char *mode);
1944 extern uint32_t
netTFTPc_fread (
void *file, uint8_t *buf, uint32_t len);
1951 extern uint32_t
netTFTPc_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
2236 extern uint32_t
netHTTPs_fread (
void *file, uint8_t *buf, uint32_t len);
2245 extern char *
netHTTPs_fgets (
void *file,
char *buf, uint32_t size);
2252 extern void netHTTPs_fstat (
const char *fname, uint32_t *fsize, uint32_t *ftime);
2287 extern uint32_t
netCGI_Script (
const char *env,
char *buf, uint32_t buf_len, uint32_t *pcgi);
2296 extern const char *
netCGI_GetEnvVar (
const char *env,
char *ansi, uint32_t max_len);
2380 extern uint32_t
netSMTPc_fread (
void *file, uint8_t *buf, uint32_t len);
2449 extern const char *
netIP_ntoa (int16_t addr_type,
const uint8_t *ip_addr,
char *string_buf, uint32_t buf_len);
2462 extern bool netIP_aton (
const char *addr_string, int16_t addr_type, uint8_t *ip_addr);
2470 extern const char *
netMAC_ntoa (
const uint8_t *mac_addr,
char *string_buf, uint32_t buf_len);
2478 extern bool netMAC_aton (
const char *mac_string, uint8_t *mac_addr);
Incorrect login error message.
Definition: rl_net_ds.h:628
Username to login to SMTP server.
Definition: rl_net_ds.h:636
netWiFi_Security
WiFi Security Types.
Definition: rl_net_ds.h:442
netUDP_Option
UDP Socket Options.
Definition: rl_net_ds.h:101
Username request login message.
Definition: rl_net_ds.h:626
void * netFTPs_fopen(const char *fname, const char *mode)
Open a file for reading or writing in FTP server. [interface].
File or Directory name for FTP commands.
Definition: rl_net_ds.h:592
Makes a directory on FTP server.
Definition: rl_net_ds.h:565
netWiFi_Security security
Security type.
Definition: rl_net_ds.h:470
Generic IPv6 Address structure.
Definition: rl_net_ds.h:272
Erroneous response packet.
Definition: rl_net_ds.h:554
netStatus netUDP_Send(int32_t socket, const NET_ADDR *addr, uint8_t *buf, uint32_t len)
Send data to a remote node. [thread-safe].
int sendto(int sock, const char *buf, int len, int flags, const SOCKADDR *to, int tolen)
Send data to endpoint node. [thread-safe].
void * netSMTPc_fopen(const char *fname)
Open a file for reading in SMTP client. [interface].
Probed Host responded.
Definition: rl_net_ds.h:545
netStatus netFTPs_Start(void)
Start FTP server. [thread-safe].
uint32_t(* netUDP_cb_t)(int32_t socket, const NET_ADDR *addr, const uint8_t *buf, uint32_t len)
UDP Event callback function.
Definition: rl_net_ds.h:110
netStatus netDHCP_Disable(uint32_t if_id)
Disable Dynamic Host Configuration at runtime. [thread-safe].
netFTPc_Request
FTP Client Requests.
Definition: rl_net_ds.h:588
Wrong state error.
Definition: rl_net_ds.h:87
Host name successfully resolved.
Definition: rl_net_ds.h:551
BSSID of AP.
Definition: rl_net_ds.h:452
uint16_t Flags
Service control flags.
Definition: rl_net_ds.h:671
netStatus netTCP_ReleaseSocket(int32_t socket)
Release TCP socket and free resources. [thread-safe].
uint32_t netFTPs_ffind(uint8_t code, char *buf, uint32_t buf_len, const char *mask)
Search the file system directory for matching files. [interface].
IN6_ADDR sin6_addr
IP6 address.
Definition: rl_net_ds.h:299
netStatus netSYS_SetHostName(const char *hostname)
Set localhost name. [thread-safe].
netStatus netTCP_SetOption(int32_t socket, netTCP_Option option, uint32_t val)
Set TCP socket IP option. [thread-safe].
With Push Button Configuration.
Definition: rl_net_ds.h:462
netStatus netTELNETs_SetUsername(const char *username)
Set username of the built-in user account. [thread-safe].
uint8_t netHTTPs_GetUserId(void)
Retrieve the user identification. [thread-safe].
bool netFTPs_Running(void)
Check if FTP server is running. [thread-safe].
void netHTTPs_GetUserSecret(uint8_t user_id, char *buf, uint32_t buf_len)
Retrieve the secret word for the selected user. [user-provided].
uint32_t sin6_flowinfo
IP6 flow information.
Definition: rl_net_ds.h:298
Generic IPv4 Address structure.
Definition: rl_net_ds.h:259
uint32_t cmsg_len
Data byte count, including the cmsghdr.
Definition: rl_net_ds.h:366
netWiFi_WPS wps_method
WiFi Protected Setup method.
Definition: rl_net_ds.h:473
uint8_t code
Option type code.
Definition: rl_net_ds.h:512
netStatus netHTTPs_SetUsername(const char *username)
Set username of the built-in user account. [thread-safe].
netStatus netFTPs_SetUsername(const char *username)
Set username of the built-in user account. [thread-safe].
netStatus netIF_GetOption(uint32_t if_id, netIF_Option option, uint8_t *buf, uint32_t buf_len)
Get the current value of an Interface option. [thread-safe].
netStatus netTFTPs_SetRootPath(const char *path)
Set path to the root directory of TFTP server. [thread-safe].
Waiting for last ACK for our FIN.
Definition: rl_net_ds.h:133
uint32_t netCGI_Script(const char *env, char *buf, uint32_t buf_len, uint32_t *pcgi)
Generate dynamic web data based on a CGI script. [user-provided].
netStatus netWiFi_Activate(uint32_t if_num, const NET_WIFI_CONFIG *config)
Activate the WiFi interface. [thread-safe].
bool netTELNETs_Running(void)
Check if the Telnet server is running. [thread-safe].
void netETH_ReceiveRaw(uint32_t if_num, const uint8_t *buf, uint32_t len)
Receive raw Ethernet data. [user-provided].
Operation timeout.
Definition: rl_net_ds.h:93
void * netFTPc_fopen(const char *fname, const char *mode)
Open local file for reading or writing in FTP client. [interface].
BSD scatter/gather array of items.
Definition: rl_net_ds.h:348
uint8_t netTELNETs_GetUserId(void)
Retrieve the user identification number. [thread-safe].
void netFTPs_fclose(void *file)
Close a file previously open in FTP server. [interface].
Not used.
Definition: rl_net_ds.h:461
uint8_t * value
Pointer to Option value.
Definition: rl_net_ds.h:514
DNS host resolver failed.
Definition: rl_net_ds.h:91
netFTP_Command
FTP Commands.
Definition: rl_net_ds.h:558
int closesocket(int sock)
Close socket and release socket descriptor. [thread-safe].
bool netHTTPs_LoginActive(void)
Determine if the HTTP server authentication is enabled. [thread-safe].
netStatus netPPP_Listen(const char *username, const char *password)
Start PPP interface to accept incoming PPP connection. [thread-safe].
int32_t cmsg_type
Protocol-specific type.
Definition: rl_net_ds.h:368
netStatus netUDP_Open(int32_t socket, uint16_t port)
Open UDP socket for communication. [thread-safe].
netTCP_Event
TCP Socket Events.
Definition: rl_net_ds.h:113
BSD Host Entry structure.
Definition: rl_net_ds.h:311
Requested file operation denied.
Definition: rl_net_ds.h:581
IN_ADDR sin_addr
IP address.
Definition: rl_net_ds.h:290
IP version 6.
Definition: rl_net_ds.h:415
IPv6 Static Address (16 bytes)
Definition: rl_net_ds.h:404
#define NET_ADDR_IP4_LEN
IPv4 Address Length in bytes.
Definition: rl_net_ds.h:46
uint32_t netHTTPs_fread(void *file, uint8_t *buf, uint32_t len)
Read block of data from a file in HTTP server. [interface].
netStatus netTFTPs_Start(void)
Start the TFTP server. [thread-safe].
const char * Address
Server address (FQDN or IP address)
Definition: rl_net_ds.h:669
netStatus netSLIP_Close(void)
Disconnect SLIP link between two modems. [thread-safe].
const char * netCGX_ContentType(void)
Override default Content-Type for CGX script files. [user-provided].
Previously send data acknowledged.
Definition: rl_net_ds.h:118
TCP Delayed Acknowledgment; val: 0=disabled (default), 1=enabled.
Definition: rl_net_ds.h:145
Stateless DHCPv6 mode.
Definition: rl_net_ds.h:523
void netHTTPs_fclose(void *file)
Close a file previously open in HTTP server. [interface].
netDNSc_Event
DNS Client Callback Events.
Definition: rl_net_ds.h:550
netStatus netETH_SendRaw(uint32_t if_num, const uint8_t *buf, uint32_t len)
Send raw Ethernet data. [thread-safe].
void netCGI_ProcessData(uint8_t code, const char *data, uint32_t len)
Process data received by POST request. [user-provided].
netStatus netDHCP6_Enable(uint32_t if_id, netDHCP6_Mode mode)
Enable Dynamic Host Configuration version 6 at runtime. [thread-safe].
netSNTPc_Mode
SNTP Client Mode.
Definition: rl_net_ds.h:677
netWiFi_WPS
WiFi WPS Methods.
Definition: rl_net_ds.h:460
netStatus netTELNETs_RequestMessage(int32_t session)
Request unsolicited message processing in netTELNETs_ProcessMessage function. [thread-safe].
DHCP Option Item.
Definition: rl_net_ds.h:511
netStatus netSMTPc_SendMail(const NET_SMTP_MAIL *mail, const NET_SMTP_MTA *mta)
Send an email in blocking mode. [thread-safe].
uint8_t type
Object Type.
Definition: rl_net_ds.h:719
const char * netHTTPs_GetRootPath(void)
Retrieve path to the root directory of HTTP server. [thread-safe].
netStatus netUDP_Close(int32_t socket)
Stop UDP communication and close socket. [thread-safe].
netStatus netPing_Echo(const NET_ADDR *addr, netPing_cb_t cb_func)
Start ICMP ping process. [thread-safe].
bool netFTPs_FileAccess(uint8_t user_id, const char *fname, uint32_t access)
Check if remote user is allowed to access a file on FTP server. [user-provided].
Stateful DHCPv6 mode.
Definition: rl_net_ds.h:524
File operation successful.
Definition: rl_net_ds.h:613
int inet_aton(const char *cp, IN_ADDR *addr)
Convert from text address to a network address. [thread-safe].
uint8_t reserved
Reserved.
Definition: rl_net_ds.h:472
#define FD_SETSIZE
BSD fd_set size.
Definition: rl_net_ds.h:324
IPv4 Socket Address structure.
Definition: rl_net_ds.h:287
const char * Cc
Carbon copy recipient(s), can be NULL.
Definition: rl_net_ds.h:659
File not found.
Definition: rl_net_ds.h:605
const char * netHTTPs_GetLanguage(void)
Retrieve the preferred language setting from the browser. [thread-safe].
Beacon interval.
Definition: rl_net_ds.h:456
Connection is for some reason aborted.
Definition: rl_net_ds.h:117
Unspecified error.
Definition: rl_net_ds.h:85
bool netMAC_aton(const char *mac_string, uint8_t *mac_addr)
Convert MAC address from text to binary form. [thread-safe].
netStatus netFTPs_Stop(void)
Stop FTP server. [thread-safe].
Operation succeeded.
Definition: rl_net_ds.h:83
int recvmsg(int sock, MSGHDR *msg, int flags)
Receive a message from a socket. [thread-safe].
netStatus netSNMP_Trap(const NET_ADDR *addr, uint8_t generic, uint8_t specific, const uint16_t *obj_list)
Send a trap message to the Trap Manager. [thread-safe].
Unicast mode to access public NTP server.
Definition: rl_net_ds.h:678
BSD message header structure.
Definition: rl_net_ds.h:354
Ethernet link information.
Definition: rl_net_ds.h:428
DTIM interval.
Definition: rl_net_ds.h:455
void(* netPing_cb_t)(netPing_Event event)
Ping Event callback function.
Definition: rl_net_ds.h:683
void netTFTPs_fclose(void *file)
Close a file previously open in the TFTP server. [interface].
const char * ssid
Network name, a null-terminated string.
Definition: rl_net_ds.h:468
int inet_pton(int af, const char *src, void *dst)
Convert from text address to a binary network address. [thread-safe].
void(* netNDP_cb_t)(netNDP_Event event)
NDP Probe Event callback function.
Definition: rl_net_ds.h:689
uint16_t netFTPs_GetPort(void)
Get port number of FTP server. [thread-safe].
Email address of the recipient.
Definition: rl_net_ds.h:639
netStatus netNDP_GetIP(uint32_t if_id, const uint8_t *mac_addr, uint8_t *ip6_addr)
Get IP address from neighbor discovery cache. [thread-safe].
int getpeername(int sock, SOCKADDR *name, int *namelen)
Retrieve IP address and port number of the endpoint node. [thread-safe].
Password to login to SMTP server.
Definition: rl_net_ds.h:637
uint8_t oid_len
Object ID length.
Definition: rl_net_ds.h:720
Timeout, no response to NDP probe.
Definition: rl_net_ds.h:546
const char * netHTTPs_GetPassword(void)
Retrieve password of the built-in user account. [thread-safe].
uint8_t * netUDP_GetBuffer(uint32_t size)
Allocate memory for UDP send buffer. [thread-safe].
void netTFTPc_Notify(netTFTPc_Event event)
Notify the user application when TFTP client operation ends. [user-provided].
uint32_t(* netTCP_cb_t)(int32_t socket, netTCP_Event event, const NET_ADDR *addr, const uint8_t *buf, uint32_t len)
TCP Event callback function.
Definition: rl_net_ds.h:149
File download ended.
Definition: rl_net_ds.h:575
TCP Keep Alive; val: 0=disabled (default), 1=enabled.
Definition: rl_net_ds.h:143
uint32_t iov_len
Number of bytes to transfer.
Definition: rl_net_ds.h:350
netStatus netARP_GetIP(uint32_t if_id, const uint8_t *mac_addr, uint8_t *ip4_addr)
Get IP address from the ARP cache. [thread-safe].
uint8_t netFTPs_CheckUsername(const char *username)
Check if an user account exists in the user database. [user-provided].
netStatus netHTTPs_Stop(void)
Stop the HTTP server. [thread-safe].
const char * netSYS_GetHostName(void)
Retrieve localhost name. [thread-safe].
netStatus netHTTPs_SetPort(uint16_t port)
Set port number of the HTTP server. [thread-safe].
File not found.
Definition: rl_net_ds.h:616
netFTPc_Event
FTP Client Events.
Definition: rl_net_ds.h:600
netPing_Event
Ping Callback Events.
Definition: rl_net_ds.h:528
Received data if LIST command is given.
Definition: rl_net_ds.h:595
Transmit Power.
Definition: rl_net_ds.h:453
void netFTPs_Notify(netFTPs_Event event)
Notify the user application about events in FTP server service. [user-provided].
netStatus netHTTPs_SetRootPath(const char *path)
Set path to the root directory of HTTP server. [thread-safe].
netStatus netSNTPc_GetTime(const NET_ADDR *addr, netSNTPc_cb_t cb_func)
Determine current time from NTP or SNTP time server. [thread-safe].
int connect(int sock, const SOCKADDR *addr, int addrlen)
Connect a socket to a remote host. [thread-safe].
uint16_t Port
Server port number, can be 0.
Definition: rl_net_ds.h:670
netStatus netUDP_SetOption(int32_t socket, netUDP_Option option, uint32_t val)
Set UDP socket IP option. [thread-safe].
IPv4 Type of Service; val=TOS.
Definition: rl_net_ds.h:102
uint32_t tv_usec
Time interval: microseconds.
Definition: rl_net_ds.h:334
User login failed (invalid credentials)
Definition: rl_net_ds.h:574
TCP Connection established.
Definition: rl_net_ds.h:135
Local file operation error.
Definition: rl_net_ds.h:582
bool netIP_aton(const char *addr_string, int16_t addr_type, uint8_t *ip_addr)
Convert IP address from text to binary form. [thread-safe].
SMTP Email Descriptor.
Definition: rl_net_ds.h:656
NET_DHCP_OPTION_ITEM netDHCP_PrivateOptionsTableN[]
DHCP Private Options.
Authentication failed, username/password invalid.
Definition: rl_net_ds.h:648
void * msg_control
Ancillary data.
Definition: rl_net_ds.h:359
uint32_t netTFTPc_fread(void *file, uint8_t *buf, uint32_t len)
Read block of data from local file in the TFTP client. [interface].
bool netFTPs_mkdir(const char *path)
Make a new directory in FTP server. [interface].
uint32_t msg_controllen
Ancillary data buffer length.
Definition: rl_net_ds.h:360
Local file read/write error.
Definition: rl_net_ds.h:607
void netDHCP6_Notify(uint32_t if_id, uint8_t option, const uint8_t *val, uint32_t len)
Notify the user of DHCPv6 event or extended DHCPv6 option. [user-provided].
Generic file operation error.
Definition: rl_net_ds.h:583
Socket waiting for incoming connection.
Definition: rl_net_ds.h:127
netTCP_State netTCP_GetState(int32_t socket)
Determine current state of a TCP socket. [thread-safe].
netStatus netIGMP_Leave(uint32_t if_id, const uint8_t *ip4_addr)
Leave a host group specified with IP address. [thread-safe].
const char * netMAC_ntoa(const uint8_t *mac_addr, char *string_buf, uint32_t buf_len)
Convert MAC address from binary to text form. [thread-safe].
int accept(int sock, SOCKADDR *addr, int *addrlen)
Accept connect request for a listening socket. [thread-safe].
Unknown security.
Definition: rl_net_ds.h:447
void(* netSNTPc_cb_t)(uint32_t seconds, uint32_t seconds_fraction)
SNTP Client callback function.
Definition: rl_net_ds.h:695
Renames a file on FTP server.
Definition: rl_net_ds.h:564
Login timeout error message.
Definition: rl_net_ds.h:629
Wired Equivalent Privacy.
Definition: rl_net_ds.h:444
netWiFi_Option
WiFi Driver Options.
Definition: rl_net_ds.h:451
netStatus netWiFi_GetOption(uint32_t if_num, netWiFi_Option option, void *buf, uint32_t buf_len)
Get the value of the WiFi driver option. [thread-safe].
Temporary IP address is removed after timeout.
Definition: rl_net_ds.h:498
uint32_t netFTPs_fwrite(void *file, const uint8_t *buf, uint32_t len)
Write block of data to a file in FTP server. [interface].
Our FIN ACK-ed, waiting for remote FIN.
Definition: rl_net_ds.h:131
uint32_t msg_namelen
Size of address buffer.
Definition: rl_net_ds.h:356
const char * inet_ntoa(IN_ADDR in)
Convert from network address to a text string. [not_thread-safe].
WiFi Scan information.
Definition: rl_net_ds.h:487
User logged out, session is idle.
Definition: rl_net_ds.h:573
uint32_t netTFTPs_fread(void *file, uint8_t *buf, uint32_t len)
Read block of data from a file in the TFTP server. [interface].
int16_t addr_type
IP address type: NET_ADDR_IP4 or NET_ADDR_IP6.
Definition: rl_net_ds.h:58
Connection established event.
Definition: rl_net_ds.h:115
bool netSMTPc_AcceptAuthentication(const NET_ADDR *addr)
Accept or deny authentication requested by SMTP server. [user-provided].
Probed Host responded.
Definition: rl_net_ds.h:539
Connect request received event.
Definition: rl_net_ds.h:114
uint8_t netFTPs_GetUserId(void)
Retrieve the user identification number. [thread-safe].
bool netPPP_LinkUp(void)
Determine the state of PPP link. [thread-safe].
void * netHTTPs_fopen(const char *fname)
Open a file for reading in HTTP server. [interface].
const char * netFTPs_GetUsername(void)
Retrieve username of the built-in user account. [thread-safe].
netStatus netTCP_Abort(int32_t socket)
Instantly stop TCP communication. [thread-safe].
netStatus netTCP_Connect(int32_t socket, const NET_ADDR *addr, uint16_t local_port)
Initiate a TCP connection to a remote node. [thread-safe].
netStatus netDNSc_GetHostByNameX(const char *name, int16_t addr_type, NET_ADDR *addr)
Resolve IP address of a host from a hostname in blocking mode. [thread-safe].
netStatus netTELNETs_GetClient(NET_ADDR *addr, uint32_t addr_len)
Get IP address and port number of a connected Telnet client. [thread-safe].
File operation successful.
Definition: rl_net_ds.h:601
const char * Subject
Subject of email, can be NULL.
Definition: rl_net_ds.h:661
Network Address IPv4 only.
Definition: rl_net_ds.h:64
netETH_Event
Ethernet Callback Events.
Definition: rl_net_ds.h:434
BSD timeval structure.
Definition: rl_net_ds.h:332
void netDHCP_Notify(uint32_t if_id, uint8_t option, const uint8_t *val, uint32_t len)
Notify the user of DHCP event or extended DHCP option. [user-provided].
Timer Alarm (PTP)
Definition: rl_net_ds.h:438
const char * Encoding
Default encoding type, can be NULL.
Definition: rl_net_ds.h:664
netStatus netDHCP_SetOption(uint32_t if_id, uint8_t option, const uint8_t *val, uint32_t len)
Set DHCP Option value at runtime. [thread-safe].
netARP_CacheType
ARP Cache Entry types.
Definition: rl_net_ds.h:496
bool netSLIP_LinkUp(void)
Determine the state of SLIP link. [thread-safe].
int listen(int sock, int backlog)
Set a socket in a listening mode. [thread-safe].
uint8_t netTELNETs_CheckUsername(const char *username)
Check if an user account exist in the user database. [user-provided].
void * netTFTPc_fopen(const char *fname, const char *mode)
Open local file for reading or writing in the TFTP client. [interface].
netIF_Version
Interface IP Versions.
Definition: rl_net_ds.h:413
#define NET_ADDR_IP6_LEN
IPv6 Address Length in bytes.
Definition: rl_net_ds.h:47
IPv4 Type of Service; val=TOS.
Definition: rl_net_ds.h:140
const char * netTFTPs_GetRootPath(void)
Retrieve path to the root directory of TFTP server. [thread-safe].
const char * netCGI_Charset(void)
Override default character encoding in HTML documents. [user-provided].
netStatus netTELNETs_Stop(void)
Stop the Telnet server. [thread-safe].
IPv6 Maximum Transmission Unit (2 bytes)
Definition: rl_net_ds.h:402
netStatus netSLIP_Listen(void)
Start SLIP interface to accept incoming SLIP connections. [thread-safe].
int16_t sin6_family
Socket domain.
Definition: rl_net_ds.h:296
netDHCP6_Mode
DHCPv6 Modes.
Definition: rl_net_ds.h:522
uint32_t netTFTPc_fwrite(void *file, const uint8_t *buf, uint32_t len)
Write block of data to local file in the TFTP client. [interface].
WiFi Protected Access 2.
Definition: rl_net_ds.h:446
WiFi Configuration.
Definition: rl_net_ds.h:467
Username to login to FTP server.
Definition: rl_net_ds.h:589
Received FIN independently of our FIN.
Definition: rl_net_ds.h:132
int getsockname(int sock, SOCKADDR *name, int *namelen)
Retrieve local IP address and port number. [thread-safe].
bool netHTTPs_FileAccess(uint8_t user_id, const char *fname)
Check if remote user is allowed to access a file on HTTP server. [user-provided]. ...
netStatus netWiFi_GetNetInfo(uint32_t if_num, NET_WIFI_NET_INFO *net_info)
Get the network information of the WiFi interface. [thread-safe].
Login error, username/password invalid.
Definition: rl_net_ds.h:603
SNMP-MIB Entry information.
Definition: rl_net_ds.h:718
Generic FTP client error.
Definition: rl_net_ds.h:608
netARP_Event
ARP Probe Callback Events.
Definition: rl_net_ds.h:538
netStatus netTELNETs_LoginOnOff(bool login)
Enable or disable Telnet server authentication. [thread-safe].
int32_t msg_flags
Flags on received message.
Definition: rl_net_ds.h:361
IPv6 Traffic Class; val=TrafficClass.
Definition: rl_net_ds.h:104
bool netFTPs_frename(const char *fname, const char *newname)
Rename a file or directory in FTP server. [interface].
netStatus netDNSc_ClearCache(void)
Flush or clear the local DNS cache. [thread-safe].
netStatus netSNTPc_SetMode(netSNTPc_Mode mode)
Set mode of operation for SNTP client. [thread-safe].
Local file read/write error.
Definition: rl_net_ds.h:618
Subject of email.
Definition: rl_net_ds.h:640
netStatus netFTPs_SetPassword(const char *password)
Reset password of the built-in user account. [thread-safe].
netStatus netPPP_Connect(const char *dial_num, const char *username, const char *password)
Start a dial-up connection to remote PPP server. [thread-safe].
Driver error.
Definition: rl_net_ds.h:88
Timeout resolving host.
Definition: rl_net_ds.h:552
void netFTPc_Notify(netFTPc_Event event)
Notify the user application when FTP client operation ends. [user-provided].
Invalid parameter specified.
Definition: rl_net_ds.h:86
Working directory path on server for all commands.
Definition: rl_net_ds.h:591
uint8_t * netTCP_GetBuffer(uint32_t size)
Allocate memory for TCP send buffer. [thread-safe].
netStatus netTFTPs_Stop(void)
Stop the TFTP server. [thread-safe].
uint8_t netHTTPs_CheckAccount(const char *username, const char *password)
Check if an user account exist in the user database. [user-provided].
const char * Attachment
Email attachment(s), can be NULL.
Definition: rl_net_ds.h:663
User authentication failed.
Definition: rl_net_ds.h:90
uint16_t sin_port
Port.
Definition: rl_net_ds.h:289
File access not allowed.
Definition: rl_net_ds.h:604
bool netWiFi_IsConnected(uint32_t if_num)
Get the connection state of the WiFi interface. [thread-safe].
bool netFTPs_AcceptClient(const NET_ADDR *addr)
Accept or deny connection from remote FTP client. [user-provided].
Generic FTP server error.
Definition: rl_net_ds.h:584
netStatus netARP_CacheIP(uint32_t if_id, const uint8_t *ip4_addr, netARP_CacheType type)
Determine whether the ARP table has MAC address resolved for requested IP address. [thread-safe].
Fixed IP address is refreshed after timeout.
Definition: rl_net_ds.h:497
New File or Directory name for RENAME command.
Definition: rl_net_ds.h:593
Generic TFTP client error.
Definition: rl_net_ds.h:619
bool netTELNETs_CheckCommand(const char *cmd, const char *user_cmd)
Check command string for a command. [thread-safe].
uint8_t length
Length of Option value.
Definition: rl_net_ds.h:513
IPv4 Secondary DNS (4 bytes)
Definition: rl_net_ds.h:401
uint16_t netTFTPs_GetPort(void)
Get port number of the TFTP server. [thread-safe].
netSMTPc_Request
SMTP Client Request.
Definition: rl_net_ds.h:635
Prompt message.
Definition: rl_net_ds.h:630
Local filename (including path)
Definition: rl_net_ds.h:596
IPv4 Maximum Transmission Unit (2 bytes)
Definition: rl_net_ds.h:396
netStatus
Status code values returned by Network library functions.
Definition: rl_net_ds.h:82
Open.
Definition: rl_net_ds.h:443
With PIN.
Definition: rl_net_ds.h:463
IPv6 Socket Address structure.
Definition: rl_net_ds.h:295
netStatus netDHCP_Enable(uint32_t if_id)
Enable Dynamic Host Configuration at runtime. [thread-safe].
const char * netTELNETs_GetPassword(void)
Retrieve password of the built-in user account. [thread-safe].
netTELNETs_Message
Telnet Server Messages.
Definition: rl_net_ds.h:623
int16_t ss_family
Address family.
Definition: rl_net_ds.h:304
File deleted.
Definition: rl_net_ds.h:577
Timed waiting for 2MSL.
Definition: rl_net_ds.h:134
netStatus netNDP_GetMAC(uint32_t if_id, const uint8_t *ip6_addr, uint8_t *mac_addr)
Get MAC address from neighbor discovery cache. [thread-safe].
bool netFTPs_CheckPassword(uint8_t user_id, const char *password)
Check user account password in the user database. [user-provided].
const char * Message
Email message body, can be NULL.
Definition: rl_net_ds.h:662
bool netTELNETs_CheckPassword(uint8_t user_id, const char *password)
Check user account password in the user database. [user-provided].
Network Address IPv4/IPv6 capable.
Definition: rl_net_ds.h:57
IPv6 Multi-cast Hop Limit; val=HopLimit.
Definition: rl_net_ds.h:105
netStatus netDHCP6_Disable(uint32_t if_id)
Disable Dynamic Host Configuration version 6 at runtime. [thread-safe].
netStatus netWiFi_Deactivate(uint32_t if_num)
Deactivate the WiFi interface. [thread-safe].
uint32_t netTCP_GetTimer(int32_t socket)
Determine TCP socket connection timeout. [thread-safe].
int16_t sin_family
Socket domain.
Definition: rl_net_ds.h:288
const char * To
Recipient(s), can be NULL.
Definition: rl_net_ds.h:658
char * h_name
Official name of host.
Definition: rl_net_ds.h:312
Socket Address storage structure.
Definition: rl_net_ds.h:303
void netFTPc_fclose(void *file)
Close local file previously open in FTP client. [interface].
Unsolicited message (triggered by netTELNETs_RequestMessage)
Definition: rl_net_ds.h:631
void * msg_name
Optional pointer to source address.
Definition: rl_net_ds.h:355
void netSMTPc_fclose(void *file)
Close a file previously open in SMTP client. [interface].
netStatus netNDP_CacheIP(uint32_t if_id, const uint8_t *ip6_addr)
Determine whether neighbor cache has MAC address resolved for requested IP address. [thread-safe].
int send(int sock, const char *buf, int len, int flags)
Send data on already connected socket. [thread-safe].
BSD fd_set structure.
Definition: rl_net_ds.h:327
netStatus netTELNETs_RepeatCommand(uint32_t delay)
Request a repeated call to netTELNETs_ProcessCommand function. [thread-safe].
netSMTPc_Event
SMTP Client Events.
Definition: rl_net_ds.h:645
netStatus netFTPc_Connect(const NET_ADDR *addr, netFTP_Command command)
Start FTP client file operation session. [thread-safe].
int32_t __ss_align
reserved, structure alignment
Definition: rl_net_ds.h:306
Invalid Socket.
Definition: rl_net_ds.h:124
int sendmsg(int sock, const MSGHDR *msg, int flags)
Send a message to endpoint node. [thread-safe].
int ioctlsocket(int sock, long cmd, unsigned long *argp)
Control IO mode of a socket. [thread-safe].
IPv6 Default Gateway (16 bytes)
Definition: rl_net_ds.h:407
const char * netIP_ntoa(int16_t addr_type, const uint8_t *ip_addr, char *string_buf, uint32_t buf_len)
Convert IP address from binary to text form. [thread-safe].
int16_t h_addrtype
Address Type: AF_INET, AF_NETBIOS.
Definition: rl_net_ds.h:314
Append file on FTP server (with create)
Definition: rl_net_ds.h:561
netStatus netInitialize(void)
Initialize Network Component and interfaces. [not_thread-safe].
uint8_t var_size
Size of a variable.
Definition: rl_net_ds.h:722
Close started FIN packet was sent.
Definition: rl_net_ds.h:130
netStatus netARP_Probe(uint32_t if_id, const uint8_t *ip4_addr, netARP_cb_t cb_func)
Determine whether the IP address is already in use. [thread-safe].
const char * netCGI_ContentType(const char *file_ext)
Add custom MIME type for unsupported file types. [user-provided].
netFTPs_Event
FTP Server Events.
Definition: rl_net_ds.h:571
netNDP_Event
NDP Probe Callback Events.
Definition: rl_net_ds.h:544
netStatus netHTTPs_SetPassword(const char *password)
Reset password of the built-in user account. [thread-safe].
File access not allowed.
Definition: rl_net_ds.h:615
void netETH_Notify(uint32_t if_num, netETH_Event event, uint32_t val)
Notify the user of Ethernet link state change event. [user-provided].
uint32_t netSMTPc_Process(netSMTPc_Request request, char *buf, uint32_t buf_len, uint32_t *pvar)
Request parameters for SMTP client session. [user-provided].
Ethernet MAC Address (6 bytes)
Definition: rl_net_ds.h:394
const char * password
Password, a null-terminated string.
Definition: rl_net_ds.h:469
bool netTFTPs_AcceptClient(const NET_ADDR *addr)
Accept or deny connection from a remote TFTP client. [user-provided].
netStatus netWiFi_SetOption(uint32_t if_num, netWiFi_Option option, const void *buf, uint32_t buf_len)
Set the value of the WiFi driver option. [thread-safe].
uint16_t netTCP_GetLocalPort(int32_t socket)
Retrieve local port number of TCP socket. [thread-safe].
File or directory renamed.
Definition: rl_net_ds.h:578
uint16_t port
Internet socket port number.
Definition: rl_net_ds.h:59
char ** h_addr_list
Pointer to an array of IPv4 addresses.
Definition: rl_net_ds.h:316
const char * netFTPs_GetRootPath(void)
Retrieve path to the root directory of FTP server. [thread-safe].
netStatus netPPP_Close(void)
Disconnect PPP link between two modems. [thread-safe].
void * var
Pointer to a variable.
Definition: rl_net_ds.h:723
IPv4 Subnet mask (4 bytes)
Definition: rl_net_ds.h:398
Initial welcome message.
Definition: rl_net_ds.h:624
netStatus netTCP_Listen(int32_t socket, uint16_t port)
Open TCP socket for incoming connection. [thread-safe].
netStatus netSMTPc_Connect(const NET_ADDR *addr)
Start SMTP client to send an email in legacy mode. [thread-safe].
Ethernet VLAN Identifier (2 bytes)
Definition: rl_net_ds.h:395
uint32_t fd_bits[(FD_SETSIZE+31)>>5]
Set of sockets bit-mask.
Definition: rl_net_ds.h:328
IPv6 Primary DNS (16 bytes)
Definition: rl_net_ds.h:408
Broadcast mode for local LAN.
Definition: rl_net_ds.h:679
uint32_t netTELNETs_ProcessMessage(netTELNETs_Message msg, char *buf, uint32_t buf_len)
Request a message for a Telnet server session. [user-provided].
netStatus netTELNETs_Start(void)
Start the Telnet server. [thread-safe].
void * netTFTPs_fopen(const char *fname, const char *mode)
Open a file for reading or writing in the TFTP server. [interface].
uint32_t netFTPc_fwrite(void *file, const uint8_t *buf, uint32_t len)
Write block of data to local file in FTP client. [interface].
IPv6 Secondary DNS (16 bytes)
Definition: rl_net_ds.h:409
void netHTTPs_fstat(const char *fname, uint32_t *fsize, uint32_t *ftime)
Retrieve file size and last modification time. [interface].
Pinged Host responded.
Definition: rl_net_ds.h:529
netStatus netPing_EchoX(const char *target, uint32_t flags)
Start ICMP ping process in blocking mode. [thread-safe].
void netSMTPc_Notify(netSMTPc_Event event)
Notify the user application when SMTP client operation ends. [user-provided].
Process is busy.
Definition: rl_net_ds.h:84
Entry allocated, socket still closed.
Definition: rl_net_ds.h:126
uint32_t netFTPs_fread(void *file, uint8_t *buf, uint32_t len)
Read block of data from a file in FTP server. [interface].
Email address of the sender.
Definition: rl_net_ds.h:638
Link up; val=link_info.
Definition: rl_net_ds.h:436
netStatus netTCP_Send(int32_t socket, uint8_t *buf, uint32_t len)
Send a data packet to remote node. [thread-safe].
const char * From
Sender address, can be NULL.
Definition: rl_net_ds.h:657
UDP Checksum Options.
Definition: rl_net_ds.h:106
Deletes a file on FTP server.
Definition: rl_net_ds.h:562
uint16_t sa_family
Address family.
Definition: rl_net_ds.h:246
SMTP Mail Transfer Agent Descriptor.
Definition: rl_net_ds.h:668
int recv(int sock, char *buf, int len, int flags)
Receive data on already connected socket. [thread-safe].
bool netFTPs_fdelete(const char *fname)
Delete a file in FTP server. [interface].
bool netHTTPs_AcceptClient(const NET_ADDR *addr)
Accept or deny a connection from a remote HTTP client. [user-provided].
const char * netCGI_GetEnvVar(const char *env, char *ansi, uint32_t max_len)
Process environment variables and convert to ANSI format. [thread-safe].
uint32_t tv_sec
Time interval: seconds.
Definition: rl_net_ds.h:333
File filter/mask for LIST command (wildcards allowed)
Definition: rl_net_ds.h:594
uint8_t netDHCP_PrivateOptionsCountN
Number of DHCP Private Options.
SYN frame received.
Definition: rl_net_ds.h:128
bool netFTPs_rmdir(const char *path)
Remove an empty directory in FTP server. [interface].
User logged in, session is busy.
Definition: rl_net_ds.h:572
Directory created.
Definition: rl_net_ds.h:579
netStatus netTFTPc_Get(const NET_ADDR *addr, const char *fname, const char *local_fname)
Retrieve a file from a remote TFTP server. [thread-safe].
const char * Bcc
Blind carbon copy recipient(s), can be NULL.
Definition: rl_net_ds.h:660
IP version 4.
Definition: rl_net_ds.h:414
File not found or file r/w error.
Definition: rl_net_ds.h:92
Email successfully sent.
Definition: rl_net_ds.h:646
uint32_t netTFTPs_fwrite(void *file, const uint8_t *buf, uint32_t len)
Write block of data to a file in the TFTP server. [interface].
int32_t netUDP_GetSocket(netUDP_cb_t cb_func)
Allocate a free UDP socket. [thread-safe].
bool netFTPs_LoginActive(void)
Determine if FTP server authentication is enabled. [thread-safe].
uint16_t netHTTPs_GetPort(void)
Get port number of the HTTP server. [thread-safe].
uint32_t netFTPc_Process(netFTPc_Request request, char *buf, uint32_t buf_len)
Request parameters for FTP client session. [user-provided].
const char * wps_pin
WPS PIN, a null-terminated string.
Definition: rl_net_ds.h:474
const char * netHTTPs_GetContentType(void)
Get Content-Type HTML header, received in XML post request. [thread-safe].
Password request login message.
Definition: rl_net_ds.h:627
netStatus netIGMP_Join(uint32_t if_id, const uint8_t *ip4_addr)
Join this host to a host group specified with IP address. [thread-safe].
IPv4 Primary DNS (4 bytes)
Definition: rl_net_ds.h:400
IPv4 Address (4 bytes)
Definition: rl_net_ds.h:397
Login message, if authentication is enabled.
Definition: rl_net_ds.h:625
netTCP_Option
TCP Socket Options.
Definition: rl_net_ds.h:139
netStatus netSNMP_SetMIB_Table(const NET_SNMP_MIB_INFO *info, uint32_t size)
Register MIB table to SNMP Agent. [thread-safe].
int setsockopt(int sock, int level, int optname, const char *optval, int optlen)
Manipulate options for the socket. [thread-safe].
netStatus netTCP_ResetReceiveWindow(int32_t socket)
Reset TCP window size to a default value from the configuration. [thread-safe].
void(* netDNSc_cb_t)(netDNSc_Event event, const NET_ADDR *addr)
DNS Client Event callback function.
Definition: rl_net_ds.h:692
uint8_t rssi
Received Signal Strength Indicator.
Definition: rl_net_ds.h:483
uint32_t netTCP_GetMaxSegmentSize(int32_t socket)
Determine maximum number of data bytes that can be sent in TCP packet. [thread-safe].
netStatus netIF_SetOption(uint32_t if_id, netIF_Option option, const uint8_t *buf, uint32_t buf_len)
Set the value of an Interface option. [thread-safe].
SYN packet sent to establish a connection.
Definition: rl_net_ds.h:129
Server error.
Definition: rl_net_ds.h:89
Connection was properly closed.
Definition: rl_net_ds.h:116
int socket(int family, int type, int protocol)
Create a communication endpoint called socket. [thread-safe].
void netCGI_ProcessQuery(const char *qstr)
Process query string received by GET request. [user-provided].
Timeout, no response to ARP probe.
Definition: rl_net_ds.h:540
netStatus netTFTPs_SetPort(uint16_t port)
Set port number of the TFTP server. [thread-safe].
void netTFTPc_fclose(void *file)
Close local file previously open in the TFTP client. [interface].
uint32_t netSMTPc_fread(void *file, uint8_t *buf, uint32_t len)
Read block of data from a file in SMTP client. [interface].
IPv4 Multi-cast Time to Live; val=TTL.
Definition: rl_net_ds.h:103
const char * Username
Account user name, can be NULL.
Definition: rl_net_ds.h:672
Disk full.
Definition: rl_net_ds.h:617
Generic Socket Address structure.
Definition: rl_net_ds.h:245
Low Power deep-sleep timer.
Definition: rl_net_ds.h:454
const char * inet_ntop(int af, const void *src, char *dst, int size)
Convert from binary network address to a text string. [thread-safe].
Link down.
Definition: rl_net_ds.h:435
netStatus netHTTPs_GetClient(NET_ADDR *addr, uint32_t addr_len)
Get IP address and port number of a connected remote HTTP client. [thread-safe].
IPv6 Subnet Prefix-length (1 byte)
Definition: rl_net_ds.h:406
const char * netTELNETs_GetUsername(void)
Retrieve username of the built-in user account. [thread-safe].
netStatus netSNTPc_GetTimeX(const char *server, uint32_t *seconds, uint32_t *seconds_fraction)
Determine current time from NTP or SNTP time server in blocking mode. [thread-safe].
BSD cmsg header structure.
Definition: rl_net_ds.h:365
IPv6 Link-local Address (16 bytes)
Definition: rl_net_ds.h:403
netStatus netNDP_Probe(uint32_t if_id, const uint8_t *ip6_addr, netNDP_cb_t cb_func)
Determine whether the IP address is already in use. [thread-safe].
void * iov_base
Starting address.
Definition: rl_net_ds.h:349
char * netHTTPs_fgets(void *file, char *buf, uint32_t size)
Read a string from a file in HTTP server. [interface].
Timeout on file operation.
Definition: rl_net_ds.h:614
Password to login to FTP server.
Definition: rl_net_ds.h:590
netStatus netHTTPs_Start(void)
Start the HTTP server. [thread-safe].
int getsockopt(int sock, int level, int optname, char *optval, int *optlen)
Retrieve options for the socket. [thread-safe].
netTFTPc_Event
TFTP Client Events.
Definition: rl_net_ds.h:612
HOSTENT * gethostbyname(const char *name, int *err)
Retrieve host IP address from host name. [thread-safe].
WiFi Network information.
Definition: rl_net_ds.h:478
netIF_Option
Interface Option codes.
Definition: rl_net_ds.h:393
Wake-up (on Magic Packet)
Definition: rl_net_ds.h:437
uint32_t netFTPc_fread(void *file, uint8_t *buf, uint32_t len)
Read block of data from local file in FTP client. [interface].
netStatus netTELNETs_SetPort(uint16_t port)
Set port number of the Telnet server. [thread-safe].
const char * Password
Account password, can be NULL.
Definition: rl_net_ds.h:673
uint32_t netTELNETs_ProcessCommand(const char *cmd, char *buf, uint32_t buf_len, uint32_t *pvar)
Process and execute a command requested by the Telnet client. [user-provided].
Lists file names only (short format)
Definition: rl_net_ds.h:567
int32_t netHTTPs_GetSession(void)
Get current session number of the HTTP server. [thread-safe].
netTCP_State
TCP Socket States.
Definition: rl_net_ds.h:123
const char * netFTPs_GetPassword(void)
Retrieve password of the built-in user account. [thread-safe].
int bind(int sock, const SOCKADDR *addr, int addrlen)
Assign a local address and port to a socket. [thread-safe].
uint8_t channel
WiFi Channel (0=auto)
Definition: rl_net_ds.h:471
Puts a file on FTP server.
Definition: rl_net_ds.h:559
bool netTCP_SendReady(int32_t socket)
Check if TCP socket can send data. [thread-safe].
netStatus netUDP_ReleaseSocket(int32_t socket)
Release UDP socket and free resources. [thread-safe].
bool netHTTPs_Running(void)
Check if the HTTP server is running. [thread-safe].
netStatus netIF_SetDefault(uint32_t if_id, netIF_Version ip_version)
Set default network interface for Internet access. [thread-safe].
Timeout sending email.
Definition: rl_net_ds.h:647
IPv6 Dynamic Address (16 bytes)
Definition: rl_net_ds.h:405
netStatus netSNMP_SetCommunity(const char *community)
Change SNMP community to a new community. [thread-safe].
netStatus netUninitialize(void)
De-initialize Network Component and interfaces. [not_thread-safe].
char ** h_aliases
Pointer to an array of alias names.
Definition: rl_net_ds.h:313
Timeout, no ping response received.
Definition: rl_net_ds.h:530
File upload ended.
Definition: rl_net_ds.h:576
Working directory path not found.
Definition: rl_net_ds.h:606
int recvfrom(int sock, char *buf, int len, int flags, SOCKADDR *from, int *fromlen)
Receive data from endpoint node. [thread-safe].
netStatus netHTTPs_LoginOnOff(bool login)
Enable or disable HTTP server authentication. [thread-safe].
uint16_t netTELNETs_GetPort(void)
Get port number of the Telnet server. [thread-safe].
int32_t netTCP_GetSocket(netTCP_cb_t cb_func)
Allocate a free TCP socket. [thread-safe].
netStatus netFTPs_LoginOnOff(bool login)
Enable or disable FTP server authentication. [thread-safe].
Retrieves a file from FTP server.
Definition: rl_net_ds.h:560
netStatus netTELNETs_SetPassword(const char *password)
Reset password of the built-in user account. [thread-safe].
netStatus netARP_CacheMAC(uint32_t if_id, const uint8_t *mac_addr)
Determine whether the ARP table has IP address resolved for requested MAC address. [thread-safe].
netStatus netSLIP_Connect(const char *dial_num)
Start a dial-up connection to remote SLIP server. [thread-safe].
Entry is free and unused.
Definition: rl_net_ds.h:125
#define NET_SNMP_MIB_OID_SIZE
Max.size of Object ID value.
Definition: rl_net_ds.h:706
netStatus netTCP_Close(int32_t socket)
Stop TCP communication and start closing procedure. [thread-safe].
int32_t cmsg_level
Originating protocol.
Definition: rl_net_ds.h:367
WiFi Protected Access.
Definition: rl_net_ds.h:445
IOVEC * msg_iov
An array of iovec buffers for the message.
Definition: rl_net_ds.h:357
TCP Flow Control; val: 0=disabled (default), 1=enabled.
Definition: rl_net_ds.h:144
uint16_t sin6_port
Port.
Definition: rl_net_ds.h:297
Error when sending email.
Definition: rl_net_ds.h:649
netStatus netTCP_GetPeer(int32_t socket, NET_ADDR *addr, uint32_t addr_len)
Retrieve IP address and port number of remote peer. [thread-safe].
TCP Idle Timeout; val=timeout (in seconds)
Definition: rl_net_ds.h:142
Removes an empty directory on FTP server.
Definition: rl_net_ds.h:566
netStatus netTFTPc_Put(const NET_ADDR *addr, const char *fname, const char *local_fname)
Put a file to a remote TFTP server. [thread-safe].
int16_t h_length
Length of address in bytes.
Definition: rl_net_ds.h:315
Timeout on file operation.
Definition: rl_net_ds.h:602
IPv4 Default Gateway (4 bytes)
Definition: rl_net_ds.h:399
const char * netCGI_Redirect(const char *file_name)
Redirect resource URL address to a new location. [user-provided].
netStatus netDNSc_GetHostByName(const char *name, int16_t addr_type, netDNSc_cb_t cb_func)
Resolve IP address of a host from a hostname. [thread-safe].
IPv6 Traffic Class; val=TrafficClass.
Definition: rl_net_ds.h:141
void(* netARP_cb_t)(netARP_Event event)
ARP Probe Event callback function.
Definition: rl_net_ds.h:686
int32_t netTELNETs_GetSession(void)
Get current session number of the Telnet server. [thread-safe].
bool netTELNETs_AcceptClient(const NET_ADDR *addr)
Accept or deny a connection from a remote Telnet client. [user-provided].
const char * netHTTPs_GetUsername(void)
Retrieve username of the built-in user account. [thread-safe].
int32_t msg_iovlen
Number of elements in msg_iov.
Definition: rl_net_ds.h:358
DNS Error, no such name.
Definition: rl_net_ds.h:553
netStatus netWiFi_Scan(uint32_t if_num, NET_WIFI_SCAN_INFO scan_info[], uint32_t *scan_num)
Search for available WiFi networks. [thread-safe].
IN_ADDR inet_addr(const char *cp)
Convert from text address to a network address. [thread-safe].
Directory removed.
Definition: rl_net_ds.h:580
uint16_t netUDP_GetLocalPort(int32_t socket)
Retrieve local port number of UDP socket. [thread-safe].
bool netTFTPs_Running(void)
Check if the TFTP server is running. [thread-safe].
Email body in plain ASCII format.
Definition: rl_net_ds.h:641
netStatus netFTPs_SetPort(uint16_t port)
Set port number of FTP server. [thread-safe].
Lists files stored on FTP server.
Definition: rl_net_ds.h:563
Data received event.
Definition: rl_net_ds.h:119
netStatus netFTPs_SetRootPath(const char *path)
Set path to the root directory of FTP server. [thread-safe].
bool netTELNETs_LoginActive(void)
Determine if Telnet server authentication is enabled. [thread-safe].
netStatus netARP_GetMAC(uint32_t if_id, const uint8_t *ip4_addr, uint8_t *mac_addr)
Get MAC address from the ARP cache. [thread-safe].
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
Check the status of one or more sockets. [thread-safe].