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
152 #ifdef RTE_Network_Socket_BSD
169 #define SOCK_STREAM 1
173 #define IPPROTO_TCP 1
174 #define IPPROTO_UDP 2
177 #define INADDR_ANY 0x00000000
178 #define INADDR_NONE 0xffffffff
179 #define INADDR_LOOPBACK 0x7f000001
182 #define MSG_DONTWAIT 0x01
183 #define MSG_PEEK 0x02
184 #define MSG_TRUNC 0x04
185 #define MSG_CTRUNC 0x08
193 #define IPPROTO_IPV6 3
196 #define SO_KEEPALIVE 1
197 #define SO_RCVTIMEO 2
198 #define SO_SNDTIMEO 3
204 #define IP_RECVDSTADDR 3
207 #define IPV6_TCLASS 1
208 #define IPV6_MULTICAST_HOPS 2
209 #define IPV6_RECVDSTADDR 3
212 #define BSD_ERROR (-1)
213 #define BSD_ESOCK (-2)
214 #define BSD_EINVAL (-3)
215 #define BSD_ENOTSUP (-11)
216 #define BSD_ENOMEM (-5)
217 #define BSD_ELOCKED (-7)
218 #define BSD_EWOULDBLOCK (-4)
219 #define BSD_ETIMEDOUT (-8)
220 #define BSD_EINPROGRESS (-9)
221 #define BSD_ENOTCONN (-6)
222 #define BSD_EISCONN (-12)
223 #define BSD_ECONNREFUSED (-13)
224 #define BSD_ECONNRESET (-14)
225 #define BSD_ECONNABORTED (-15)
226 #define BSD_EALREADY (-16)
227 #define BSD_EADDRINUSE (-17)
228 #define BSD_EDESTADDRREQ (-18)
229 #define BSD_EHOSTNOTFOUND (-10)
232 #define BSD_SUCCESS 0
233 #define BSD_ERROR_SOCKET BSD_ESOCK
234 #define BSD_ERROR_PARAMETER BSD_EINVAL
235 #define BSD_ERROR_WOULDBLOCK BSD_EWOULDBLOCK
236 #define BSD_ERROR_NOMEMORY BSD_ENOMEM
237 #define BSD_ERROR_CLOSED BSD_ENOTCONN
238 #define BSD_ERROR_LOCKED BSD_ELOCKED
239 #define BSD_ERROR_TIMEOUT BSD_ETIMEDOUT
240 #define BSD_ERROR_INPROGRESS BSD_EINPROGRESS
241 #define BSD_ERROR_NONAME BSD_EHOSTNOTFOUND
246 typedef struct sockaddr {
251 #if defined(__CC_ARM)
254 #elif defined(__clang__)
255 #pragma clang diagnostic push
256 #pragma clang diagnostic ignored "-Wc11-extensions"
260 typedef struct in_addr {
263 uint8_t s_b1,s_b2,s_b3,s_b4;
273 typedef struct in6_addr {
281 #if defined(__CC_ARM)
283 #elif defined(__clang__)
284 #pragma clang diagnostic pop
288 typedef struct sockaddr_in {
296 typedef struct sockaddr_in6 {
304 typedef struct sockaddr_storage {
308 int8_t __ss_pad2[16];
312 typedef struct hostent {
321 #define INET_ADDRSTRLEN 16
322 #define INET6_ADDRSTRLEN 46
325 #define FD_SETSIZE 64
339 #define FD_WR(fd,code) if ((fd > 0) && (fd <= FD_SETSIZE)) { code; }
340 #define FD_RD(fd,code) (((fd > 0) && (fd <= FD_SETSIZE)) ? (code) : 0)
343 #define FD_SET(fd,set) FD_WR(fd, (set)->fd_bits[(fd-1)>>5] |= (1U << ((fd-1)&0x1F)))
344 #define FD_CLR(fd,set) FD_WR(fd, (set)->fd_bits[(fd-1)>>5] &= ~(1U << ((fd-1)&0x1F)))
345 #define FD_ISSET(fd,set) FD_RD(fd, (set)->fd_bits[(fd-1)>>5] & (1U << ((fd-1)&0x1F)))
346 #define FD_ZERO(set) memset(set, 0, sizeof(*set))
349 typedef struct iovec {
355 typedef struct msghdr {
366 typedef struct cmsghdr {
373 #define CMSG_FIRSTHDR(mhdr) ((mhdr)->msg_controllen >= sizeof(CMSGHDR)) ? \
374 (CMSGHDR *)(mhdr)->msg_control : \
376 #define CMSG_NXTHDR(mhdr,cmsg) (CMSG_ALIGN((uint32_t)(cmsg) + (cmsg)->cmsg_len) + sizeof(CMSGHDR) > \
377 (uint32_t)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
379 (CMSGHDR *)CMSG_ALIGN((uint32_t)(cmsg) + (cmsg)->cmsg_len)
380 #define CMSG_DATA(cmsg) ((uint8_t *)(cmsg) + sizeof(CMSGHDR))
381 #define CMSG_ALIGN(len) (((len) + 3) & ~3U)
382 #define CMSG_LEN(len) ((len) + sizeof(CMSGHDR))
383 #define CMSG_SPACE(len) CMSG_ALIGN((len) + sizeof(CMSGHDR))
388 #define NET_IF_CLASS_ETH (1U << 8)
389 #define NET_IF_CLASS_WIFI (2U << 8)
390 #define NET_IF_CLASS_PPP (3U << 8)
391 #define NET_IF_CLASS_SLIP (4U << 8)
420 #define NET_ETH_SPEED_10M 0
421 #define NET_ETH_SPEED_100M 1
422 #define NET_ETH_SPEED_1G 2
425 #define NET_ETH_DUPLEX_HALF 0
426 #define NET_ETH_DUPLEX_FULL 1
429 typedef struct net_eth_link_info {
468 typedef struct net_wifi_config {
479 typedef struct net_wifi_net_info {
488 typedef struct net_wifi_scan_info {
503 #define NET_DHCP_OPTION_IP_ADDRESS 0
504 #define NET_DHCP_OPTION_NTP_SERVERS 42
505 #define NET_DHCP_OPTION_CLIENT_ID 61
506 #define NET_DHCP_OPTION_BOOTFILE_NAME 67
509 #define NET_DHCP6_OPTION_IP_ADDRESS 0
512 typedef struct net_dhcp_option_item {
535 #define NET_PING_IP4_ONLY 0x01
536 #define NET_PING_IP6_ONLY 0x02
654 #define NET_SMTP_MTA_USETLS 0x01
657 typedef struct net_smtp_mail {
669 typedef struct net_smtp_mta {
699 #define NET_SNMP_MIB_INTEGER 0x02
700 #define NET_SNMP_MIB_OCTET_STR 0x04
701 #define NET_SNMP_MIB_OBJECT_ID 0x06
702 #define NET_SNMP_MIB_IP_ADDR 0x40
703 #define NET_SNMP_MIB_COUNTER 0x41
704 #define NET_SNMP_MIB_GAUGE 0x42
705 #define NET_SNMP_MIB_TIME_TICKS 0x43
706 #define NET_SNMP_MIB_ATR_RO 0x80
707 #define NET_SNMP_MIB_OID_SIZE 17
708 #define NET_SNMP_MIB_STR_SIZE 110
709 #define NET_SNMP_MIB_READ 0
710 #define NET_SNMP_MIB_WRITE 1
713 #define NET_SNMP_MIB_STR(s) sizeof(s)-1, s
714 #define NET_SNMP_MIB_INT(o) sizeof(o), (void *)&o
715 #define NET_SNMP_MIB_IP(ip) 4, (void *)&ip
716 #define NET_SNMP_MIB_OID0(f,s) (f*40 + s)
719 typedef struct net_snmp_mib_info {
725 void (*cb_func)(int32_t mode);
729 typedef struct net_fs_time {
739 #define NET_FS_ATTR_FILE 1
740 #define NET_FS_ATTR_DIRECTORY 2
916 #ifdef RTE_Network_Socket_BSD
932 extern int socket (
int family,
int type,
int protocol);
944 extern int bind (
int sock,
const SOCKADDR *addr,
int addrlen);
955 extern int listen (
int sock,
int backlog);
1012 extern int send (
int sock,
const char *buf,
int len,
int flags);
1036 extern int sendto (
int sock,
const char *buf,
int len,
int flags,
const SOCKADDR *to,
int tolen);
1057 extern int sendmsg (
int sock,
const MSGHDR *msg,
int flags);
1078 extern int recv (
int sock,
char *buf,
int len,
int flags);
1102 extern int recvfrom (
int sock,
char *buf,
int len,
int flags,
SOCKADDR *from,
int *fromlen);
1181 extern int getsockopt (
int sock,
int level,
int optname,
char *optval,
int *optlen);
1206 extern int setsockopt (
int sock,
int level,
int optname,
const char *optval,
int optlen);
1218 extern int ioctlsocket (
int sock,
long cmd,
unsigned long *argp);
1280 extern int inet_pton (
int af,
const char *src,
void *dst);
1293 extern const char *
inet_ntop (
int af,
const void *src,
char *dst,
int size);
1483 extern void netETH_ReceiveRaw (uint32_t if_num,
const uint8_t *buf, uint32_t len);
1491 extern void netDHCP_Notify (uint32_t if_id, uint8_t option,
const uint8_t *val, uint32_t len);
1499 extern void netDHCP6_Notify (uint32_t if_id, uint8_t option,
const uint8_t *val, uint32_t len);
1735 extern bool netFTPs_FileAccess (uint8_t user_id,
const char *fname, uint32_t access);
1759 extern void *
netFTPs_fopen (
const char *fname,
const char *mode);
1771 extern uint32_t
netFTPs_fread (
void *file, uint8_t *buf, uint32_t len);
1778 extern uint32_t
netFTPs_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
1857 extern void *
netFTPc_fopen (
const char *fname,
const char *mode);
1869 extern uint32_t
netFTPc_fread (
void *file, uint8_t *buf, uint32_t len);
1876 extern uint32_t
netFTPc_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
1932 extern void *
netTFTPs_fopen (
const char *fname,
const char *mode);
1944 extern uint32_t
netTFTPs_fread (
void *file, uint8_t *buf, uint32_t len);
1951 extern uint32_t
netTFTPs_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
1987 extern void *
netTFTPc_fopen (
const char *fname,
const char *mode);
1999 extern uint32_t
netTFTPc_fread (
void *file, uint8_t *buf, uint32_t len);
2006 extern uint32_t
netTFTPc_fwrite (
void *file,
const uint8_t *buf, uint32_t len);
2299 extern uint32_t
netHTTPs_fread (
void *file, uint8_t *buf, uint32_t len);
2308 extern char *
netHTTPs_fgets (
void *file,
char *buf, uint32_t size);
2315 extern void netHTTPs_fstat (
const char *fname, uint32_t *fsize, uint32_t *ftime);
2350 extern uint32_t
netCGI_Script (
const char *env,
char *buf, uint32_t buf_len, uint32_t *pcgi);
2359 extern const char *
netCGI_GetEnvVar (
const char *env,
char *ansi, uint32_t max_len);
2447 extern uint32_t
netSMTPc_fread (
void *file, uint8_t *buf, uint32_t len);
2516 extern const char *
netIP_ntoa (int16_t addr_type,
const uint8_t *ip_addr,
char *string_buf, uint32_t buf_len);
2529 extern bool netIP_aton (
const char *addr_string, int16_t addr_type, uint8_t *ip_addr);
2537 extern const char *
netMAC_ntoa (
const uint8_t *mac_addr,
char *string_buf, uint32_t buf_len);
2545 extern bool netMAC_aton (
const char *mac_string, uint8_t *mac_addr);
Incorrect login error message.
Definition: rl_net_ds.h:629
Username to login to SMTP server.
Definition: rl_net_ds.h:637
netWiFi_Security
WiFi Security Types.
Definition: rl_net_ds.h:443
netUDP_Option
UDP Socket Options.
Definition: rl_net_ds.h:101
Username request login message.
Definition: rl_net_ds.h:627
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:593
Makes a directory on FTP server.
Definition: rl_net_ds.h:566
netWiFi_Security security
Security type.
Definition: rl_net_ds.h:471
Generic IPv6 Address structure.
Definition: rl_net_ds.h:273
Erroneous response packet.
Definition: rl_net_ds.h:555
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:546
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:111
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:589
Wrong state error.
Definition: rl_net_ds.h:87
Host name successfully resolved.
Definition: rl_net_ds.h:552
BSSID of AP.
Definition: rl_net_ds.h:453
uint16_t Flags
Service control flags.
Definition: rl_net_ds.h:672
netStatus netTCP_ReleaseSocket(int32_t socket)
Release TCP socket and free resources. [thread-safe].
IN6_ADDR sin6_addr
IP6 address.
Definition: rl_net_ds.h:300
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:463
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].
uint8_t min
Minutes [0..59].
Definition: rl_net_ds.h:731
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:299
Generic IPv4 Address structure.
Definition: rl_net_ds.h:260
uint32_t cmsg_len
Data byte count, including the cmsghdr.
Definition: rl_net_ds.h:367
netWiFi_WPS wps_method
WiFi Protected Setup method.
Definition: rl_net_ds.h:474
uint8_t code
Option type code.
Definition: rl_net_ds.h:513
netStatus netHTTPs_SetUsername(const char *username)
Set username of the built-in user account. [thread-safe].
netStatus netNDP_ProbeX(uint32_t if_id, const uint8_t *ip6_addr)
Determine whether the IP address is already in use in blocking mode. [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:134
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:349
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:462
uint8_t * value
Pointer to Option value.
Definition: rl_net_ds.h:515
DNS host resolver failed.
Definition: rl_net_ds.h:91
netFTP_Command
FTP Commands.
Definition: rl_net_ds.h:559
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].
uint8_t sec
Seconds [0..59].
Definition: rl_net_ds.h:732
netStatus netICMP_SetNoEcho(uint32_t if_id, bool no_echo)
Enable or disable ICMP Echo response. [thread-safe].
int32_t cmsg_type
Protocol-specific type.
Definition: rl_net_ds.h:369
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:114
BSD Host Entry structure.
Definition: rl_net_ds.h:312
Requested file operation denied.
Definition: rl_net_ds.h:582
IN_ADDR sin_addr
IP address.
Definition: rl_net_ds.h:291
IP version 6.
Definition: rl_net_ds.h:416
IPv6 Static Address (16 bytes)
Definition: rl_net_ds.h:405
#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:670
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:119
TCP Delayed Acknowledgment; val: 0=disabled (default), 1=enabled.
Definition: rl_net_ds.h:146
Stateless DHCPv6 mode.
Definition: rl_net_ds.h:524
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:551
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].
netStatus netNDP_ClearCache(uint32_t if_id)
Flush or clear the local NDP cache. [thread-safe].
netSNTPc_Mode
SNTP Client Mode.
Definition: rl_net_ds.h:678
netWiFi_WPS
WiFi WPS Methods.
Definition: rl_net_ds.h:461
netStatus netICMP6_SetNoEcho(uint32_t if_id, bool no_echo)
Enable or disable ICMPv6 Echo response. [thread-safe].
netStatus netTELNETs_RequestMessage(int32_t session)
Request unsolicited message processing in netTELNETs_ProcessMessage function. [thread-safe].
uint16_t year
Year [1980..2107].
Definition: rl_net_ds.h:735
DHCP Option Item.
Definition: rl_net_ds.h:512
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:720
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:525
File operation successful.
Definition: rl_net_ds.h:614
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:473
#define FD_SETSIZE
BSD fd_set size.
Definition: rl_net_ds.h:325
IPv4 Socket Address structure.
Definition: rl_net_ds.h:288
const char * Cc
Carbon copy recipient(s), can be NULL.
Definition: rl_net_ds.h:660
File not found.
Definition: rl_net_ds.h:606
const char * netHTTPs_GetLanguage(void)
Retrieve the preferred language setting from the browser. [thread-safe].
Beacon interval.
Definition: rl_net_ds.h:457
Connection is for some reason aborted.
Definition: rl_net_ds.h:118
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:679
BSD message header structure.
Definition: rl_net_ds.h:355
Ethernet link information.
Definition: rl_net_ds.h:429
DTIM interval.
Definition: rl_net_ds.h:456
void(* netPing_cb_t)(netPing_Event event)
Ping Event callback function.
Definition: rl_net_ds.h:684
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:469
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:690
uint16_t netFTPs_GetPort(void)
Get port number of FTP server. [thread-safe].
Email address of the recipient.
Definition: rl_net_ds.h:640
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:638
uint8_t oid_len
Object ID length.
Definition: rl_net_ds.h:721
FS Interface Time info.
Definition: rl_net_ds.h:729
Timeout, no response to NDP probe.
Definition: rl_net_ds.h:547
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].
int32_t netFTPs_ffind(const char *mask, char *fname, uint32_t *fsize, NET_FS_TIME *ftime, bool first)
Search the file system directory for matching files. [interface].
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:150
File download ended.
Definition: rl_net_ds.h:576
TCP Keep Alive; val: 0=disabled (default), 1=enabled.
Definition: rl_net_ds.h:144
uint32_t iov_len
Number of bytes to transfer.
Definition: rl_net_ds.h:351
netStatus netHTTPs_CalcHashHA1(const char *username, const char *password, char *buf, uint32_t buf_len)
Calculate HA1 hash value for the given credentials. [thread-safe].
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:617
netFTPc_Event
FTP Client Events.
Definition: rl_net_ds.h:601
netPing_Event
Ping Callback Events.
Definition: rl_net_ds.h:529
Received data if LIST command is given.
Definition: rl_net_ds.h:596
Transmit Power.
Definition: rl_net_ds.h:454
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:671
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:335
User login failed (invalid credentials)
Definition: rl_net_ds.h:575
TCP Connection established.
Definition: rl_net_ds.h:136
Local file operation error.
Definition: rl_net_ds.h:583
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:657
NET_DHCP_OPTION_ITEM netDHCP_PrivateOptionsTableN[]
DHCP Private Options.
Authentication failed, username/password invalid.
Definition: rl_net_ds.h:649
void * msg_control
Ancillary data.
Definition: rl_net_ds.h:360
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:361
Local file read/write error.
Definition: rl_net_ds.h:608
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:584
Socket waiting for incoming connection.
Definition: rl_net_ds.h:128
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:448
void(* netSNTPc_cb_t)(uint32_t seconds, uint32_t seconds_fraction)
SNTP Client callback function.
Definition: rl_net_ds.h:696
Renames a file on FTP server.
Definition: rl_net_ds.h:565
Login timeout error message.
Definition: rl_net_ds.h:630
Wired Equivalent Privacy.
Definition: rl_net_ds.h:445
netWiFi_Option
WiFi Driver Options.
Definition: rl_net_ds.h:452
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:499
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:132
uint32_t msg_namelen
Size of address buffer.
Definition: rl_net_ds.h:357
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:488
User logged out, session is idle.
Definition: rl_net_ds.h:574
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:116
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:540
Connect request received event.
Definition: rl_net_ds.h:115
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:602
const char * Subject
Subject of email, can be NULL.
Definition: rl_net_ds.h:662
Network Address IPv4 only.
Definition: rl_net_ds.h:64
netETH_Event
Ethernet Callback Events.
Definition: rl_net_ds.h:435
BSD timeval structure.
Definition: rl_net_ds.h:333
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:439
const char * Encoding
Default encoding type, can be NULL.
Definition: rl_net_ds.h:665
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:497
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].
uint8_t day
Day [1..31].
Definition: rl_net_ds.h:733
netIF_Version
Interface IP Versions.
Definition: rl_net_ds.h:414
#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:141
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:403
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:297
netDHCP6_Mode
DHCPv6 Modes.
Definition: rl_net_ds.h:523
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:447
WiFi Configuration.
Definition: rl_net_ds.h:468
Username to login to FTP server.
Definition: rl_net_ds.h:590
Received FIN independently of our FIN.
Definition: rl_net_ds.h:133
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:604
SNMP-MIB Entry information.
Definition: rl_net_ds.h:719
Generic FTP client error.
Definition: rl_net_ds.h:609
netARP_Event
ARP Probe Callback Events.
Definition: rl_net_ds.h:539
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:362
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:619
Subject of email.
Definition: rl_net_ds.h:641
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:553
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:592
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:664
User authentication failed.
Definition: rl_net_ds.h:90
uint16_t sin_port
Port.
Definition: rl_net_ds.h:290
File access not allowed.
Definition: rl_net_ds.h:605
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:585
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:498
New File or Directory name for RENAME command.
Definition: rl_net_ds.h:594
Generic TFTP client error.
Definition: rl_net_ds.h:620
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:514
IPv4 Secondary DNS (4 bytes)
Definition: rl_net_ds.h:402
uint16_t netTFTPs_GetPort(void)
Get port number of the TFTP server. [thread-safe].
netSMTPc_Request
SMTP Client Request.
Definition: rl_net_ds.h:636
Prompt message.
Definition: rl_net_ds.h:631
Local filename (including path)
Definition: rl_net_ds.h:597
IPv4 Maximum Transmission Unit (2 bytes)
Definition: rl_net_ds.h:397
netStatus
Status code values returned by Network library functions.
Definition: rl_net_ds.h:82
Open.
Definition: rl_net_ds.h:444
With PIN.
Definition: rl_net_ds.h:464
IPv6 Socket Address structure.
Definition: rl_net_ds.h:296
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:624
int16_t ss_family
Address family.
Definition: rl_net_ds.h:305
File deleted.
Definition: rl_net_ds.h:578
Timed waiting for 2MSL.
Definition: rl_net_ds.h:135
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:663
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:289
const char * To
Recipient(s), can be NULL.
Definition: rl_net_ds.h:659
char * h_name
Official name of host.
Definition: rl_net_ds.h:313
Socket Address storage structure.
Definition: rl_net_ds.h:304
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:632
void * msg_name
Optional pointer to source address.
Definition: rl_net_ds.h:356
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:328
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:646
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:307
Invalid Socket.
Definition: rl_net_ds.h:125
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:408
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:315
Append file on FTP server (with create)
Definition: rl_net_ds.h:562
netStatus netInitialize(void)
Initialize Network Component and interfaces. [not_thread-safe].
uint8_t var_size
Size of a variable.
Definition: rl_net_ds.h:723
Close started FIN packet was sent.
Definition: rl_net_ds.h:131
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:572
netNDP_Event
NDP Probe Callback Events.
Definition: rl_net_ds.h:545
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:616
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:395
const char * password
Password, a null-terminated string.
Definition: rl_net_ds.h:470
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:579
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:317
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:724
IPv4 Subnet mask (4 bytes)
Definition: rl_net_ds.h:399
const char * netCGI_CustomHeader(void)
Add custom HTTP response header. [user-provided].
Initial welcome message.
Definition: rl_net_ds.h:625
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:396
uint32_t fd_bits[(FD_SETSIZE+31)>>5]
Set of sockets bit-mask.
Definition: rl_net_ds.h:329
IPv6 Primary DNS (16 bytes)
Definition: rl_net_ds.h:409
Broadcast mode for local LAN.
Definition: rl_net_ds.h:680
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:410
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:530
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:127
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:639
Link up; val=link_info.
Definition: rl_net_ds.h:437
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:658
UDP Checksum Options.
Definition: rl_net_ds.h:107
Deletes a file on FTP server.
Definition: rl_net_ds.h:563
uint16_t sa_family
Address family.
Definition: rl_net_ds.h:247
SMTP Mail Transfer Agent Descriptor.
Definition: rl_net_ds.h:669
int recv(int sock, char *buf, int len, int flags)
Receive data on already connected socket. [thread-safe].
IPv4 Broadcast Interface; val=if_id (class and number)
Definition: rl_net_ds.h:106
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:334
File filter/mask for LIST command (wildcards allowed)
Definition: rl_net_ds.h:595
uint8_t netDHCP_PrivateOptionsCountN
Number of DHCP Private Options.
SYN frame received.
Definition: rl_net_ds.h:129
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:573
Directory created.
Definition: rl_net_ds.h:580
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:661
IP version 4.
Definition: rl_net_ds.h:415
File not found or file r/w error.
Definition: rl_net_ds.h:92
Email successfully sent.
Definition: rl_net_ds.h:647
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].
uint8_t mon
Month [1..12].
Definition: rl_net_ds.h:734
const char * wps_pin
WPS PIN, a null-terminated string.
Definition: rl_net_ds.h:475
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:628
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:401
IPv4 Address (4 bytes)
Definition: rl_net_ds.h:398
Login message, if authentication is enabled.
Definition: rl_net_ds.h:626
netTCP_Option
TCP Socket Options.
Definition: rl_net_ds.h:140
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:693
uint8_t rssi
Received Signal Strength Indicator.
Definition: rl_net_ds.h:484
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:130
Server error.
Definition: rl_net_ds.h:89
Connection was properly closed.
Definition: rl_net_ds.h:117
uint8_t hr
Hours [0..23].
Definition: rl_net_ds.h:730
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:541
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:673
Disk full.
Definition: rl_net_ds.h:618
Generic Socket Address structure.
Definition: rl_net_ds.h:246
Low Power deep-sleep timer.
Definition: rl_net_ds.h:455
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:436
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:407
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:366
IPv6 Link-local Address (16 bytes)
Definition: rl_net_ds.h:404
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:350
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:615
Password to login to FTP server.
Definition: rl_net_ds.h:591
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:613
HOSTENT * gethostbyname(const char *name, int *err)
Retrieve host IP address from host name. [thread-safe].
WiFi Network information.
Definition: rl_net_ds.h:479
netIF_Option
Interface Option codes.
Definition: rl_net_ds.h:394
Wake-up (on Magic Packet)
Definition: rl_net_ds.h:438
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:674
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:568
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:124
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:472
Puts a file on FTP server.
Definition: rl_net_ds.h:560
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:648
IPv6 Dynamic Address (16 bytes)
Definition: rl_net_ds.h:406
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:314
Timeout, no ping response received.
Definition: rl_net_ds.h:531
File upload ended.
Definition: rl_net_ds.h:577
Working directory path not found.
Definition: rl_net_ds.h:607
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].
netStatus netARP_ProbeX(uint32_t if_id, const uint8_t *ip4_addr)
Determine whether the IP address is already in use in blocking mode. [thread-safe].
Retrieves a file from FTP server.
Definition: rl_net_ds.h:561
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:126
#define NET_SNMP_MIB_OID_SIZE
Max.size of Object ID value.
Definition: rl_net_ds.h:707
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:368
WiFi Protected Access.
Definition: rl_net_ds.h:446
IOVEC * msg_iov
An array of iovec buffers for the message.
Definition: rl_net_ds.h:358
TCP Flow Control; val: 0=disabled (default), 1=enabled.
Definition: rl_net_ds.h:145
uint16_t sin6_port
Port.
Definition: rl_net_ds.h:298
Error when sending email.
Definition: rl_net_ds.h:650
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:143
Removes an empty directory on FTP server.
Definition: rl_net_ds.h:567
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:316
Timeout on file operation.
Definition: rl_net_ds.h:603
IPv4 Default Gateway (4 bytes)
Definition: rl_net_ds.h:400
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:142
void(* netARP_cb_t)(netARP_Event event)
ARP Probe Event callback function.
Definition: rl_net_ds.h:687
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:359
netStatus netARP_ClearCache(uint32_t if_id)
Flush or clear the local ARP cache. [thread-safe].
DNS Error, no such name.
Definition: rl_net_ds.h:554
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:581
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:642
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:564
Data received event.
Definition: rl_net_ds.h:120
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].