├── LICENSE ├── README.md ├── coap ├── coap_client.c ├── coap_client.h ├── coap_client_block.c ├── coap_client_block.h ├── coap_client_misc.c ├── coap_client_misc.h ├── coap_client_observe.c ├── coap_client_observe.h ├── coap_client_request.c ├── coap_client_request.h ├── coap_client_transport.c ├── coap_client_transport.h ├── coap_common.h ├── coap_debug.c ├── coap_debug.h ├── coap_message.c ├── coap_message.h ├── coap_option.c ├── coap_option.h ├── coap_server.c ├── coap_server.h ├── coap_server_misc.c ├── coap_server_misc.h ├── coap_server_request.c ├── coap_server_request.h ├── coap_server_transport.c └── coap_server_transport.h ├── core ├── bsd_socket.c ├── bsd_socket.h ├── bsd_socket_misc.c ├── bsd_socket_misc.h ├── bsd_socket_options.c ├── bsd_socket_options.h ├── ethernet.c ├── ethernet.h ├── ethernet_misc.c ├── ethernet_misc.h ├── ip.c ├── ip.h ├── net.c ├── net.h ├── net_legacy.h ├── net_mem.c ├── net_mem.h ├── net_misc.c ├── net_misc.h ├── nic.c ├── nic.h ├── ping.c ├── ping.h ├── raw_socket.c ├── raw_socket.h ├── socket.c ├── socket.h ├── socket_misc.c ├── socket_misc.h ├── tcp.c ├── tcp.h ├── tcp_fsm.c ├── tcp_fsm.h ├── tcp_misc.c ├── tcp_misc.h ├── tcp_timer.c ├── tcp_timer.h ├── udp.c └── udp.h ├── dhcp ├── dhcp_client.c ├── dhcp_client.h ├── dhcp_client_fsm.c ├── dhcp_client_fsm.h ├── dhcp_client_misc.c ├── dhcp_client_misc.h ├── dhcp_common.c ├── dhcp_common.h ├── dhcp_debug.c ├── dhcp_debug.h ├── dhcp_server.c ├── dhcp_server.h ├── dhcp_server_misc.c └── dhcp_server_misc.h ├── dhcpv6 ├── dhcpv6_client.c ├── dhcpv6_client.h ├── dhcpv6_client_fsm.c ├── dhcpv6_client_fsm.h ├── dhcpv6_client_misc.c ├── dhcpv6_client_misc.h ├── dhcpv6_common.c ├── dhcpv6_common.h ├── dhcpv6_debug.c ├── dhcpv6_debug.h ├── dhcpv6_relay.c └── dhcpv6_relay.h ├── dns ├── dns_cache.c ├── dns_cache.h ├── dns_client.c ├── dns_client.h ├── dns_common.c ├── dns_common.h ├── dns_debug.c └── dns_debug.h ├── dns_sd ├── dns_sd_responder.c ├── dns_sd_responder.h ├── dns_sd_responder_misc.c └── dns_sd_responder_misc.h ├── drivers ├── eth │ ├── adin1110_driver.c │ ├── adin1110_driver.h │ ├── dm9000_driver.c │ ├── dm9000_driver.h │ ├── enc28j60_driver.c │ ├── enc28j60_driver.h │ ├── enc424j600_driver.c │ ├── enc424j600_driver.h │ ├── enc624j600_driver.c │ ├── enc624j600_driver.h │ ├── ksz8851_driver.c │ ├── ksz8851_driver.h │ ├── lan8650_driver.c │ ├── lan8650_driver.h │ ├── lan8651_driver.c │ ├── lan8651_driver.h │ ├── lan9250_driver.c │ ├── lan9250_driver.h │ ├── ncn26010_driver.c │ ├── ncn26010_driver.h │ ├── w3150a_driver.c │ ├── w3150a_driver.h │ ├── w5100_driver.c │ ├── w5100_driver.h │ ├── w5100s_driver.c │ ├── w5100s_driver.h │ ├── w5200_driver.c │ ├── w5200_driver.h │ ├── w5500_driver.c │ ├── w5500_driver.h │ ├── w6100_driver.c │ └── w6100_driver.h ├── loopback │ ├── loopback_driver.c │ └── loopback_driver.h ├── mac │ ├── a2fxxxm3_eth_driver.c │ ├── a2fxxxm3_eth_driver.h │ ├── am243x_eth_driver.c │ ├── am243x_eth_driver.h │ ├── am335x_eth_driver.c │ ├── am335x_eth_driver.h │ ├── am64x_eth_driver.c │ ├── am64x_eth_driver.h │ ├── apm32f4xx_eth_driver.c │ ├── apm32f4xx_eth_driver.h │ ├── aps3_eth_driver.c │ ├── aps3_eth_driver.h │ ├── at32f4xx_eth_driver.c │ ├── at32f4xx_eth_driver.h │ ├── avr32_eth_driver.c │ ├── avr32_eth_driver.h │ ├── efm32gg11_eth_driver.c │ ├── efm32gg11_eth_driver.h │ ├── esp32_eth_driver.c │ ├── esp32_eth_driver.h │ ├── f2838x_eth_driver.c │ ├── f2838x_eth_driver.h │ ├── f28m35x_eth_driver.c │ ├── f28m35x_eth_driver.h │ ├── fm3_eth1_driver.c │ ├── fm3_eth1_driver.h │ ├── fm3_eth2_driver.c │ ├── fm3_eth2_driver.h │ ├── fm4_eth_driver.c │ ├── fm4_eth_driver.h │ ├── gd32e5xx_eth_driver.c │ ├── gd32e5xx_eth_driver.h │ ├── gd32f2xx_eth_driver.c │ ├── gd32f2xx_eth_driver.h │ ├── gd32f3xx_eth_driver.c │ ├── gd32f3xx_eth_driver.h │ ├── gd32f4xx_eth_driver.c │ ├── gd32f4xx_eth_driver.h │ ├── gd32f5xx_eth_driver.c │ ├── gd32f5xx_eth_driver.h │ ├── gd32h7xx_eth1_driver.c │ ├── gd32h7xx_eth1_driver.h │ ├── gd32h7xx_eth2_driver.c │ ├── gd32h7xx_eth2_driver.h │ ├── lm3s_eth_driver.c │ ├── lm3s_eth_driver.h │ ├── lpc175x_eth_driver.c │ ├── lpc175x_eth_driver.h │ ├── lpc176x_eth_driver.c │ ├── lpc176x_eth_driver.h │ ├── lpc178x_eth_driver.c │ ├── lpc178x_eth_driver.h │ ├── lpc18xx_eth_driver.c │ ├── lpc18xx_eth_driver.h │ ├── lpc23xx_eth_driver.c │ ├── lpc23xx_eth_driver.h │ ├── lpc43xx_eth_driver.c │ ├── lpc43xx_eth_driver.h │ ├── lpc54xxx_eth_driver.c │ ├── lpc54xxx_eth_driver.h │ ├── m2sxxx_eth_driver.c │ ├── m2sxxx_eth_driver.h │ ├── m467_eth_driver.c │ ├── m467_eth_driver.h │ ├── m487_eth_driver.c │ ├── m487_eth_driver.h │ ├── mcf5225x_eth_driver.c │ ├── mcf5225x_eth_driver.h │ ├── mcimx6ul_eth1_driver.c │ ├── mcimx6ul_eth1_driver.h │ ├── mcimx6ul_eth2_driver.c │ ├── mcimx6ul_eth2_driver.h │ ├── mcxn547_eth_driver.c │ ├── mcxn547_eth_driver.h │ ├── mcxn947_eth_driver.c │ ├── mcxn947_eth_driver.h │ ├── mimxrt1020_eth_driver.c │ ├── mimxrt1020_eth_driver.h │ ├── mimxrt1040_eth_driver.c │ ├── mimxrt1040_eth_driver.h │ ├── mimxrt1050_eth_driver.c │ ├── mimxrt1050_eth_driver.h │ ├── mimxrt1060_eth1_driver.c │ ├── mimxrt1060_eth1_driver.h │ ├── mimxrt1060_eth2_driver.c │ ├── mimxrt1060_eth2_driver.h │ ├── mimxrt1160_eth1_driver.c │ ├── mimxrt1160_eth1_driver.h │ ├── mimxrt1160_eth2_driver.c │ ├── mimxrt1160_eth2_driver.h │ ├── mimxrt1170_eth1_driver.c │ ├── mimxrt1170_eth1_driver.h │ ├── mimxrt1170_eth2_driver.c │ ├── mimxrt1170_eth2_driver.h │ ├── mimxrt1170_eth3_driver.c │ ├── mimxrt1170_eth3_driver.h │ ├── mk6x_eth_driver.c │ ├── mk6x_eth_driver.h │ ├── mk7x_eth_driver.c │ ├── mk7x_eth_driver.h │ ├── mkv5x_eth_driver.c │ ├── mkv5x_eth_driver.h │ ├── mpc5748_eth1_driver.c │ ├── mpc5748_eth1_driver.h │ ├── mpc5748_eth2_driver.c │ ├── mpc5748_eth2_driver.h │ ├── mpc5777_eth_driver.c │ ├── mpc5777_eth_driver.h │ ├── mpfsxxx_eth1_driver.c │ ├── mpfsxxx_eth1_driver.h │ ├── mpfsxxx_eth2_driver.c │ ├── mpfsxxx_eth2_driver.h │ ├── msp432e4_eth_driver.c │ ├── msp432e4_eth_driver.h │ ├── nuc472_eth_driver.c │ ├── nuc472_eth_driver.h │ ├── omapl138_eth_driver.c │ ├── omapl138_eth_driver.h │ ├── pic32ck_eth_driver.c │ ├── pic32ck_eth_driver.h │ ├── pic32cx_eth_driver.c │ ├── pic32cx_eth_driver.h │ ├── pic32cz_eth_driver.c │ ├── pic32cz_eth_driver.h │ ├── pic32mx_eth_driver.c │ ├── pic32mx_eth_driver.h │ ├── pic32mz_eth_driver.c │ ├── pic32mz_eth_driver.h │ ├── ra6_eth_driver.c │ ├── ra6_eth_driver.h │ ├── ra8_eth_driver.c │ ├── ra8_eth_driver.h │ ├── rm57_eth_driver.c │ ├── rm57_eth_driver.h │ ├── rx62n_eth_driver.c │ ├── rx62n_eth_driver.h │ ├── rx63n_eth_driver.c │ ├── rx63n_eth_driver.h │ ├── rx65n_eth_driver.c │ ├── rx65n_eth_driver.h │ ├── rza1_eth_driver.c │ ├── rza1_eth_driver.h │ ├── rza2_eth1_driver.c │ ├── rza2_eth1_driver.h │ ├── rza2_eth2_driver.c │ ├── rza2_eth2_driver.h │ ├── s32k1_eth_driver.c │ ├── s32k1_eth_driver.h │ ├── s5d9_eth_driver.c │ ├── s5d9_eth_driver.h │ ├── s7g2_eth1_driver.c │ ├── s7g2_eth1_driver.h │ ├── s7g2_eth2_driver.c │ ├── s7g2_eth2_driver.h │ ├── sam3x_eth_driver.c │ ├── sam3x_eth_driver.h │ ├── sam4e_eth_driver.c │ ├── sam4e_eth_driver.h │ ├── sam7x_eth_driver.c │ ├── sam7x_eth_driver.h │ ├── sam9263_eth_driver.c │ ├── sam9263_eth_driver.h │ ├── sam9x6_eth1_driver.c │ ├── sam9x6_eth1_driver.h │ ├── sam9x6_eth2_driver.c │ ├── sam9x6_eth2_driver.h │ ├── sama5d2_eth_driver.c │ ├── sama5d2_eth_driver.h │ ├── sama5d3_eth1_driver.c │ ├── sama5d3_eth1_driver.h │ ├── sama5d3_eth2_driver.c │ ├── sama5d3_eth2_driver.h │ ├── same53_eth_driver.c │ ├── same53_eth_driver.h │ ├── same54_eth_driver.c │ ├── same54_eth_driver.h │ ├── same70_eth_driver.c │ ├── same70_eth_driver.h │ ├── samv71_eth_driver.c │ ├── samv71_eth_driver.h │ ├── stm32f1xx_eth_driver.c │ ├── stm32f1xx_eth_driver.h │ ├── stm32f2xx_eth_driver.c │ ├── stm32f2xx_eth_driver.h │ ├── stm32f4xx_eth_driver.c │ ├── stm32f4xx_eth_driver.h │ ├── stm32f7xx_eth_driver.c │ ├── stm32f7xx_eth_driver.h │ ├── stm32h5xx_eth_driver.c │ ├── stm32h5xx_eth_driver.h │ ├── stm32h7rsxx_eth_driver.c │ ├── stm32h7rsxx_eth_driver.h │ ├── stm32h7xx_eth_driver.c │ ├── stm32h7xx_eth_driver.h │ ├── stm32mp13xx_eth1_driver.c │ ├── stm32mp13xx_eth1_driver.h │ ├── stm32mp13xx_eth2_driver.c │ ├── stm32mp13xx_eth2_driver.h │ ├── stm32mp1xx_eth_driver.c │ ├── stm32mp1xx_eth_driver.h │ ├── stm32mp2xx_eth1_driver.c │ ├── stm32mp2xx_eth1_driver.h │ ├── stm32mp2xx_eth2_driver.c │ ├── stm32mp2xx_eth2_driver.h │ ├── stm32n6xx_eth_driver.c │ ├── stm32n6xx_eth_driver.h │ ├── str912_eth_driver.c │ ├── str912_eth_driver.h │ ├── tc2xx_eth_driver.c │ ├── tc2xx_eth_driver.h │ ├── tc3xx_eth_driver.c │ ├── tc3xx_eth_driver.h │ ├── tm4c129_eth_driver.c │ ├── tm4c129_eth_driver.h │ ├── tms570_eth_driver.c │ ├── tms570_eth_driver.h │ ├── xmc4400_eth_driver.c │ ├── xmc4400_eth_driver.h │ ├── xmc4500_eth_driver.c │ ├── xmc4500_eth_driver.h │ ├── xmc4700_eth_driver.c │ ├── xmc4700_eth_driver.h │ ├── xmc4800_eth_driver.c │ ├── xmc4800_eth_driver.h │ ├── zynq7000_eth_driver.c │ └── zynq7000_eth_driver.h ├── pcap │ ├── pcap_driver.c │ └── pcap_driver.h ├── phy │ ├── adin1100_driver.c │ ├── adin1100_driver.h │ ├── adin1200_driver.c │ ├── adin1200_driver.h │ ├── adin1300_driver.c │ ├── adin1300_driver.h │ ├── ar8031_driver.c │ ├── ar8031_driver.h │ ├── ar8035_driver.c │ ├── ar8035_driver.h │ ├── dm9161_driver.c │ ├── dm9161_driver.h │ ├── dm9162_driver.c │ ├── dm9162_driver.h │ ├── dp83620_driver.c │ ├── dp83620_driver.h │ ├── dp83630_driver.c │ ├── dp83630_driver.h │ ├── dp83640_driver.c │ ├── dp83640_driver.h │ ├── dp83822_driver.c │ ├── dp83822_driver.h │ ├── dp83825_driver.c │ ├── dp83825_driver.h │ ├── dp83826_driver.c │ ├── dp83826_driver.h │ ├── dp83848_driver.c │ ├── dp83848_driver.h │ ├── dp83867_driver.c │ ├── dp83867_driver.h │ ├── dp83869_driver.c │ ├── dp83869_driver.h │ ├── dp83tc811_driver.c │ ├── dp83tc811_driver.h │ ├── dp83tc812_driver.c │ ├── dp83tc812_driver.h │ ├── dp83td510_driver.c │ ├── dp83td510_driver.h │ ├── dp83tg720_driver.c │ ├── dp83tg720_driver.h │ ├── ics1894_driver.c │ ├── ics1894_driver.h │ ├── ip101_driver.c │ ├── ip101_driver.h │ ├── ksz8031_driver.c │ ├── ksz8031_driver.h │ ├── ksz8041_driver.c │ ├── ksz8041_driver.h │ ├── ksz8051_driver.c │ ├── ksz8051_driver.h │ ├── ksz8061_driver.c │ ├── ksz8061_driver.h │ ├── ksz8081_driver.c │ ├── ksz8081_driver.h │ ├── ksz8091_driver.c │ ├── ksz8091_driver.h │ ├── ksz8721_driver.c │ ├── ksz8721_driver.h │ ├── ksz9031_driver.c │ ├── ksz9031_driver.h │ ├── ksz9131_driver.c │ ├── ksz9131_driver.h │ ├── lan8670_driver.c │ ├── lan8670_driver.h │ ├── lan8671_driver.c │ ├── lan8671_driver.h │ ├── lan8672_driver.c │ ├── lan8672_driver.h │ ├── lan8700_driver.c │ ├── lan8700_driver.h │ ├── lan8710_driver.c │ ├── lan8710_driver.h │ ├── lan8720_driver.c │ ├── lan8720_driver.h │ ├── lan8740_driver.c │ ├── lan8740_driver.h │ ├── lan8741_driver.c │ ├── lan8741_driver.h │ ├── lan8742_driver.c │ ├── lan8742_driver.h │ ├── lan8770_driver.c │ ├── lan8770_driver.h │ ├── lan8830_driver.c │ ├── lan8830_driver.h │ ├── lan8841_driver.c │ ├── lan8841_driver.h │ ├── mv88e1112_driver.c │ ├── mv88e1112_driver.h │ ├── mv88e1512_driver.c │ ├── mv88e1512_driver.h │ ├── ncn26000_driver.c │ ├── ncn26000_driver.h │ ├── pef7071_driver.c │ ├── pef7071_driver.h │ ├── rtl8201_driver.c │ ├── rtl8201_driver.h │ ├── rtl8211e_driver.c │ ├── rtl8211e_driver.h │ ├── rtl8211f_driver.c │ ├── rtl8211f_driver.h │ ├── st802rt1a_driver.c │ ├── st802rt1a_driver.h │ ├── tja1100_driver.c │ ├── tja1100_driver.h │ ├── tja1101_driver.c │ ├── tja1101_driver.h │ ├── tja1102_driver.c │ ├── tja1102_driver.h │ ├── tja1103_driver.c │ ├── tja1103_driver.h │ ├── upd60611_driver.c │ ├── upd60611_driver.h │ ├── vsc8662_driver.c │ └── vsc8662_driver.h ├── switch │ ├── adin2111_driver.c │ ├── adin2111_driver.h │ ├── ksz8463_driver.c │ ├── ksz8463_driver.h │ ├── ksz8563_driver.c │ ├── ksz8563_driver.h │ ├── ksz8565_driver.c │ ├── ksz8565_driver.h │ ├── ksz8567_driver.c │ ├── ksz8567_driver.h │ ├── ksz8775_driver.c │ ├── ksz8775_driver.h │ ├── ksz8794_driver.c │ ├── ksz8794_driver.h │ ├── ksz8795_driver.c │ ├── ksz8795_driver.h │ ├── ksz8863_driver.c │ ├── ksz8863_driver.h │ ├── ksz8864_driver.c │ ├── ksz8864_driver.h │ ├── ksz8873_driver.c │ ├── ksz8873_driver.h │ ├── ksz8895_driver.c │ ├── ksz8895_driver.h │ ├── ksz9477_driver.c │ ├── ksz9477_driver.h │ ├── ksz9563_driver.c │ ├── ksz9563_driver.h │ ├── ksz9893_driver.c │ ├── ksz9893_driver.h │ ├── ksz9896_driver.c │ ├── ksz9896_driver.h │ ├── ksz9897_driver.c │ ├── ksz9897_driver.h │ ├── lan9303_driver.c │ ├── lan9303_driver.h │ ├── lan9353_driver.c │ ├── lan9353_driver.h │ ├── lan9354_driver.c │ ├── lan9354_driver.h │ ├── lan9355_driver.c │ ├── lan9355_driver.h │ ├── lan9370_driver.c │ ├── lan9370_driver.h │ ├── mv88e6060_driver.c │ ├── mv88e6060_driver.h │ ├── sja1105_driver.c │ └── sja1105_driver.h ├── usb_rndis │ ├── rndis.c │ ├── rndis.h │ ├── rndis_debug.c │ ├── rndis_debug.h │ ├── rndis_driver.c │ ├── rndis_driver.h │ ├── usbd_desc.c │ ├── usbd_desc.h │ ├── usbd_rndis.c │ └── usbd_rndis.h └── wifi │ ├── bcm43362_driver.c │ ├── bcm43362_driver.h │ ├── cc33xx_driver.c │ ├── cc33xx_driver.h │ ├── esp32_wifi_driver.c │ ├── esp32_wifi_driver.h │ ├── esp8266_driver.c │ ├── esp8266_driver.h │ ├── mrf24wg_driver.c │ ├── mrf24wg_driver.h │ ├── wf200_driver.c │ ├── wf200_driver.h │ ├── wilc1000_driver.c │ ├── wilc1000_driver.h │ ├── winc1500_driver.c │ ├── winc1500_driver.h │ ├── winc3400_driver.c │ └── winc3400_driver.h ├── echo ├── echo_server.c ├── echo_server.h ├── echo_server_misc.c └── echo_server_misc.h ├── ftp ├── ftp_client.c ├── ftp_client.h ├── ftp_client_misc.c ├── ftp_client_misc.h ├── ftp_client_transport.c ├── ftp_client_transport.h ├── ftp_server.c ├── ftp_server.h ├── ftp_server_commands.c ├── ftp_server_commands.h ├── ftp_server_control.c ├── ftp_server_control.h ├── ftp_server_data.c ├── ftp_server_data.h ├── ftp_server_misc.c ├── ftp_server_misc.h ├── ftp_server_transport.c └── ftp_server_transport.h ├── http ├── http_client.c ├── http_client.h ├── http_client_auth.c ├── http_client_auth.h ├── http_client_misc.c ├── http_client_misc.h ├── http_client_transport.c ├── http_client_transport.h ├── http_common.c ├── http_common.h ├── http_server.c ├── http_server.h ├── http_server_auth.c ├── http_server_auth.h ├── http_server_misc.c ├── http_server_misc.h ├── mime.c ├── mime.h ├── ssi.c └── ssi.h ├── icecast ├── icecast_client.c └── icecast_client.h ├── igmp ├── igmp_common.c ├── igmp_common.h ├── igmp_debug.c ├── igmp_debug.h ├── igmp_host.c ├── igmp_host.h ├── igmp_host_misc.c ├── igmp_host_misc.h ├── igmp_router.c ├── igmp_router.h ├── igmp_router_misc.c ├── igmp_router_misc.h ├── igmp_snooping.c ├── igmp_snooping.h ├── igmp_snooping_misc.c └── igmp_snooping_misc.h ├── ipv4 ├── arp.c ├── arp.h ├── arp_cache.c ├── arp_cache.h ├── auto_ip.c ├── auto_ip.h ├── auto_ip_misc.c ├── auto_ip_misc.h ├── icmp.c ├── icmp.h ├── ipv4.c ├── ipv4.h ├── ipv4_frag.c ├── ipv4_frag.h ├── ipv4_misc.c ├── ipv4_misc.h ├── ipv4_multicast.c ├── ipv4_multicast.h └── ipv4_routing.h ├── ipv6 ├── icmpv6.c ├── icmpv6.h ├── ipv6.c ├── ipv6.h ├── ipv6_frag.c ├── ipv6_frag.h ├── ipv6_misc.c ├── ipv6_misc.h ├── ipv6_multicast.c ├── ipv6_multicast.h ├── ipv6_pmtu.c ├── ipv6_pmtu.h ├── ipv6_routing.c ├── ipv6_routing.h ├── ndp.c ├── ndp.h ├── ndp_cache.c ├── ndp_cache.h ├── ndp_misc.c ├── ndp_misc.h ├── ndp_router_adv.c ├── ndp_router_adv.h ├── ndp_router_adv_misc.c ├── ndp_router_adv_misc.h ├── slaac.c ├── slaac.h ├── slaac_misc.c └── slaac_misc.h ├── lldp ├── lldp.c ├── lldp.h ├── lldp_debug.c ├── lldp_debug.h ├── lldp_ext_dot1.c ├── lldp_ext_dot1.h ├── lldp_ext_dot3.c ├── lldp_ext_dot3.h ├── lldp_ext_med.c ├── lldp_ext_med.h ├── lldp_ext_pno.h ├── lldp_fsm.c ├── lldp_fsm.h ├── lldp_mgmt.c ├── lldp_mgmt.h ├── lldp_misc.c ├── lldp_misc.h ├── lldp_procedures.c ├── lldp_procedures.h ├── lldp_rx_fsm.c ├── lldp_rx_fsm.h ├── lldp_tlv.c ├── lldp_tlv.h ├── lldp_tx_fsm.c └── lldp_tx_fsm.h ├── llmnr ├── llmnr_client.c ├── llmnr_client.h ├── llmnr_common.c ├── llmnr_common.h ├── llmnr_responder.c └── llmnr_responder.h ├── mdns ├── mdns_client.c ├── mdns_client.h ├── mdns_common.c ├── mdns_common.h ├── mdns_responder.c ├── mdns_responder.h ├── mdns_responder_misc.c └── mdns_responder_misc.h ├── mibs ├── if_mib_impl.c ├── if_mib_impl.h ├── if_mib_module.c ├── if_mib_module.h ├── ip_mib_impl.c ├── ip_mib_impl.h ├── ip_mib_module.c ├── ip_mib_module.h ├── lldp_mib_impl.c ├── lldp_mib_impl.h ├── lldp_mib_impl_config.c ├── lldp_mib_impl_config.h ├── lldp_mib_impl_local.c ├── lldp_mib_impl_local.h ├── lldp_mib_impl_remote.c ├── lldp_mib_impl_remote.h ├── lldp_mib_impl_stats.c ├── lldp_mib_impl_stats.h ├── lldp_mib_module.c ├── lldp_mib_module.h ├── mib2_impl.c ├── mib2_impl.h ├── mib2_impl_if.c ├── mib2_impl_if.h ├── mib2_impl_ip.c ├── mib2_impl_ip.h ├── mib2_impl_sys.c ├── mib2_impl_sys.h ├── mib2_impl_tcp.c ├── mib2_impl_tcp.h ├── mib2_impl_udp.c ├── mib2_impl_udp.h ├── mib2_module.c ├── mib2_module.h ├── mib_common.c ├── mib_common.h ├── snmp_community_mib_impl.c ├── snmp_community_mib_impl.h ├── snmp_community_mib_module.c ├── snmp_community_mib_module.h ├── snmp_framework_mib_impl.c ├── snmp_framework_mib_impl.h ├── snmp_framework_mib_module.c ├── snmp_framework_mib_module.h ├── snmp_mib_impl.c ├── snmp_mib_impl.h ├── snmp_mib_module.c ├── snmp_mib_module.h ├── snmp_mpd_mib_impl.c ├── snmp_mpd_mib_impl.h ├── snmp_mpd_mib_module.c ├── snmp_mpd_mib_module.h ├── snmp_usm_mib_impl.c ├── snmp_usm_mib_impl.h ├── snmp_usm_mib_module.c ├── snmp_usm_mib_module.h ├── snmp_vacm_mib_impl.c ├── snmp_vacm_mib_impl.h ├── snmp_vacm_mib_module.c ├── snmp_vacm_mib_module.h ├── tcp_mib_impl.c ├── tcp_mib_impl.h ├── tcp_mib_module.c ├── tcp_mib_module.h ├── udp_mib_impl.c ├── udp_mib_impl.h ├── udp_mib_module.c └── udp_mib_module.h ├── mld ├── mld_common.c ├── mld_common.h ├── mld_debug.c ├── mld_debug.h ├── mld_node.c ├── mld_node.h ├── mld_node_misc.c └── mld_node_misc.h ├── modbus ├── modbus_client.c ├── modbus_client.h ├── modbus_client_misc.c ├── modbus_client_misc.h ├── modbus_client_pdu.c ├── modbus_client_pdu.h ├── modbus_client_transport.c ├── modbus_client_transport.h ├── modbus_common.h ├── modbus_debug.c ├── modbus_debug.h ├── modbus_server.c ├── modbus_server.h ├── modbus_server_misc.c ├── modbus_server_misc.h ├── modbus_server_pdu.c ├── modbus_server_pdu.h ├── modbus_server_security.c ├── modbus_server_security.h ├── modbus_server_transport.c └── modbus_server_transport.h ├── mqtt ├── mqtt_client.c ├── mqtt_client.h ├── mqtt_client_misc.c ├── mqtt_client_misc.h ├── mqtt_client_packet.c ├── mqtt_client_packet.h ├── mqtt_client_transport.c ├── mqtt_client_transport.h └── mqtt_common.h ├── mqtt_sn ├── mqtt_sn_client.c ├── mqtt_sn_client.h ├── mqtt_sn_client_message.c ├── mqtt_sn_client_message.h ├── mqtt_sn_client_misc.c ├── mqtt_sn_client_misc.h ├── mqtt_sn_client_transport.c ├── mqtt_sn_client_transport.h ├── mqtt_sn_common.h ├── mqtt_sn_debug.c ├── mqtt_sn_debug.h ├── mqtt_sn_message.c └── mqtt_sn_message.h ├── nat ├── nat.c ├── nat.h ├── nat_misc.c └── nat_misc.h ├── netbios ├── nbns_client.c ├── nbns_client.h ├── nbns_common.c ├── nbns_common.h ├── nbns_responder.c └── nbns_responder.h ├── ntp ├── ntp_common.c ├── ntp_common.h ├── ntp_debug.c └── ntp_debug.h ├── nts ├── nts_client.c ├── nts_client.h ├── nts_client_misc.c ├── nts_client_misc.h ├── nts_common.h ├── nts_debug.c └── nts_debug.h ├── ppp ├── chap.c ├── chap.h ├── ipcp.c ├── ipcp.h ├── ipv6cp.c ├── ipv6cp.h ├── lcp.c ├── lcp.h ├── pap.c ├── pap.h ├── ppp.c ├── ppp.h ├── ppp_debug.c ├── ppp_debug.h ├── ppp_fsm.c ├── ppp_fsm.h ├── ppp_hdlc.c ├── ppp_hdlc.h ├── ppp_misc.c └── ppp_misc.h ├── smtp ├── smtp_client.c ├── smtp_client.h ├── smtp_client_auth.c ├── smtp_client_auth.h ├── smtp_client_misc.c ├── smtp_client_misc.h ├── smtp_client_transport.c └── smtp_client_transport.h ├── snmp ├── snmp_agent.c ├── snmp_agent.h ├── snmp_agent_dispatch.c ├── snmp_agent_dispatch.h ├── snmp_agent_inform.c ├── snmp_agent_inform.h ├── snmp_agent_message.c ├── snmp_agent_message.h ├── snmp_agent_misc.c ├── snmp_agent_misc.h ├── snmp_agent_object.c ├── snmp_agent_object.h ├── snmp_agent_pdu.c ├── snmp_agent_pdu.h ├── snmp_agent_trap.c ├── snmp_agent_trap.h ├── snmp_agent_usm.c ├── snmp_agent_usm.h ├── snmp_agent_vacm.c ├── snmp_agent_vacm.h └── snmp_common.h ├── sntp ├── sntp_client.c ├── sntp_client.h ├── sntp_client_misc.c └── sntp_client_misc.h ├── syslog ├── syslog_client.c ├── syslog_client.h ├── syslog_client_misc.c └── syslog_client_misc.h ├── tftp ├── tftp_client.c ├── tftp_client.h ├── tftp_client_misc.c ├── tftp_client_misc.h ├── tftp_common.h ├── tftp_server.c ├── tftp_server.h ├── tftp_server_misc.c └── tftp_server_misc.h └── web_socket ├── web_socket.c ├── web_socket.h ├── web_socket_auth.c ├── web_socket_auth.h ├── web_socket_frame.c ├── web_socket_frame.h ├── web_socket_misc.c ├── web_socket_misc.h ├── web_socket_transport.c └── web_socket_transport.h /README.md: -------------------------------------------------------------------------------- 1 | # CycloneTCP 2 | Dual IPv4/IPv6 Stack 3 | -------------------------------------------------------------------------------- /coap/coap_client_block.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file coap_client_block.h 3 | * @brief CoAP block-wise transfer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _COAP_CLIENT_BLOCK_H 32 | #define _COAP_CLIENT_BLOCK_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "coap/coap_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //CoAP client related functions 44 | error_t coapClientSetTxBlockSize(CoapClientRequest *request, uint_t blockSize); 45 | error_t coapClientSetRxBlockSize(CoapClientRequest *request, uint_t blockSize); 46 | 47 | error_t coapClientWriteBody(CoapClientRequest *request, const void *data, 48 | size_t length, size_t *written, bool_t last); 49 | 50 | error_t coapClientReadBody(CoapClientRequest *request, void *data, 51 | size_t size, size_t *received); 52 | 53 | CoapBlockSize coapClientGetMaxBlockSize(void); 54 | 55 | //C++ guard 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /coap/coap_client_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file coap_client_misc.h 3 | * @brief Helper functions for CoAP client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _COAP_CLIENT_MISC_H 32 | #define _COAP_CLIENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "coap/coap_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //CoAP client related functions 44 | error_t coapClientProcessEvents(CoapClientContext *context, systime_t timeout); 45 | error_t coapClientProcessRequestEvents(CoapClientRequest *request); 46 | 47 | error_t coapClientChangeRequestState(CoapClientRequest *request, 48 | CoapRequestState newState); 49 | 50 | error_t coapClientMatchResponse(const CoapClientRequest *request, 51 | const CoapMessage *response); 52 | 53 | error_t coapClientProcessResponse(CoapClientRequest *request, 54 | const CoapMessage *response); 55 | 56 | error_t coapClientRejectResponse(CoapClientContext *context, 57 | const CoapMessage *response); 58 | 59 | error_t coapClientSendAck(CoapClientContext *context, uint16_t mid); 60 | error_t coapClientSendReset(CoapClientContext *context, uint16_t mid); 61 | 62 | void coapClientGenerateMessageId(CoapClientContext *context, 63 | CoapMessageHeader *header); 64 | 65 | void coapClientGenerateToken(CoapClientContext *context, 66 | CoapMessageHeader *header); 67 | 68 | //C++ guard 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /coap/coap_client_observe.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file coap_client_observe.h 3 | * @brief CoAP observe 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _COAP_CLIENT_OBSERVE_H 32 | #define _COAP_CLIENT_OBSERVE_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "coap/coap_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //CoAP client related functions 44 | error_t coapClientProcessNotification(CoapClientRequest *request, 45 | const CoapMessage *response); 46 | 47 | bool_t coapClientCheckSequenceNumber(CoapClientRequest *request, 48 | uint32_t v2, systime_t t2); 49 | 50 | //C++ guard 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /coap/coap_client_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file coap_client_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _COAP_CLIENT_TRANSPORT_H 32 | #define _COAP_CLIENT_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "coap/coap_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //CoAP client related functions 44 | error_t coapClientOpenConnection(CoapClientContext *context); 45 | 46 | error_t coapClientEstablishConnection(CoapClientContext *context, 47 | const IpAddr *serverIpAddr, uint16_t serverPort); 48 | 49 | error_t coapClientShutdownConnection(CoapClientContext *context); 50 | 51 | void coapClientCloseConnection(CoapClientContext *context); 52 | 53 | error_t coapClientSendDatagram(CoapClientContext *context, 54 | const void *data, size_t length); 55 | 56 | error_t coapClientReceiveDatagram(CoapClientContext *context, 57 | void *data, size_t size, size_t *received); 58 | 59 | error_t coapClientWaitForDatagram(CoapClientContext *context, 60 | systime_t timeout); 61 | 62 | //C++ guard 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /coap/coap_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file coap_debug.h 3 | * @brief Data logging functions for debugging purpose (CoAP) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _COAP_DEBUG_H 32 | #define _COAP_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "coap/coap_common.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | 44 | /** 45 | * @brief Parameter value/name binding 46 | **/ 47 | 48 | typedef struct 49 | { 50 | uint8_t value; 51 | const char_t *name; 52 | } CoapParamName; 53 | 54 | 55 | //CoAP related functions 56 | error_t coapDumpMessage(const void *message, size_t length); 57 | error_t coapDumpMessageHeader(const uint8_t *p, size_t length, size_t *consumed); 58 | error_t coapDumpOptions(const uint8_t *p, size_t length, size_t *consumed); 59 | error_t coapDumpOption(const CoapOption *option); 60 | 61 | const char_t *coapGetParamName(uint_t value, const CoapParamName *paramList, 62 | size_t paramListLen); 63 | 64 | //C++ guard 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /coap/coap_server_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file coap_server_misc.h 3 | * @brief Helper functions for CoAP server 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _COAP_SERVER_MISC_H 32 | #define _COAP_SERVER_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "coap/coap_server.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //CoAP server related functions 44 | void coapServerTick(CoapServerContext *context); 45 | 46 | error_t coapServerProcessRequest(CoapServerContext *context, 47 | const uint8_t *data, size_t length); 48 | 49 | error_t coapServerRejectRequest(CoapServerContext *context); 50 | 51 | error_t coapServerInitResponse(CoapServerContext *context); 52 | 53 | error_t coapServerSendResponse(CoapServerContext *context, 54 | const void *data, size_t length); 55 | 56 | error_t coapServerFormatReset(CoapServerContext *context, uint16_t mid); 57 | 58 | //C++ guard 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /coap/coap_server_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file coap_server_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _COAP_SERVER_TRANSPORT_H 32 | #define _COAP_SERVER_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "coap/coap_server.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //CoAP server related functions 44 | error_t coapServerAcceptSession(CoapServerContext *context, 45 | CoapDtlsSession *session, const IpAddr *remoteIpAddr, uint16_t remotePort); 46 | 47 | error_t coapServerDemultiplexSession(CoapServerContext *context); 48 | 49 | void coapServerDeleteSession(CoapDtlsSession *session); 50 | 51 | //C++ guard 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /core/bsd_socket_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file bsd_socket_misc.h 3 | * @brief Helper function for BSD socket API 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _BSD_SOCKET_MISC_H 32 | #define _BSD_SOCKET_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "core/bsd_socket.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //BSD socket related functions 44 | void socketSetErrnoCode(Socket *socket, uint_t errnoCode); 45 | void socketTranslateErrorCode(Socket *socket, error_t errorCode); 46 | 47 | //C++ guard 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /core/ethernet_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ethernet_misc.h 3 | * @brief Helper functions for Ethernet 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _ETHERNET_MISC_H 32 | #define _ETHERNET_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "core/ethernet.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Ethernet related constants 44 | extern const uint8_t ethPadding[64]; 45 | 46 | //Ethernet related functions 47 | error_t ethPadFrame(NetBuffer *buffer, size_t *length); 48 | 49 | error_t ethEncodeVlanTag(NetBuffer *buffer, size_t *offset, uint16_t vlanId, 50 | int8_t vlanPcp, int8_t vlanDei, uint16_t type); 51 | 52 | error_t ethDecodeVlanTag(const uint8_t *frame, size_t length, uint16_t *vlanId, 53 | uint16_t *type); 54 | 55 | error_t ethCheckDestAddr(NetInterface *interface, const MacAddr *macAddr); 56 | bool_t ethTrapIgmpPacket(EthHeader *header, uint8_t *data, size_t length); 57 | 58 | void ethUpdateInStats(NetInterface *interface, const MacAddr *destMacAddr); 59 | 60 | void ethUpdateOutStats(NetInterface *interface, const MacAddr *destMacAddr, 61 | size_t length); 62 | 63 | void ethUpdateErrorStats(NetInterface *interface, error_t error); 64 | 65 | uint32_t ethCalcCrc(const void *data, size_t length); 66 | uint32_t ethCalcCrcEx(const NetBuffer *buffer, size_t offset, size_t length); 67 | 68 | error_t ethCheckCrc(NetInterface *interface, const uint8_t *frame, 69 | size_t length); 70 | 71 | //C++ guard 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /core/socket_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file socket_misc.h 3 | * @brief Helper functions for sockets 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SOCKET_MISC_H 32 | #define _SOCKET_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "core/socket.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Socket related functions 44 | Socket *socketAllocate(uint_t type, uint_t protocol); 45 | 46 | void socketRegisterEvents(Socket *socket, OsEvent *event, uint_t eventMask); 47 | void socketUnregisterEvents(Socket *socket); 48 | uint_t socketGetEvents(Socket *socket); 49 | 50 | bool_t socketMulticastFilter(Socket *socket, const IpAddr *destAddr, 51 | const IpAddr *srcAddr); 52 | 53 | SocketMulticastGroup *socketCreateMulticastGroupEntry(Socket *socket, 54 | const IpAddr *groupAddr); 55 | 56 | SocketMulticastGroup *socketFindMulticastGroupEntry(Socket *socket, 57 | const IpAddr *groupAddr); 58 | 59 | void socketDeleteMulticastGroupEntry(SocketMulticastGroup *group); 60 | 61 | error_t socketAddMulticastSrcAddr(SocketMulticastGroup *group, 62 | const IpAddr *srcAddr); 63 | 64 | void socketRemoveMulticastSrcAddr(SocketMulticastGroup *group, 65 | const IpAddr *srcAddr); 66 | 67 | int_t socketFindMulticastSrcAddr(SocketMulticastGroup *group, 68 | const IpAddr *srcAddr); 69 | 70 | //C++ guard 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /core/tcp_timer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tcp_timer.h 3 | * @brief TCP timer management 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _TCP_TIMER_H 32 | #define _TCP_TIMER_H 33 | 34 | //C++ guard 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | //TCP timer related functions 40 | void tcpTick(void); 41 | 42 | void tcpCheckRetransmitTimer(Socket *socket); 43 | void tcpCheckPersistTimer(Socket *socket); 44 | void tcpCheckKeepAliveTimer(Socket *socket); 45 | void tcpCheckOverrideTimer(Socket *socket); 46 | void tcpCheckFinWait2Timer(Socket *socket); 47 | void tcpCheckTimeWaitTimer(Socket *socket); 48 | 49 | //C++ guard 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /dhcp/dhcp_client_fsm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file dhcp_client_fsm.h 3 | * @brief DHCP client finite state machine 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _DHCP_CLIENT_FSM_H 32 | #define _DHCP_CLIENT_FSM_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "dhcp/dhcp_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //DHCP client related functions 44 | void dhcpClientStateInit(DhcpClientContext *context); 45 | void dhcpClientStateSelecting(DhcpClientContext *context); 46 | void dhcpClientStateRequesting(DhcpClientContext *context); 47 | void dhcpClientStateInitReboot(DhcpClientContext *context); 48 | void dhcpClientStateRebooting(DhcpClientContext *context); 49 | void dhcpClientStateProbing(DhcpClientContext *context); 50 | void dhcpClientStateAnnouncing(DhcpClientContext *context); 51 | void dhcpClientStateBound(DhcpClientContext *context); 52 | void dhcpClientStateRenewing(DhcpClientContext *context); 53 | void dhcpClientStateRebinding(DhcpClientContext *context); 54 | 55 | //C++ guard 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /dhcp/dhcp_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file dhcp_debug.h 3 | * @brief Data logging functions for debugging purpose (DHCP) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _DHCP_DEBUG_H 32 | #define _DHCP_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "dhcp/dhcp_common.h" 37 | #include "debug.h" 38 | 39 | //C++ guard 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | //Check current trace level 45 | #if (DHCP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) 46 | error_t dhcpDumpMessage(const DhcpMessage *message, size_t length); 47 | error_t dhcpDumpMessageType(const DhcpOption *option); 48 | error_t dhcpDumpParamRequestList(const DhcpOption *option); 49 | error_t dhcpDumpBoolean(const DhcpOption *option); 50 | error_t dhcpDumpInt8(const DhcpOption *option); 51 | error_t dhcpDumpInt16(const DhcpOption *option); 52 | error_t dhcpDumpInt32(const DhcpOption *option); 53 | error_t dhcpDumpString(const DhcpOption *option); 54 | error_t dhcpDumpIpv4Addr(const DhcpOption *option); 55 | error_t dhcpDumpIpv4AddrList(const DhcpOption *option); 56 | error_t dhcpDumpRawData(const DhcpOption *option); 57 | #else 58 | #define dhcpDumpMessage(message, length) 59 | #endif 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /dhcpv6/dhcpv6_client_fsm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file dhcpv6_client_fsm.h 3 | * @brief DHCPv6 client finite state machine 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _DHCPV6_CLIENT_FSM_H 32 | #define _DHCPV6_CLIENT_FSM_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "dhcpv6/dhcpv6_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //DHCPv6 client related functions 44 | void dhcpv6ClientStateInit(Dhcpv6ClientContext *context); 45 | void dhcpv6ClientStateSolicit(Dhcpv6ClientContext *context); 46 | void dhcpv6ClientStateRequest(Dhcpv6ClientContext *context); 47 | void dhcpv6ClientStateInitConfirm(Dhcpv6ClientContext *context); 48 | void dhcpv6ClientStateConfirm(Dhcpv6ClientContext *context); 49 | void dhcpv6ClientStateDad(Dhcpv6ClientContext *context); 50 | void dhcpv6ClientStateBound(Dhcpv6ClientContext *context); 51 | void dhcpv6ClientStateRenew(Dhcpv6ClientContext *context); 52 | void dhcpv6ClientStateRebind(Dhcpv6ClientContext *context); 53 | void dhcpv6ClientStateRelease(Dhcpv6ClientContext *context); 54 | void dhcpv6ClientStateDecline(Dhcpv6ClientContext *context); 55 | 56 | //C++ guard 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /dns/dns_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file dns_debug.h 3 | * @brief Data logging functions for debugging purpose (DNS) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _DNS_DEBUG_H 32 | #define _DNS_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "dns/dns_common.h" 37 | #include "debug.h" 38 | 39 | //C++ guard 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | //Check current trace level 45 | #if (DNS_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) 46 | void dnsDumpMessage(const DnsHeader *message, size_t length); 47 | size_t dnsDumpQuestion(const DnsHeader *message, size_t length, size_t pos, char_t *buffer); 48 | size_t dnsDumpResourceRecord(const DnsHeader *message, size_t length, size_t pos, char_t *buffer); 49 | #else 50 | #define dnsDumpMessage(message, length) 51 | #endif 52 | 53 | //C++ guard 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /drivers/loopback/loopback_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file loopback_driver.h 3 | * @brief Loopback interface driver 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _LOOPBACK_DRIVER_H 32 | #define _LOOPBACK_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //Queue size 38 | #ifndef LOOPBACK_DRIVER_QUEUE_SIZE 39 | #define LOOPBACK_DRIVER_QUEUE_SIZE 6 40 | #elif (LOOPBACK_DRIVER_QUEUE_SIZE < 1) 41 | #error LOOPBACK_DRIVER_QUEUE_SIZE parameter is not valid 42 | #endif 43 | 44 | 45 | /** 46 | * @brief Loopback interface queue entry 47 | **/ 48 | 49 | typedef struct 50 | { 51 | size_t length; 52 | uint8_t data[ETH_MTU]; 53 | } LoopbackDriverQueueEntry; 54 | 55 | 56 | //Loopback interface driver 57 | extern const NicDriver loopbackDriver; 58 | 59 | //Loopback interface related functions 60 | error_t loopbackDriverInit(NetInterface *interface); 61 | 62 | void loopbackDriverTick(NetInterface *interface); 63 | 64 | void loopbackDriverEnableIrq(NetInterface *interface); 65 | void loopbackDriverDisableIrq(NetInterface *interface); 66 | void loopbackDriverEventHandler(NetInterface *interface); 67 | 68 | error_t loopbackDriverSendPacket(NetInterface *interface, 69 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 70 | 71 | error_t loopbackDriverReceivePacket(NetInterface *interface); 72 | 73 | error_t loopbackDriverUpdateMacAddrFilter(NetInterface *interface); 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /drivers/mac/am335x_eth_driver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oryx-Embedded/CycloneTCP/14d7525b9572c616f4a0dd469e302b4b64a7a0a2/drivers/mac/am335x_eth_driver.c -------------------------------------------------------------------------------- /drivers/mac/omapl138_eth_driver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oryx-Embedded/CycloneTCP/14d7525b9572c616f4a0dd469e302b4b64a7a0a2/drivers/mac/omapl138_eth_driver.c -------------------------------------------------------------------------------- /drivers/mac/rm57_eth_driver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oryx-Embedded/CycloneTCP/14d7525b9572c616f4a0dd469e302b4b64a7a0a2/drivers/mac/rm57_eth_driver.c -------------------------------------------------------------------------------- /drivers/mac/tms570_eth_driver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oryx-Embedded/CycloneTCP/14d7525b9572c616f4a0dd469e302b4b64a7a0a2/drivers/mac/tms570_eth_driver.c -------------------------------------------------------------------------------- /drivers/pcap/pcap_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file pcap_driver.h 3 | * @brief PCAP driver 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _PCAP_DRIVER_H 32 | #define _PCAP_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //Maximum packet size 38 | #ifndef PCAP_DRIVER_MAX_PACKET_SIZE 39 | #define PCAP_DRIVER_MAX_PACKET_SIZE 1536 40 | #elif (PCAP_DRIVER_MAX_PACKET_SIZE < 1) 41 | #error PCAP_DRIVER_MAX_PACKET_SIZE parameter is not valid 42 | #endif 43 | 44 | //Maximum number of packets in the receive queue 45 | #ifndef PCAP_DRIVER_QUEUE_SIZE 46 | #define PCAP_DRIVER_QUEUE_SIZE 64 47 | #elif (PCAP_DRIVER_QUEUE_SIZE < 1) 48 | #error PCAP_DRIVER_QUEUE_SIZE parameter is not valid 49 | #endif 50 | 51 | //Receive timeout in milliseconds 52 | #ifndef PCAP_DRIVER_TIMEOUT 53 | #define PCAP_DRIVER_TIMEOUT 1 54 | #elif (PCAP_DRIVER_TIMEOUT < 1) 55 | #error PCAP_DRIVER_TIMEOUT parameter is not valid 56 | #endif 57 | 58 | //C++ guard 59 | #ifdef __cplusplus 60 | extern "C" { 61 | #endif 62 | 63 | //PCAP driver 64 | extern const NicDriver pcapDriver; 65 | 66 | //PCAP related functions 67 | error_t pcapDriverInit(NetInterface *interface); 68 | 69 | void pcapDriverTick(NetInterface *interface); 70 | 71 | void pcapDriverEnableIrq(NetInterface *interface); 72 | void pcapDriverDisableIrq(NetInterface *interface); 73 | 74 | void pcapDriverEventHandler(NetInterface *interface); 75 | 76 | error_t pcapDriverSendPacket(NetInterface *interface, 77 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 78 | 79 | error_t pcapDriverUpdateMacAddrFilter(NetInterface *interface); 80 | 81 | void pcapDriverTask(NetInterface *interface); 82 | 83 | //C++ guard 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /drivers/usb_rndis/rndis_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file rndis_debug.h 3 | * @brief RNDIS (Remote Network Driver Interface Specification) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _RNDIS_DEBUG_H 32 | #define _RNDIS_DEBUG_H 33 | 34 | //Dependencies 35 | #include "rndis.h" 36 | 37 | 38 | /** 39 | * @brief Value/name pair 40 | **/ 41 | 42 | typedef struct 43 | { 44 | uint32_t value; 45 | const char_t *name; 46 | } RndisValueName; 47 | 48 | 49 | //RNDIS related functions 50 | error_t rndisDumpMsg(const RndisMsg *message, size_t length); 51 | error_t rndisDumpPacketMsg(const RndisPacketMsg *message, size_t length); 52 | error_t rndisDumpInitializeMsg(const RndisInitializeMsg *message, size_t length); 53 | error_t rndisDumpHaltMsg(const RndisHaltMsg *message, size_t length); 54 | error_t rndisDumpQueryMsg(const RndisQueryMsg *message, size_t length); 55 | error_t rndisDumpSetMsg(const RndisSetMsg *message, size_t length); 56 | error_t rndisDumpResetMsg(const RndisResetMsg *message, size_t length); 57 | error_t rndisDumpIndicateStatusMsg(const RndisIndicateStatusMsg *message, size_t length); 58 | error_t rndisDumpKeepAliveMsg(const RndisKeepAliveMsg *message, size_t length); 59 | 60 | error_t rndisDumpInitializeCmplt(const RndisInitializeCmplt *message, size_t length); 61 | error_t rndisDumpQueryCmplt(const RndisQueryCmplt *message, size_t length); 62 | error_t rndisDumpSetCmplt(const RndisSetCmplt *message, size_t length); 63 | error_t rndisDumpResetCmplt(const RndisResetCmplt *message, size_t length); 64 | error_t rndisDumpKeepAliveCmplt(const RndisKeepAliveCmplt *message, size_t length); 65 | 66 | const char_t *rndisFindName(uint32_t value, const RndisValueName *table, size_t size); 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /drivers/usb_rndis/usbd_rndis.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file usbd_rndis.h 3 | * @brief USB RNDIS class 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _USB_RNDIS_H 32 | #define _USB_RNDIS_H 33 | 34 | //Dependencies 35 | #include "usbd_ioreq.h" 36 | 37 | //USB endpoints 38 | #define RNDIS_NOTIFICATION_EP 0x81 39 | #define RNDIS_DATA_IN_EP 0x82 40 | #define RNDIS_DATA_OUT_EP 0x03 41 | 42 | //Endpoint maximum packet size 43 | #define RNDIS_NOTIFICATION_EP_MPS 64 44 | #define RNDIS_DATA_IN_EP_MPS_FS 64 45 | #define RNDIS_DATA_OUT_EP_MPS_FS 64 46 | #define RNDIS_DATA_IN_EP_MPS_HS 512 47 | #define RNDIS_DATA_OUT_EP_MPS_HS 512 48 | 49 | //RNDIS Class specific requests 50 | #define RNDIS_SEND_ENCAPSULATED_COMMAND 0x00 51 | #define RNDIS_GET_ENCAPSULATED_RESPONSE 0x01 52 | 53 | //Global variables 54 | extern USBD_HandleTypeDef USBD_Device; 55 | extern USBD_ClassTypeDef usbdRndisClass; 56 | #define USBD_RNDIS_CLASS &usbdRndisClass 57 | 58 | //RNDIS related functions 59 | uint8_t usbdRndisInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx); 60 | uint8_t usbdRndisDeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx); 61 | uint8_t usbdRndisSetup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 62 | uint8_t usbdRndisEp0RxReady(USBD_HandleTypeDef *pdev); 63 | uint8_t usbdRndisDataIn(USBD_HandleTypeDef *pdev, uint8_t epnum); 64 | uint8_t usbdRndisDataOut(USBD_HandleTypeDef *pdev, uint8_t epnum); 65 | uint8_t *usbdRndisGetHighSpeedConfigDesc(uint16_t *length); 66 | uint8_t *usbdRndisGetFullSpeedConfigDesc(uint16_t *length); 67 | uint8_t *usbdRndisGetOtherSpeedConfigDesc(uint16_t *length); 68 | uint8_t *usbdRndisGetDeviceQualifierDesc(uint16_t *length); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /drivers/wifi/bcm43362_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file bcm43362_driver.h 3 | * @brief BCM43362 Wi-Fi controller 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _BCM43362_DRIVER_H 32 | #define _BCM43362_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //BCM43362 driver (STA mode) 43 | extern const NicDriver bcm43362StaDriver; 44 | //BCM43362 driver (AP mode) 45 | extern const NicDriver bcm43362ApDriver; 46 | 47 | //BCM43362 related functions 48 | error_t bcm43362Init(NetInterface *interface); 49 | 50 | void bcm43362Tick(NetInterface *interface); 51 | 52 | void bcm43362EnableIrq(NetInterface *interface); 53 | void bcm43362DisableIrq(NetInterface *interface); 54 | bool_t bcm43362IrqHandler(void); 55 | void bcm43362EventHandler(NetInterface *interface); 56 | 57 | error_t bcm43362SendPacket(NetInterface *interface, 58 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 59 | 60 | error_t bcm43362UpdateMacAddrFilter(NetInterface *interface); 61 | 62 | void bcm43362AppWifiEvent(uint8_t msgType, void *msg); 63 | void bcm43362AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf); 64 | 65 | //C++ guard 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /drivers/wifi/cc33xx_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cc33xx_driver.h 3 | * @brief CC3300/CC3301 Wi-Fi controller 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _CC33XX_DRIVER_H 32 | #define _CC33XX_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //CC33xx driver (STA mode) 43 | extern const NicDriver cc33xxStaDriver; 44 | //CC33xx driver (AP mode) 45 | extern const NicDriver cc33xxApDriver; 46 | 47 | //CC33xx related functions 48 | error_t cc33xxInit(NetInterface *interface); 49 | 50 | void cc33xxTick(NetInterface *interface); 51 | 52 | void cc33xxEnableIrq(NetInterface *interface); 53 | void cc33xxDisableIrq(NetInterface *interface); 54 | void cc33xxEventHandler(NetInterface *interface); 55 | 56 | error_t cc33xxSendPacket(NetInterface *interface, 57 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 58 | 59 | error_t cc33xxUpdateMacAddrFilter(NetInterface *interface); 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /drivers/wifi/esp32_wifi_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file esp32_wifi_driver.h 3 | * @brief ESP32 Wi-Fi controller 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _ESP32_WIFI_DRIVER_H 32 | #define _ESP32_WIFI_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //ESP32 Wi-Fi driver (STA mode) 43 | extern const NicDriver esp32WifiStaDriver; 44 | //ESP32 Wi-Fi driver (AP mode) 45 | extern const NicDriver esp32WifiApDriver; 46 | 47 | //ESP32 Wi-Fi related functions 48 | error_t esp32WifiInit(NetInterface *interface); 49 | 50 | void esp32WifiTick(NetInterface *interface); 51 | 52 | void esp32WifiEnableIrq(NetInterface *interface); 53 | void esp32WifiDisableIrq(NetInterface *interface); 54 | void esp32WifiEventHandler(NetInterface *interface); 55 | 56 | error_t esp32WifiSendPacket(NetInterface *interface, 57 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 58 | 59 | error_t esp32WifiUpdateMacAddrFilter(NetInterface *interface); 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /drivers/wifi/esp8266_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file esp8266_driver.h 3 | * @brief ESP8266 Wi-Fi controller 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _ESP8266_WIFI_DRIVER_H 32 | #define _ESP8266_WIFI_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //ESP8266 Wi-Fi driver (STA mode) 43 | extern const NicDriver esp8266WifiStaDriver; 44 | //ESP8266 Wi-Fi driver (AP mode) 45 | extern const NicDriver esp8266WifiApDriver; 46 | 47 | //ESP8266 Wi-Fi related functions 48 | error_t esp8266WifiInit(NetInterface *interface); 49 | 50 | void esp8266WifiTick(NetInterface *interface); 51 | 52 | void esp8266WifiEnableIrq(NetInterface *interface); 53 | void esp8266WifiDisableIrq(NetInterface *interface); 54 | void esp8266WifiEventHandler(NetInterface *interface); 55 | 56 | error_t esp8266WifiSendPacket(NetInterface *interface, 57 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 58 | 59 | error_t esp8266WifiUpdateMacAddrFilter(NetInterface *interface); 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /drivers/wifi/wf200_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file wf200_driver.h 3 | * @brief WF200 Wi-Fi controller 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _WF200_DRIVER_H 32 | #define _WF200_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //WF200 driver (STA mode) 43 | extern const NicDriver wf200StaDriver; 44 | //WF200 driver (AP mode) 45 | extern const NicDriver wf200ApDriver; 46 | 47 | //WF200 related functions 48 | error_t wf200Init(NetInterface *interface); 49 | 50 | void wf200Tick(NetInterface *interface); 51 | 52 | void wf200EnableIrq(NetInterface *interface); 53 | void wf200DisableIrq(NetInterface *interface); 54 | void wf200EventHandler(NetInterface *interface); 55 | 56 | error_t wf200SendPacket(NetInterface *interface, 57 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 58 | 59 | error_t wf200UpdateMacAddrFilter(NetInterface *interface); 60 | 61 | void wf200ConnectCallback(void); 62 | void wf200DisconnectCallback(void); 63 | void wf200StartApCallback(void); 64 | void wf200StopApCallback(void); 65 | 66 | //C++ guard 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /drivers/wifi/winc1500_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file winc1500_driver.h 3 | * @brief WINC1500 Wi-Fi controller 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _WINC1500_DRIVER_H 32 | #define _WINC1500_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //TX buffer size 38 | #ifndef WINC1500_TX_BUFFER_SIZE 39 | #define WINC1500_TX_BUFFER_SIZE 1600 40 | #elif (WINC1500_TX_BUFFER_SIZE != 1600) 41 | #error WINC1500_TX_BUFFER_SIZE parameter is not valid 42 | #endif 43 | 44 | //RX buffer size 45 | #ifndef WINC1500_RX_BUFFER_SIZE 46 | #define WINC1500_RX_BUFFER_SIZE 1600 47 | #elif (WINC1500_RX_BUFFER_SIZE != 1600) 48 | #error WINC1500_RX_BUFFER_SIZE parameter is not valid 49 | #endif 50 | 51 | //C++ guard 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | 56 | //WINC1500 driver 57 | extern const NicDriver winc1500Driver; 58 | 59 | //WINC1500 related functions 60 | error_t winc1500Init(NetInterface *interface); 61 | 62 | void winc1500Tick(NetInterface *interface); 63 | 64 | void winc1500EnableIrq(NetInterface *interface); 65 | void winc1500DisableIrq(NetInterface *interface); 66 | bool_t winc1500IrqHandler(void); 67 | void winc1500EventHandler(NetInterface *interface); 68 | 69 | error_t winc1500SendPacket(NetInterface *interface, 70 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 71 | 72 | error_t winc1500UpdateMacAddrFilter(NetInterface *interface); 73 | 74 | void winc1500AppWifiEvent(uint8_t msgType, void *msg); 75 | void winc1500AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf); 76 | 77 | //C++ guard 78 | #ifdef __cplusplus 79 | } 80 | #endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /drivers/wifi/winc3400_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file winc3400_driver.h 3 | * @brief WINC3400 Wi-Fi controller 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _WINC3400_DRIVER_H 32 | #define _WINC3400_DRIVER_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //TX buffer size 38 | #ifndef WINC3400_TX_BUFFER_SIZE 39 | #define WINC3400_TX_BUFFER_SIZE 1600 40 | #elif (WINC3400_TX_BUFFER_SIZE != 1600) 41 | #error WINC3400_TX_BUFFER_SIZE parameter is not valid 42 | #endif 43 | 44 | //RX buffer size 45 | #ifndef WINC3400_RX_BUFFER_SIZE 46 | #define WINC3400_RX_BUFFER_SIZE 1600 47 | #elif (WINC3400_RX_BUFFER_SIZE != 1600) 48 | #error WINC3400_RX_BUFFER_SIZE parameter is not valid 49 | #endif 50 | 51 | //C++ guard 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | 56 | //WINC3400 driver 57 | extern const NicDriver winc3400Driver; 58 | 59 | //WINC3400 related functions 60 | error_t winc3400Init(NetInterface *interface); 61 | 62 | void winc3400Tick(NetInterface *interface); 63 | 64 | void winc3400EnableIrq(NetInterface *interface); 65 | void winc3400DisableIrq(NetInterface *interface); 66 | bool_t winc3400IrqHandler(void); 67 | void winc3400EventHandler(NetInterface *interface); 68 | 69 | error_t winc3400SendPacket(NetInterface *interface, 70 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 71 | 72 | error_t winc3400UpdateMacAddrFilter(NetInterface *interface); 73 | 74 | void winc3400AppWifiEvent(uint8_t msgType, void *msg); 75 | void winc3400AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf); 76 | 77 | //C++ guard 78 | #ifdef __cplusplus 79 | } 80 | #endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /echo/echo_server_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file echo_server_misc.h 3 | * @brief Helper functions for Echo server 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _ECHO_SERVER_MISC_H 32 | #define _ECHO_SERVER_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "echo/echo_server.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Echo server related functions 44 | void echoServerTick(EchoServerContext *context); 45 | 46 | void echoServerAcceptTcpConnection(EchoServerContext *context); 47 | 48 | void echoServerRegisterTcpConnectionEvents(EchoTcpConnection *connection, 49 | SocketEventDesc *eventDesc); 50 | 51 | void echoServerProcessTcpConnectionEvents(EchoTcpConnection *connection); 52 | void echoServerCloseTcpConnection(EchoTcpConnection *connection); 53 | 54 | void echoServerProcessUdpDatagram(EchoServerContext *context); 55 | 56 | //C++ guard 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /ftp/ftp_client_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ftp_client_misc.h 3 | * @brief Helper functions for FTP client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _FTP_CLIENT_MISC_H 32 | #define _FTP_CLIENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ftp/ftp_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //FTP client related functions 44 | void ftpClientChangeState(FtpClientContext *context, FtpClientState newState); 45 | 46 | error_t ftpClientSendCommand(FtpClientContext *context); 47 | 48 | error_t ftpClientFormatCommand(FtpClientContext *context, 49 | const char_t *command, const char_t *argument); 50 | 51 | error_t ftpClientFormatPortCommand(FtpClientContext *context, 52 | const IpAddr *ipAddr, uint16_t port); 53 | 54 | error_t ftpClientFormatPasvCommand(FtpClientContext *context); 55 | error_t ftpClientParsePasvReply(FtpClientContext *context, uint16_t *port); 56 | 57 | error_t ftpClientParsePwdReply(FtpClientContext *context, char_t *path, 58 | size_t maxLen); 59 | 60 | error_t ftpClientParseDirEntry(char_t *line, FtpDirEntry *dirEntry); 61 | 62 | error_t ftpClientInitDataTransfer(FtpClientContext *context, bool_t direction); 63 | error_t ftpClientTerminateDataTransfer(FtpClientContext *context); 64 | 65 | error_t ftpClientCheckTimeout(FtpClientContext *context); 66 | 67 | //C++ guard 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /ftp/ftp_client_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ftp_client_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _FTP_CLIENT_TRANSPORT_H 32 | #define _FTP_CLIENT_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ftp/ftp_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //FTP client related functions 44 | error_t ftpClientOpenChannel(FtpClientContext *context, 45 | FtpClientChannel *channel, size_t txBufferSize, size_t rxBufferSize); 46 | 47 | error_t ftpClientOpenSecureChannel(FtpClientContext *context, 48 | FtpClientChannel *channel, size_t txBufferSize, size_t rxBufferSize); 49 | 50 | error_t ftpClientEstablishSecureChannel(FtpClientChannel *channel); 51 | 52 | error_t ftpClientShutdownChannel(FtpClientChannel *channel); 53 | 54 | void ftpClientCloseChannel(FtpClientChannel *channel); 55 | 56 | error_t ftpClientWriteChannel(FtpClientChannel *channel, const void *data, 57 | size_t length, size_t *written, uint_t flags); 58 | 59 | error_t ftpClientReadChannel(FtpClientChannel *channel, void *data, 60 | size_t size, size_t *received, uint_t flags); 61 | 62 | //C++ guard 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /ftp/ftp_server_control.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ftp_server_control.h 3 | * @brief FTP control connection 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _FTP_SERVER_CONTROL_H 32 | #define _FTP_SERVER_CONTROL_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ftp/ftp_server.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //FTP server related functions 44 | void ftpServerRegisterControlChannelEvents(FtpClientConnection *connection, 45 | SocketEventDesc *eventDesc); 46 | 47 | void ftpServerProcessControlChannelEvents(FtpClientConnection *connection, 48 | uint_t eventFlags); 49 | 50 | void ftpServerAcceptControlChannel(FtpServerContext *context); 51 | void ftpServerCloseControlChannel(FtpClientConnection *connection); 52 | 53 | //C++ guard 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /ftp/ftp_server_data.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ftp_server_data.h 3 | * @brief FTP data connection 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _FTP_SERVER_DATA_H 32 | #define _FTP_SERVER_DATA_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ftp/ftp_server.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //FTP server related functions 44 | void ftpServerRegisterDataChannelEvents(FtpClientConnection *connection, 45 | SocketEventDesc *eventDesc); 46 | 47 | void ftpServerProcessDataChannelEvents(FtpClientConnection *connection, 48 | uint_t eventFlags); 49 | 50 | error_t ftpServerOpenDataChannel(FtpClientConnection *connection); 51 | void ftpServerAcceptDataChannel(FtpClientConnection *connection); 52 | void ftpServerWriteDataChannel(FtpClientConnection *connection); 53 | void ftpServerReadDataChannel(FtpClientConnection *connection); 54 | void ftpServerCloseDataChannel(FtpClientConnection *connection); 55 | 56 | //C++ guard 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /ftp/ftp_server_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ftp_server_misc.h 3 | * @brief Helper functions for FTP server 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _FTP_SERVER_MISC_H 32 | #define _FTP_SERVER_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ftp/ftp_server.h" 37 | 38 | //Time constant 39 | #define FTP_SERVER_180_DAYS (180 * 86400) 40 | 41 | //C++ guard 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | //FTP server related functions 47 | void ftpServerTick(FtpServerContext *context); 48 | 49 | uint16_t ftpServerGetPassivePort(FtpServerContext *context); 50 | 51 | error_t ftpServerGetPath(FtpClientConnection *connection, 52 | const char_t *inputPath, char_t *outputPath, size_t maxLen); 53 | 54 | uint_t ftpServerGetFilePermissions(FtpClientConnection *connection, 55 | const char_t *path); 56 | 57 | size_t ftpServerFormatDirEntry(const FsDirEntry *dirEntry, uint_t perm, 58 | char_t *buffer); 59 | 60 | const char_t *ftpServerStripRootDir(FtpServerContext *context, 61 | const char_t *path); 62 | 63 | const char_t *ftpServerStripHomeDir(FtpClientConnection *connection, 64 | const char_t *path); 65 | 66 | void ftpServerCloseConnection(FtpClientConnection *connection); 67 | 68 | //C++ guard 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /ftp/ftp_server_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ftp_server_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _FTP_SERVER_TRANSPORT_H 32 | #define _FTP_SERVER_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ftp/ftp_server.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //FTP server related functions 44 | error_t ftpServerOpenSecureChannel(FtpServerContext *context, 45 | FtpServerChannel *channel, size_t txBufferSize, size_t rxBufferSize); 46 | 47 | error_t ftpServerEstablishSecureChannel(FtpServerChannel *channel); 48 | 49 | error_t ftpServerWriteChannel(FtpServerChannel *channel, const void *data, 50 | size_t length, size_t *written, uint_t flags); 51 | 52 | error_t ftpServerReadChannel(FtpServerChannel *channel, void *data, 53 | size_t size, size_t *received, uint_t flags); 54 | 55 | //C++ guard 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /http/http_client_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file http_client_misc.h 3 | * @brief Helper functions for HTTP client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _HTTP_CLIENT_MISC_H 32 | #define _HTTP_CLIENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "http/http_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //HTTP client related functions 44 | void httpClientChangeState(HttpClientContext *context, 45 | HttpClientState newState); 46 | 47 | void httpClientChangeRequestState(HttpClientContext *context, 48 | HttpRequestState newState); 49 | 50 | error_t httpClientFormatRequestHeader(HttpClientContext *context); 51 | 52 | error_t httpClientFormatChunkSize(HttpClientContext *context, size_t length); 53 | 54 | error_t httpClientParseStatusLine(HttpClientContext *context, char_t *line, 55 | size_t length); 56 | 57 | error_t httpClientParseHeaderField(HttpClientContext *context, char_t *line, 58 | size_t length); 59 | 60 | error_t httpClientParseConnectionField(HttpClientContext *context, 61 | const char_t *value); 62 | 63 | error_t httpClientParseTransferEncodingField(HttpClientContext *context, 64 | const char_t *value); 65 | 66 | error_t httpClientParseContentLengthField(HttpClientContext *context, 67 | const char_t *value); 68 | 69 | error_t httpClientParseChunkSize(HttpClientContext *context, char_t *line, 70 | size_t length); 71 | 72 | error_t httpClientCheckTimeout(HttpClientContext *context); 73 | 74 | //C++ guard 75 | #ifdef __cplusplus 76 | } 77 | #endif 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /http/http_client_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file http_client_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _HTTP_CLIENT_TRANSPORT_H 32 | #define _HTTP_CLIENT_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "http/http_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //HTTP client related functions 44 | error_t httpClientOpenConnection(HttpClientContext *context); 45 | 46 | error_t httpClientEstablishConnection(HttpClientContext *context, 47 | const IpAddr *serverIpAddr, uint16_t serverPort); 48 | 49 | error_t httpClientShutdownConnection(HttpClientContext *context); 50 | void httpClientCloseConnection(HttpClientContext *context); 51 | 52 | error_t httpClientSendData(HttpClientContext *context, const void *data, 53 | size_t length, size_t *written, uint_t flags); 54 | 55 | error_t httpClientReceiveData(HttpClientContext *context, void *data, 56 | size_t size, size_t *received, uint_t flags); 57 | 58 | error_t httpClientSaveSession(HttpClientContext *context); 59 | 60 | //C++ guard 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /http/http_server_auth.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file http_server_auth.h 3 | * @brief HTTP authentication 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _HTTP_SERVER_AUTH_H 32 | #define _HTTP_SERVER_AUTH_H 33 | 34 | //Dependencies 35 | #include "http/http_server.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //HTTP authentication related functions 43 | bool_t httpCheckPassword(HttpConnection *connection, 44 | const char_t *password, HttpAuthMode mode); 45 | 46 | void httpParseAuthorizationField(HttpConnection *connection, char_t *value); 47 | size_t httpAddAuthenticateField(HttpConnection *connection, char_t *output); 48 | 49 | error_t httpGenerateNonce(HttpServerContext *context, 50 | char_t *output, size_t *length); 51 | 52 | error_t httpVerifyNonce(HttpServerContext *context, 53 | const char_t *nonce, const char_t *nc); 54 | 55 | //C++ guard 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /http/mime.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mime.h 3 | * @brief MIME (Multipurpose Internet Mail Extensions) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MIME_H 32 | #define _MIME_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | 37 | //Custom MIME types 38 | #ifndef MIME_CUSTOM_TYPES 39 | #define MIME_CUSTOM_TYPES 40 | #endif 41 | 42 | //C++ guard 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | 48 | /** 49 | * @brief MIME type 50 | **/ 51 | 52 | typedef struct 53 | { 54 | const char_t *extension; 55 | const char_t *type; 56 | } MimeType; 57 | 58 | 59 | //MIME related functions 60 | const char_t *mimeGetType(const char_t *filename); 61 | 62 | //C++ guard 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /http/ssi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ssi.h 3 | * @brief SSI (Server Side Includes) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SSI_H 32 | #define _SSI_H 33 | 34 | //Dependencies 35 | #include "http/http_server.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //SSI related functions 43 | error_t ssiExecuteScript(HttpConnection *connection, const char_t *uri, uint_t level); 44 | 45 | error_t ssiProcessCommand(HttpConnection *connection, 46 | const char_t *tag, size_t length, const char_t *uri, uint_t level); 47 | 48 | error_t ssiProcessIncludeCommand(HttpConnection *connection, 49 | const char_t *tag, size_t length, const char_t *uri, uint_t level); 50 | 51 | error_t ssiProcessEchoCommand(HttpConnection *connection, const char_t *tag, 52 | size_t length); 53 | 54 | error_t ssiProcessExecCommand(HttpConnection *connection, const char_t *tag, 55 | size_t length); 56 | 57 | error_t ssiSearchTag(const char_t *s, size_t sLen, const char_t *tag, 58 | size_t tagLen, size_t *pos); 59 | 60 | //C++ guard 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /igmp/igmp_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file igmp_debug.h 3 | * @brief Data logging functions for debugging purpose (IGMP) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _IGMP_DEBUG_H 32 | #define _IGMP_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "igmp/igmp_common.h" 37 | #include "debug.h" 38 | 39 | //C++ guard 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | 45 | /** 46 | * @brief Parameter value/name binding 47 | **/ 48 | 49 | typedef struct 50 | { 51 | uint_t value; 52 | const char_t *name; 53 | } IgmpParamName; 54 | 55 | 56 | //Check current trace level 57 | #if (IGMP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) 58 | void igmpDumpMessage(const IgmpMessage *message, size_t length); 59 | #else 60 | #define igmpDumpMessage(message, length) 61 | #endif 62 | 63 | void igmpDumpMembershipQueryV3(const IgmpMembershipQueryV3 *message, 64 | size_t length); 65 | 66 | void igmpDumpMessageMembershipReportV3(const IgmpMembershipReportV3 *message, 67 | size_t length); 68 | 69 | void igmpDumpGroupRecord(const IgmpGroupRecord *record, 70 | size_t length); 71 | 72 | const char_t *igmpGetParamName(uint_t value, const IgmpParamName *paramList, 73 | size_t paramListLen); 74 | 75 | //C++ guard 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /ipv4/arp_cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file arp_cache.h 3 | * @brief ARP cache management 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _ARP_CACHE_H 32 | #define _ARP_CACHE_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ipv4/arp.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //ARP related functions 44 | void arpChangeState(ArpCacheEntry *entry, ArpState newState); 45 | 46 | ArpCacheEntry *arpCreateEntry(NetInterface *interface); 47 | ArpCacheEntry *arpFindEntry(NetInterface *interface, Ipv4Addr ipAddr); 48 | 49 | void arpFlushCache(NetInterface *interface); 50 | 51 | void arpSendQueuedPackets(NetInterface *interface, ArpCacheEntry *entry); 52 | void arpFlushQueuedPackets(NetInterface *interface, ArpCacheEntry *entry); 53 | 54 | //C++ guard 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /ipv4/auto_ip_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file auto_ip_misc.h 3 | * @brief Helper functions for Auto-IP 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _AUTO_IP_MISC_H 32 | #define _AUTO_IP_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ipv4/auto_ip.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Tick counter to handle periodic operations 44 | extern systime_t autoIpTickCounter; 45 | 46 | //Auto-IP related functions 47 | void autoIpTick(AutoIpContext *context); 48 | void autoIpLinkChangeEvent(AutoIpContext *context); 49 | 50 | void autoIpChangeState(AutoIpContext *context, AutoIpState newState, 51 | systime_t delay); 52 | 53 | void autoIpGenerateAddr(Ipv4Addr *ipAddr); 54 | 55 | void autoIpResetConfig(AutoIpContext *context); 56 | void autoIpDumpConfig(AutoIpContext *context); 57 | 58 | //C++ guard 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /ipv6/ipv6_pmtu.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ipv6_pmtu.h 3 | * @brief Path MTU Discovery for IPv6 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _IPV6_PMTU_H 32 | #define _IPV6_PMTU_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | 37 | //Path MTU discovery support 38 | #ifndef IPV6_PMTU_SUPPORT 39 | #define IPV6_PMTU_SUPPORT ENABLED 40 | #elif (IPV6_PMTU_SUPPORT != ENABLED && IPV6_PMTU_SUPPORT != DISABLED) 41 | #error IPV6_PMTU_SUPPORT parameter is not valid 42 | #endif 43 | 44 | //C++ guard 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | //Path MTU discovery related functions 50 | size_t ipv6GetPathMtu(NetInterface *interface, const Ipv6Addr *destAddr); 51 | 52 | void ipv6UpdatePathMtu(NetInterface *interface, 53 | const Ipv6Addr *destAddr, size_t tentativePathMtu); 54 | 55 | //C++ guard 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /ipv6/ndp_cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ndp_cache.h 3 | * @brief Neighbor and destination cache management 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _NDP_CACHE_H 32 | #define _NDP_CACHE_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ipv6/ndp.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //NDP related functions 44 | void ndpChangeState(NdpNeighborCacheEntry *entry, NdpState newState); 45 | 46 | NdpNeighborCacheEntry *ndpCreateNeighborCacheEntry(NetInterface *interface); 47 | 48 | NdpNeighborCacheEntry *ndpFindNeighborCacheEntry(NetInterface *interface, 49 | const Ipv6Addr *ipAddr); 50 | 51 | void ndpUpdateNeighborCache(NetInterface *interface); 52 | void ndpFlushNeighborCache(NetInterface *interface); 53 | 54 | uint_t ndpSendQueuedPackets(NetInterface *interface, NdpNeighborCacheEntry *entry); 55 | void ndpFlushQueuedPackets(NetInterface *interface, NdpNeighborCacheEntry *entry); 56 | 57 | NdpDestCacheEntry *ndpCreateDestCacheEntry(NetInterface *interface); 58 | 59 | NdpDestCacheEntry *ndpFindDestCacheEntry(NetInterface *interface, 60 | const Ipv6Addr *destAddr); 61 | 62 | void ndpFlushDestCache(NetInterface *interface); 63 | 64 | //C++ guard 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /ipv6/ndp_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ndp_misc.h 3 | * @brief Helper functions for NDP (Neighbor Discovery Protocol) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _NDP_MISC_H 32 | #define _NDP_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ipv6/ndp.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //NDP related functions 44 | void ndpParsePrefixInfoOption(NetInterface *interface, NdpPrefixInfoOption *option); 45 | 46 | void ndpUpdateAddrList(NetInterface *interface); 47 | void ndpUpdatePrefixList(NetInterface *interface); 48 | void ndpUpdateDefaultRouterList(NetInterface *interface); 49 | 50 | error_t ndpSelectDefaultRouter(NetInterface *interface, 51 | const Ipv6Addr *unreachableAddr, Ipv6Addr *addr); 52 | 53 | bool_t ndpIsFirstHopRouter(NetInterface *interface, 54 | const Ipv6Addr *destAddr, const Ipv6Addr *nextHop); 55 | 56 | error_t ndpSelectNextHop(NetInterface *interface, const Ipv6Addr *destAddr, 57 | const Ipv6Addr *unreachableNextHop, Ipv6Addr *nextHop, bool_t dontRoute); 58 | 59 | void ndpUpdateNextHop(NetInterface *interface, const Ipv6Addr *nextHop); 60 | 61 | void ndpAddOption(void *message, size_t *messageLen, uint8_t type, 62 | const void *value, size_t length); 63 | 64 | void *ndpGetOption(uint8_t *options, size_t length, uint8_t type); 65 | 66 | error_t ndpCheckOptions(const uint8_t *options, size_t length); 67 | 68 | //C++ guard 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /ipv6/ndp_router_adv_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ndp_router_adv_misc.h 3 | * @brief Helper functions for router advertisement service 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _NDP_ROUTER_ADV_MISC_H 32 | #define _NDP_ROUTER_ADV_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ipv6/ndp_router_adv.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Tick counter to handle periodic operations 44 | extern systime_t ndpRouterAdvTickCounter; 45 | 46 | //RA service related functions 47 | void ndpRouterAdvTick(NdpRouterAdvContext *context); 48 | void ndpRouterAdvLinkChangeEvent(NdpRouterAdvContext *context); 49 | 50 | void ndpProcessRouterSol(NetInterface *interface, 51 | const Ipv6PseudoHeader *pseudoHeader, const NetBuffer *buffer, 52 | size_t offset, const NetRxAncillary *ancillary); 53 | 54 | error_t ndpSendRouterAdv(NdpRouterAdvContext *context, uint16_t routerLifetime); 55 | 56 | //C++ guard 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /ipv6/slaac_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file slaac_misc.h 3 | * @brief Helper functions for SLAAC 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SLAAC_MISC_H 32 | #define _SLAAC_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ipv6/slaac.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SLAAC related functions 44 | void slaacLinkChangeEvent(SlaacContext *context); 45 | 46 | void slaacParseRouterAdv(SlaacContext *context, 47 | NdpRouterAdvMessage *message, size_t length); 48 | 49 | void slaacParsePrefixInfoOption(SlaacContext *context, 50 | NdpPrefixInfoOption *option); 51 | 52 | error_t slaacGenerateLinkLocalAddr(SlaacContext *context); 53 | 54 | void slaacDumpConfig(SlaacContext *context); 55 | 56 | //C++ guard 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /lldp/lldp_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lldp_debug.h 3 | * @brief Data logging functions for debugging purpose (LLDP) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _LLDP_DEBUG_H 32 | #define _LLDP_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "lldp/lldp.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | 44 | /** 45 | * @brief Parameter value/name binding 46 | **/ 47 | 48 | typedef struct 49 | { 50 | uint_t value; 51 | const char_t *name; 52 | } LldpParamName; 53 | 54 | 55 | //LLDP agent related functions 56 | void lldpDumpDataUnit(LldpDataUnit *lldpdu); 57 | void lldpDumpTlv(const LldpTlv *tlv); 58 | 59 | const char_t *lldpGetParamName(uint_t value, const LldpParamName *paramList, 60 | size_t paramListLen); 61 | 62 | //C++ guard 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /lldp/lldp_ext_pno.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lldp_ext_pno.h 3 | * @brief PROFINET extension 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _LLDP_EXT_PNO_H 32 | #define _LLDP_EXT_PNO_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "lldp/lldp.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | 44 | /** 45 | * @brief PROFINET subtypes 46 | **/ 47 | 48 | typedef enum 49 | { 50 | LLDP_PNO_SUBTYPE_RESERVED = 0, ///timeTicks = osGetSystemTime64() / 10; 64 | 65 | //Successful processing 66 | return NO_ERROR; 67 | } 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /mibs/mib2_impl_sys.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mib2_impl_sys.h 3 | * @brief MIB-II module implementation (System group) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MIB2_IMPL_SYS_H 32 | #define _MIB2_IMPL_SYS_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "mibs/mib2_module.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //MIB-II related functions 44 | error_t mib2GetSysObjectID(const MibObject *object, const uint8_t *oid, 45 | size_t oidLen, MibVariant *value, size_t *valueLen); 46 | 47 | error_t mib2GetSysUpTime(const MibObject *object, const uint8_t *oid, 48 | size_t oidLen, MibVariant *value, size_t *valueLen); 49 | 50 | error_t mib2SetSysContact(const MibObject *object, const uint8_t *oid, 51 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 52 | 53 | error_t mib2GetSysContact(const MibObject *object, const uint8_t *oid, 54 | size_t oidLen, MibVariant *value, size_t *valueLen); 55 | 56 | error_t mib2SetSysName(const MibObject *object, const uint8_t *oid, 57 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 58 | 59 | error_t mib2GetSysName(const MibObject *object, const uint8_t *oid, 60 | size_t oidLen, MibVariant *value, size_t *valueLen); 61 | 62 | error_t mib2SetSysLocation(const MibObject *object, const uint8_t *oid, 63 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 64 | 65 | error_t mib2GetSysLocation(const MibObject *object, const uint8_t *oid, 66 | size_t oidLen, MibVariant *value, size_t *valueLen); 67 | 68 | //C++ guard 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /mibs/mib2_impl_tcp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mib2_impl_tcp.h 3 | * @brief MIB-II module implementation (TCP group) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MIB2_IMPL_TCP_H 32 | #define _MIB2_IMPL_TCP_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "mibs/mib2_module.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //MIB-II related functions 44 | error_t mib2GetTcpCurrEstab(const MibObject *object, const uint8_t *oid, 45 | size_t oidLen, MibVariant *value, size_t *valueLen); 46 | 47 | error_t mib2SetTcpConnEntry(const MibObject *object, const uint8_t *oid, 48 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 49 | 50 | error_t mib2GetTcpConnEntry(const MibObject *object, const uint8_t *oid, 51 | size_t oidLen, MibVariant *value, size_t *valueLen); 52 | 53 | error_t mib2GetNextTcpConnEntry(const MibObject *object, const uint8_t *oid, 54 | size_t oidLen, uint8_t *nextOid, size_t *nextOidLen); 55 | 56 | //C++ guard 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /mibs/mib2_impl_udp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mib2_impl_udp.h 3 | * @brief MIB-II module implementation (UDP group) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MIB2_IMPL_UDP_H 32 | #define _MIB2_IMPL_UDP_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "mibs/mib2_module.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //MIB-II related functions 44 | error_t mib2GetUdpEntry(const MibObject *object, const uint8_t *oid, 45 | size_t oidLen, MibVariant *value, size_t *valueLen); 46 | 47 | error_t mib2GetNextUdpEntry(const MibObject *object, const uint8_t *oid, 48 | size_t oidLen, uint8_t *nextOid, size_t *nextOidLen); 49 | 50 | //C++ guard 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /mibs/snmp_community_mib_impl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_community_mib_impl.h 3 | * @brief SNMP COMMUNITY MIB module implementation 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @section Description 28 | * 29 | * The SNMP-MIB describes managed objects which describe the behavior 30 | * of an SNMP entity. Refer to RFC 3418 for more details 31 | * 32 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 33 | * @version 2.5.0 34 | **/ 35 | 36 | #ifndef _SNMP_COMMUNITY_MIB_IMPL_H 37 | #define _SNMP_COMMUNITY_MIB_IMPL_H 38 | 39 | //Dependencies 40 | #include "mibs/mib_common.h" 41 | 42 | //C++ guard 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | //SNMP COMMUNITY MIB related functions 48 | error_t snmpCommunityMibInit(void); 49 | error_t snmpCommunityMibLoad(void *context); 50 | void snmpCommunityMibUnload(void *context); 51 | void snmpCommunityMibLock(void); 52 | void snmpCommunityMibUnlock(void); 53 | 54 | error_t snmpCommunityMibSetCommunityEntry(const MibObject *object, const uint8_t *oid, 55 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 56 | 57 | error_t snmpCommunityMibGetCommunityEntry(const MibObject *object, const uint8_t *oid, 58 | size_t oidLen, MibVariant *value, size_t *valueLen); 59 | 60 | error_t snmpCommunityMibGetNextCommunityEntry(const MibObject *object, const uint8_t *oid, 61 | size_t oidLen, uint8_t *nextOid, size_t *nextOidLen); 62 | 63 | //C++ guard 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /mibs/snmp_community_mib_module.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_community_mib_module.h 3 | * @brief SNMP COMMUNITY MIB module 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @section Description 28 | * 29 | * The SNMP-MIB describes managed objects which describe the behavior 30 | * of an SNMP entity. Refer to RFC 3418 for more details 31 | * 32 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 33 | * @version 2.5.0 34 | **/ 35 | 36 | #ifndef _SNMP_COMMUNITY_MIB_MODULE_H 37 | #define _SNMP_COMMUNITY_MIB_MODULE_H 38 | 39 | //Dependencies 40 | #include "mibs/mib_common.h" 41 | #include "snmp/snmp_agent.h" 42 | 43 | //SNMP COMMUNITY MIB module support 44 | #ifndef SNMP_COMMUNITY_MIB_SUPPORT 45 | #define SNMP_COMMUNITY_MIB_SUPPORT DISABLED 46 | #elif (SNMP_COMMUNITY_MIB_SUPPORT != ENABLED && SNMP_COMMUNITY_MIB_SUPPORT != DISABLED) 47 | #error SNMP_COMMUNITY_MIB_SUPPORT parameter is not valid 48 | #endif 49 | 50 | //Support for SET operations 51 | #ifndef SNMP_COMMUNITY_MIB_SET_SUPPORT 52 | #define SNMP_COMMUNITY_MIB_SET_SUPPORT DISABLED 53 | #elif (SNMP_COMMUNITY_MIB_SET_SUPPORT != ENABLED && SNMP_COMMUNITY_MIB_SET_SUPPORT != DISABLED) 54 | #error SNMP_COMMUNITY_MIB_SET_SUPPORT parameter is not valid 55 | #endif 56 | 57 | //C++ guard 58 | #ifdef __cplusplus 59 | extern "C" { 60 | #endif 61 | 62 | 63 | /** 64 | * @brief SNMP COMMUNITY MIB base 65 | **/ 66 | 67 | typedef struct 68 | { 69 | SnmpAgentContext *context; 70 | SnmpUserEntry tempCommunity; 71 | } SnmpCommunityMibBase; 72 | 73 | 74 | //SNMP COMMUNITY MIB related constants 75 | extern SnmpCommunityMibBase snmpCommunityMibBase; 76 | extern const MibObject snmpCommunityMibObjects[]; 77 | extern const MibModule snmpCommunityMibModule; 78 | 79 | //C++ guard 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /mibs/snmp_framework_mib_impl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_framework_mib_impl.h 3 | * @brief SNMP FRAMEWORK MIB module implementation 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_FRAMEWORK_MIB_IMPL_H 32 | #define _SNMP_FRAMEWORK_MIB_IMPL_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //SNMP FRAMEWORK MIB related functions 43 | error_t snmpFrameworkMibInit(void); 44 | error_t snmpFrameworkMibLoad(void *context); 45 | void snmpFrameworkMibUnload(void *context); 46 | void snmpFrameworkMibLock(void); 47 | void snmpFrameworkMibUnlock(void); 48 | 49 | error_t snmpFrameworkMibGetSnmpEngineID(const MibObject *object, 50 | const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen); 51 | 52 | error_t snmpFrameworkMibGetSnmpEngineBoots(const MibObject *object, 53 | const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen); 54 | 55 | error_t snmpFrameworkMibGetSnmpEngineTime(const MibObject *object, 56 | const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen); 57 | 58 | error_t snmpFrameworkMibGetSnmpEngineMaxMessageSize(const MibObject *object, 59 | const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen); 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /mibs/snmp_framework_mib_module.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_framework_mib_module.h 3 | * @brief SNMP FRAMEWORK MIB module 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_FRAMEWORK_MIB_MODULE_H 32 | #define _SNMP_FRAMEWORK_MIB_MODULE_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | #include "snmp/snmp_agent.h" 37 | 38 | //SNMP FRAMEWORK MIB module support 39 | #ifndef SNMP_FRAMEWORK_MIB_SUPPORT 40 | #define SNMP_FRAMEWORK_MIB_SUPPORT DISABLED 41 | #elif (SNMP_FRAMEWORK_MIB_SUPPORT != ENABLED && SNMP_FRAMEWORK_MIB_SUPPORT != DISABLED) 42 | #error SNMP_FRAMEWORK_MIB_SUPPORT parameter is not valid 43 | #endif 44 | 45 | //C++ guard 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | 51 | /** 52 | * @brief SNMP FRAMEWORK MIB base 53 | **/ 54 | 55 | typedef struct 56 | { 57 | SnmpAgentContext *context; 58 | } SnmpFrameworkMibBase; 59 | 60 | 61 | //SNMP FRAMEWORK MIB related constants 62 | extern SnmpFrameworkMibBase snmpFrameworkMibBase; 63 | extern const MibObject snmpFrameworkMibObjects[]; 64 | extern const MibModule snmpFrameworkMibModule; 65 | 66 | //C++ guard 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /mibs/snmp_mpd_mib_impl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_mpd_mib_impl.h 3 | * @brief SNMP MPD MIB module implementation 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_MPD_MIB_IMPL_H 32 | #define _SNMP_MPD_MIB_IMPL_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //SNMP MPD MIB related functions 43 | error_t snmpMpdMibInit(void); 44 | error_t snmpMpdMibLoad(void *context); 45 | void snmpMpdMibUnload(void *context); 46 | void snmpMpdMibLock(void); 47 | void snmpMpdMibUnlock(void); 48 | 49 | //C++ guard 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /mibs/snmp_mpd_mib_module.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_mpd_mib_module.h 3 | * @brief SNMP MPD MIB module 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_MPD_MIB_MODULE_H 32 | #define _SNMP_MPD_MIB_MODULE_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | 37 | //SNMP MPD MIB module support 38 | #ifndef SNMP_MPD_MIB_SUPPORT 39 | #define SNMP_MPD_MIB_SUPPORT DISABLED 40 | #elif (SNMP_MPD_MIB_SUPPORT != ENABLED && SNMP_MPD_MIB_SUPPORT != DISABLED) 41 | #error SNMP_MPD_MIB_SUPPORT parameter is not valid 42 | #endif 43 | 44 | //Macro definitions 45 | #if (SNMP_MPD_MIB_SUPPORT == ENABLED) 46 | #define SNMP_MPD_MIB_INC_COUNTER32(name, value) snmpMpdMibBase.name += value 47 | #else 48 | #define SNMP_MPD_MIB_INC_COUNTER32(name, value) 49 | #endif 50 | 51 | //C++ guard 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | 56 | 57 | /** 58 | * @brief SNMP MPD MIB base 59 | **/ 60 | 61 | typedef struct 62 | { 63 | uint32_t snmpUnknownSecurityModels; 64 | uint32_t snmpInvalidMsgs; 65 | uint32_t snmpUnknownPDUHandlers; 66 | } SnmpMpdMibBase; 67 | 68 | 69 | //SNMP MPD MIB related constants 70 | extern SnmpMpdMibBase snmpMpdMibBase; 71 | extern const MibObject snmpMpdMibObjects[]; 72 | extern const MibModule snmpMpdMibModule; 73 | 74 | //C++ guard 75 | #ifdef __cplusplus 76 | } 77 | #endif 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /mibs/snmp_usm_mib_impl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_usm_mib_impl.h 3 | * @brief SNMP USM MIB module implementation 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_USM_MIB_IMPL_H 32 | #define _SNMP_USM_MIB_IMPL_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //SNMP USM MIB related functions 43 | error_t snmpUsmMibInit(void); 44 | error_t snmpUsmMibLoad(void *context); 45 | void snmpUsmMibUnload(void *context); 46 | void snmpUsmMibLock(void); 47 | void snmpUsmMibUnlock(void); 48 | 49 | error_t snmpUsmMibSetUserSpinLock(const MibObject *object, const uint8_t *oid, 50 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 51 | 52 | error_t snmpUsmMibGetUserSpinLock(const MibObject *object, const uint8_t *oid, 53 | size_t oidLen, MibVariant *value, size_t *valueLen); 54 | 55 | error_t snmpUsmMibSetUserEntry(const MibObject *object, const uint8_t *oid, 56 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 57 | 58 | error_t snmpUsmMibGetUserEntry(const MibObject *object, const uint8_t *oid, 59 | size_t oidLen, MibVariant *value, size_t *valueLen); 60 | 61 | error_t snmpUsmMibGetNextUserEntry(const MibObject *object, const uint8_t *oid, 62 | size_t oidLen, uint8_t *nextOid, size_t *nextOidLen); 63 | 64 | //C++ guard 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /mibs/snmp_vacm_mib_module.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_vacm_mib_module.h 3 | * @brief SNMP VACM MIB module 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_VACM_MIB_MODULE_H 32 | #define _SNMP_VACM_MIB_MODULE_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | #include "snmp/snmp_agent.h" 37 | 38 | //SNMP VACM MIB module support 39 | #ifndef SNMP_VACM_MIB_SUPPORT 40 | #define SNMP_VACM_MIB_SUPPORT DISABLED 41 | #elif (SNMP_VACM_MIB_SUPPORT != ENABLED && SNMP_VACM_MIB_SUPPORT != DISABLED) 42 | #error SNMP_VACM_MIB_SUPPORT parameter is not valid 43 | #endif 44 | 45 | //Support for SET operations 46 | #ifndef SNMP_VACM_MIB_SET_SUPPORT 47 | #define SNMP_VACM_MIB_SET_SUPPORT DISABLED 48 | #elif (SNMP_VACM_MIB_SET_SUPPORT != ENABLED && SNMP_VACM_MIB_SET_SUPPORT != DISABLED) 49 | #error SNMP_VACM_MIB_SET_SUPPORT parameter is not valid 50 | #endif 51 | 52 | //C++ guard 53 | #ifdef __cplusplus 54 | extern "C" { 55 | #endif 56 | 57 | 58 | /** 59 | * @brief SNMP VACM MIB base 60 | **/ 61 | 62 | typedef struct 63 | { 64 | SnmpAgentContext *context; 65 | int32_t vacmViewSpinLock; 66 | SnmpGroupEntry tempGroupEntry; 67 | SnmpAccessEntry tempAccessEntry; 68 | SnmpViewEntry tempViewEntry; 69 | } SnmpVacmMibBase; 70 | 71 | 72 | //SNMP VACM MIB related constants 73 | extern SnmpVacmMibBase snmpVacmMibBase; 74 | extern const MibObject snmpVacmMibObjects[]; 75 | extern const MibModule snmpVacmMibModule; 76 | 77 | //C++ guard 78 | #ifdef __cplusplus 79 | } 80 | #endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /mibs/tcp_mib_impl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tcp_mib_impl.h 3 | * @brief TCP MIB module implementation 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _TCP_MIB_IMPL_H 32 | #define _TCP_MIB_IMPL_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //TCP MIB related functions 43 | error_t tcpMibInit(void); 44 | 45 | error_t tcpMibGetTcpCurrEstab(const MibObject *object, const uint8_t *oid, 46 | size_t oidLen, MibVariant *value, size_t *valueLen); 47 | 48 | error_t tcpMibSetTcpConnectionEntry(const MibObject *object, const uint8_t *oid, 49 | size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit); 50 | 51 | error_t tcpMibGetTcpConnectionEntry(const MibObject *object, const uint8_t *oid, 52 | size_t oidLen, MibVariant *value, size_t *valueLen); 53 | 54 | error_t tcpMibGetNextTcpConnectionEntry(const MibObject *object, const uint8_t *oid, 55 | size_t oidLen, uint8_t *nextOid, size_t *nextOidLen); 56 | 57 | error_t tcpMibGetTcpListenerEntry(const MibObject *object, const uint8_t *oid, 58 | size_t oidLen, MibVariant *value, size_t *valueLen); 59 | 60 | error_t tcpMibGetNextTcpListenerEntry(const MibObject *object, const uint8_t *oid, 61 | size_t oidLen, uint8_t *nextOid, size_t *nextOidLen); 62 | 63 | //C++ guard 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /mibs/udp_mib_impl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file udp_mib_impl.h 3 | * @brief UDP MIB module implementation 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _UDP_MIB_IMPL_H 32 | #define _UDP_MIB_IMPL_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //UDP MIB related functions 43 | error_t udpMibInit(void); 44 | 45 | error_t udpMibGetUdpEndpointEntry(const MibObject *object, const uint8_t *oid, 46 | size_t oidLen, MibVariant *value, size_t *valueLen); 47 | 48 | error_t udpMibGetNextUdpEndpointEntry(const MibObject *object, const uint8_t *oid, 49 | size_t oidLen, uint8_t *nextOid, size_t *nextOidLen); 50 | 51 | //C++ guard 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /mibs/udp_mib_module.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file udp_mib_module.h 3 | * @brief UDP MIB module 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _UDP_MIB_MODULE_H 32 | #define _UDP_MIB_MODULE_H 33 | 34 | //Dependencies 35 | #include "mibs/mib_common.h" 36 | 37 | //UDP MIB module support 38 | #ifndef UDP_MIB_SUPPORT 39 | #define UDP_MIB_SUPPORT DISABLED 40 | #elif (UDP_MIB_SUPPORT != ENABLED && UDP_MIB_SUPPORT != DISABLED) 41 | #error UDP_MIB_SUPPORT parameter is not valid 42 | #endif 43 | 44 | //Macro definitions 45 | #if (UDP_MIB_SUPPORT == ENABLED) 46 | #define UDP_MIB_INC_COUNTER32(name, value) udpMibBase.name += value 47 | #define UDP_MIB_INC_COUNTER64(name, value) udpMibBase.name += value 48 | #else 49 | #define UDP_MIB_INC_COUNTER32(name, value) 50 | #define UDP_MIB_INC_COUNTER64(name, value) 51 | #endif 52 | 53 | //C++ guard 54 | #ifdef __cplusplus 55 | extern "C" { 56 | #endif 57 | 58 | 59 | /** 60 | * @brief UDP MIB base 61 | **/ 62 | 63 | typedef struct 64 | { 65 | uint32_t udpInDatagrams; 66 | uint32_t udpNoPorts; 67 | uint32_t udpInErrors; 68 | uint32_t udpOutDatagrams; 69 | uint64_t udpHCInDatagrams; 70 | uint64_t udpHCOutDatagrams; 71 | } UdpMibBase; 72 | 73 | 74 | //UDP MIB related constants 75 | extern UdpMibBase udpMibBase; 76 | extern const MibObject udpMibObjects[]; 77 | extern const MibModule udpMibModule; 78 | 79 | //C++ guard 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /mld/mld_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mld_debug.h 3 | * @brief Data logging functions for debugging purpose (MLD) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MLD_DEBUG_H 32 | #define _MLD_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "mld/mld_common.h" 37 | #include "debug.h" 38 | 39 | //C++ guard 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | 45 | /** 46 | * @brief Parameter value/name binding 47 | **/ 48 | 49 | typedef struct 50 | { 51 | uint_t value; 52 | const char_t *name; 53 | } MldParamName; 54 | 55 | 56 | //Check current trace level 57 | #if (MLD_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) 58 | void mldDumpMessage(const MldMessage *message, size_t length); 59 | #else 60 | #define mldDumpMessage(message, length) 61 | #endif 62 | 63 | void mldDumpQueryV2(const MldListenerQueryV2 *message, size_t length); 64 | void mldDumpReportV2(const MldListenerReportV2 *message, size_t length); 65 | 66 | void mldDumpMulticastAddrRecord(const MldMcastAddrRecord *record, 67 | size_t length); 68 | 69 | const char_t *mldGetParamName(uint_t value, const MldParamName *paramList, 70 | size_t paramListLen); 71 | 72 | //C++ guard 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /modbus/modbus_client_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file modbus_client_misc.h 3 | * @brief Helper functions for Modbus/TCP client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MODBUS_CLIENT_MISC_H 32 | #define _MODBUS_CLIENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "modbus/modbus_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Modbus/TCP client related functions 44 | error_t modbusClientTransaction(ModbusClientContext *context); 45 | error_t modbusClientCheckResp(ModbusClientContext *context); 46 | 47 | error_t modbusClientFormatMbapHeader(ModbusClientContext *context, 48 | size_t length); 49 | 50 | error_t modbusClientParseMbapHeader(ModbusClientContext *context); 51 | 52 | void *modbusClientGetRequestPdu(ModbusClientContext *context); 53 | void *modbusClientGetResponsePdu(ModbusClientContext *context, size_t *length); 54 | 55 | error_t modbusClientCheckTimeout(ModbusClientContext *context); 56 | 57 | //C++ guard 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /modbus/modbus_client_pdu.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oryx-Embedded/CycloneTCP/14d7525b9572c616f4a0dd469e302b4b64a7a0a2/modbus/modbus_client_pdu.c -------------------------------------------------------------------------------- /modbus/modbus_client_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file modbus_client_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MODBUS_CLIENT_TRANSPORT_H 32 | #define _MODBUS_CLIENT_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "modbus/modbus_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Modbus/TCP client related functions 44 | error_t modbusClientOpenConnection(ModbusClientContext *context); 45 | 46 | error_t modbusClientEstablishConnection(ModbusClientContext *context, 47 | const IpAddr *serverIpAddr, uint16_t serverPort); 48 | 49 | error_t modbusClientShutdownConnection(ModbusClientContext *context); 50 | void modbusClientCloseConnection(ModbusClientContext *context); 51 | 52 | error_t modbusClientSendData(ModbusClientContext *context, const void *data, 53 | size_t length, size_t *written, uint_t flags); 54 | 55 | error_t modbusClientReceiveData(ModbusClientContext *context, void *data, 56 | size_t size, size_t *received, uint_t flags); 57 | 58 | //C++ guard 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /modbus/modbus_server_security.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file modbus_server_security.h 3 | * @brief Modbus/TCP security layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MODBUS_SERVER_SECURITY_H 32 | #define _MODBUS_SERVER_SECURITY_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "modbus/modbus_server.h" 37 | 38 | //TLS supported? 39 | #if (MODBUS_SERVER_TLS_SUPPORT == ENABLED) 40 | #include "core/crypto.h" 41 | #include "encoding/asn1.h" 42 | #include "encoding/oid.h" 43 | #include "pkix/x509_cert_parse.h" 44 | #include "pkix/x509_cert_ext_parse.h" 45 | #endif 46 | 47 | //C++ guard 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | //Modbus/TCP server related functions 53 | error_t modbusServerParseRoleOid(ModbusClientConnection *connection, 54 | const uint8_t *data, size_t length); 55 | 56 | error_t modbusServerOpenSecureConnection(ModbusServerContext *context, 57 | ModbusClientConnection *connection); 58 | 59 | error_t modbusServerEstablishSecureConnection(ModbusClientConnection *connection); 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /modbus/modbus_server_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file modbus_server_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MODBUS_SERVER_TRANSPORT_H 32 | #define _MODBUS_SERVER_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "modbus/modbus_server.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //Modbus/TCP server related functions 44 | void modbusServerAcceptConnection(ModbusServerContext *context); 45 | 46 | error_t modbusServerShutdownConnection(ModbusClientConnection *connection); 47 | void modbusServerCloseConnection(ModbusClientConnection *connection); 48 | 49 | error_t modbusServerSendData(ModbusClientConnection *connection, const void *data, 50 | size_t length, size_t *written, uint_t flags); 51 | 52 | error_t modbusServerReceiveData(ModbusClientConnection *connection, void *data, 53 | size_t size, size_t *received, uint_t flags); 54 | 55 | //C++ guard 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /mqtt/mqtt_client_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mqtt_client_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MQTT_CLIENT_TRANSPORT_H 32 | #define _MQTT_CLIENT_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "mqtt/mqtt_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //MQTT client related functions 44 | error_t mqttClientOpenConnection(MqttClientContext *context); 45 | 46 | error_t mqttClientEstablishConnection(MqttClientContext *context, 47 | const IpAddr *serverIpAddr, uint16_t serverPort); 48 | 49 | error_t mqttClientShutdownConnection(MqttClientContext *context); 50 | 51 | void mqttClientCloseConnection(MqttClientContext *context); 52 | 53 | error_t mqttClientSendData(MqttClientContext *context, 54 | const void *data, size_t length, size_t *written, uint_t flags); 55 | 56 | error_t mqttClientReceiveData(MqttClientContext *context, 57 | void *data, size_t size, size_t *received, uint_t flags); 58 | 59 | error_t mqttClientWaitForData(MqttClientContext *context, systime_t timeout); 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /mqtt_sn/mqtt_sn_client_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mqtt_sn_client_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _MQTT_SN_CLIENT_TRANSPORT_H 32 | #define _MQTT_SN_CLIENT_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "mqtt_sn/mqtt_sn_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //MQTT-SN related functions 44 | error_t mqttSnClientOpenConnection(MqttSnClientContext *context, bool_t secure); 45 | error_t mqttSnClientEstablishConnection(MqttSnClientContext *context); 46 | error_t mqttSnClientShutdownConnection(MqttSnClientContext *context); 47 | void mqttSnClientCloseConnection(MqttSnClientContext *context); 48 | 49 | error_t mqttSnClientBroadcastDatagram(MqttSnClientContext *context, 50 | const IpAddr *destIpAddr, uint16_t destPort, const void *data, 51 | size_t length); 52 | 53 | error_t mqttSnClientSendDatagram(MqttSnClientContext *context, 54 | const void *data, size_t length); 55 | 56 | error_t mqttSnClientReceiveDatagram(MqttSnClientContext *context, 57 | IpAddr *srcIpAddr, uint16_t *srcPort, void *data, size_t size, 58 | size_t *received, systime_t timeout); 59 | 60 | //C++ guard 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /netbios/nbns_responder.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file nbns_responder.h 3 | * @brief NBNS responder (NetBIOS Name Service) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _NBNS_RESPONDER_H 32 | #define _NBNS_RESPONDER_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "core/udp.h" 37 | #include "dns/dns_common.h" 38 | #include "netbios/nbns_common.h" 39 | 40 | //NBNS responder support 41 | #ifndef NBNS_RESPONDER_SUPPORT 42 | #define NBNS_RESPONDER_SUPPORT ENABLED 43 | #elif (NBNS_RESPONDER_SUPPORT != ENABLED && NBNS_RESPONDER_SUPPORT != DISABLED) 44 | #error NBNS_RESPONDER_SUPPORT parameter is not valid 45 | #endif 46 | 47 | //C++ guard 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | //NBNS related functions 53 | void nbnsProcessQuery(NetInterface *interface, const Ipv4PseudoHeader *pseudoHeader, 54 | const UdpHeader *udpHeader, const NbnsHeader *message, size_t length); 55 | 56 | error_t nbnsSendResponse(NetInterface *interface, 57 | const IpAddr *destIpAddr, uint16_t destPort, uint16_t id); 58 | 59 | //C++ guard 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /ntp/ntp_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ntp_debug.h 3 | * @brief Data logging functions for debugging purpose (NTP) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _NTP_DEBUG_H 32 | #define _NTP_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ntp/ntp_common.h" 37 | #include "debug.h" 38 | 39 | //C++ guard 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | 45 | /** 46 | * @brief Parameter value/name binding 47 | **/ 48 | 49 | typedef struct 50 | { 51 | uint_t value; 52 | const char_t *name; 53 | } NtpParamName; 54 | 55 | 56 | //Check current trace level 57 | #if (NTP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) 58 | void ntpDumpPacket(const NtpHeader *packet, size_t length); 59 | void ntpDumpExtensions(const uint8_t *extension, size_t length); 60 | #else 61 | #define ntpDumpPacket(packet, length) 62 | #define ntpDumpExtensions(extension, length) 63 | #endif 64 | 65 | void ntpDumpExtension(const NtpExtension *extension, size_t length); 66 | 67 | void ntpDumpNtsAeadExtension(const NtpNtsAeadExtension *extension, 68 | size_t length); 69 | 70 | void ntpDumpTimestamp(const NtpTimestamp *timestamp); 71 | 72 | const char_t *ntpGetParamName(uint_t value, const NtpParamName *paramList, 73 | size_t paramListLen); 74 | 75 | //C++ guard 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /nts/nts_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file nts_debug.h 3 | * @brief Data logging functions for debugging purpose (NTS) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _NTS_DEBUG_H 32 | #define _NTS_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "nts/nts_common.h" 37 | #include "debug.h" 38 | 39 | //C++ guard 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | 45 | /** 46 | * @brief Parameter value/name binding 47 | **/ 48 | 49 | typedef struct 50 | { 51 | uint_t value; 52 | const char_t *name; 53 | } NtsParamName; 54 | 55 | 56 | //Check current trace level 57 | #if (NTS_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) 58 | void ntsDumpNtsKeRecords(const uint8_t *records, size_t length); 59 | void ntsDumpNtsKeRecord(const NtsKeRecord *record, size_t length); 60 | #else 61 | #define ntsDumpNtsKeRecords(records, length) 62 | #define ntsDumpNtsKeRecord(record, length) 63 | #endif 64 | 65 | void ntsDumpNtsNextProtoNegoRecord(const uint8_t *body, size_t length); 66 | void ntsDumpAeadAlgoNegoRecord(const uint8_t *body, size_t length); 67 | void ntsDumpNtpv4ServerNegoRecord(const uint8_t *body, size_t length); 68 | void ntsDumpNtpv4PortNegoRecord(const uint8_t *body, size_t length); 69 | void ntsDumpErrorRecord(const uint8_t *body, size_t length); 70 | void ntsDumpWarningRecord(const uint8_t *body, size_t length); 71 | 72 | const char_t *ntsGetParamName(uint_t value, const NtsParamName *paramList, 73 | size_t paramListLen); 74 | 75 | //C++ guard 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /ppp/ppp_debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ppp_debug.h 3 | * @brief Data logging functions for debugging purpose (PPP) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _DHCP_DEBUG_H 32 | #define _DHCP_DEBUG_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ppp/ppp.h" 37 | #include "ppp/lcp.h" 38 | #include "ppp/ipcp.h" 39 | #include "debug.h" 40 | 41 | //C++ guard 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | //Check current trace level 47 | #if (PPP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) 48 | error_t pppDumpPacket(const PppPacket *packet, size_t length, PppProtocol protocol); 49 | error_t lcpDumpPacket(const PppPacket *packet, size_t length); 50 | error_t ncpDumpPacket(const PppPacket *packet, size_t length, PppProtocol protocol); 51 | error_t papDumpPacket(const PppPacket *packet, size_t length); 52 | error_t chapDumpPacket(const PppPacket *packet, size_t length); 53 | error_t lcpDumpOptions(const PppOption *option, size_t length); 54 | error_t ipcpDumpOptions(const PppOption *option, size_t length); 55 | error_t ipv6cpDumpOptions(const PppOption *option, size_t length); 56 | #else 57 | #define pppDumpPacket(packet, length, protocol) 58 | #endif 59 | 60 | //C++ guard 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /ppp/ppp_hdlc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ppp_hdlc.h 3 | * @brief PPP HDLC driver 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _PPP_HDLC_H 32 | #define _PPP_HDLC_H 33 | 34 | //Dependencies 35 | #include "core/nic.h" 36 | 37 | //C++ guard 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | //PPP HDLC driver 43 | extern const NicDriver pppHdlcDriver; 44 | 45 | //PPP HDLC driver related functions 46 | error_t pppHdlcDriverInit(NetInterface *interface); 47 | 48 | void pppHdlcDriverTick(NetInterface *interface); 49 | 50 | void pppHdlcDriverEnableIrq(NetInterface *interface); 51 | void pppHdlcDriverDisableIrq(NetInterface *interface); 52 | void pppHdlcDriverEventHandler(NetInterface *interface); 53 | 54 | error_t pppHdlcDriverSendPacket(NetInterface *interface, 55 | const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary); 56 | 57 | error_t pppHdlcDriverReceivePacket(NetInterface *interface); 58 | 59 | error_t pppHdlcDriverUpdateMacAddrFilter(NetInterface *interface); 60 | 61 | error_t pppHdlcDriverSendAtCommand(NetInterface *interface, const char_t *data); 62 | 63 | error_t pppHdlcDriverReceiveAtCommand(NetInterface *interface, char_t *data, 64 | size_t size); 65 | 66 | error_t pppHdlcDriverPurgeTxBuffer(PppContext *context); 67 | error_t pppHdlcDriverPurgeRxBuffer(PppContext *context); 68 | 69 | void pppHdlcDriverWriteTxQueue(PppContext *context, uint8_t c); 70 | uint8_t pppHdlcDriverReadRxQueue(PppContext *context); 71 | 72 | bool_t pppHdlcDriverReadTxQueue(NetInterface *interface, int_t *c); 73 | bool_t pppHdlcDriverWriteRxQueue(NetInterface *interface, uint8_t c); 74 | 75 | //C++ guard 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /ppp/ppp_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ppp_misc.h 3 | * @brief PPP miscellaneous functions 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _PPP_MISC_H 32 | #define _PPP_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "ppp/ppp.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //PPP related functions 44 | error_t pppSendConfigureAckNak(PppContext *context, 45 | const PppConfigurePacket *configureReqPacket, PppProtocol protocol, PppCode code); 46 | 47 | error_t pppSendTerminateReq(PppContext *context, 48 | uint8_t identifier, PppProtocol protocol); 49 | 50 | error_t pppSendTerminateAck(PppContext *context, 51 | uint8_t identifier, PppProtocol protocol); 52 | 53 | error_t pppSendCodeRej(PppContext *context, const PppPacket *packet, 54 | uint8_t identifier, PppProtocol protocol); 55 | 56 | error_t pppSendProtocolRej(PppContext *context, uint8_t identifier, 57 | uint16_t protocol, const uint8_t *information, size_t length); 58 | 59 | error_t pppSendEchoRep(PppContext *context, 60 | const PppEchoPacket *echoReqPacket, PppProtocol protocol); 61 | 62 | error_t pppAddOption(PppConfigurePacket *packet, uint8_t optionType, 63 | const void *optionValue, uint8_t optionLen); 64 | 65 | //C++ guard 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /smtp/smtp_client_auth.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file smtp_client_auth.h 3 | * @brief SMTP authentication mechanism 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SMTP_CLIENT_AUTH_H 32 | #define _SMTP_CLIENT_AUTH_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "smtp/smtp_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SMTP client related functions 44 | error_t smtpClientLoginAuth(SmtpClientContext *context, 45 | const char_t *username, const char_t *password); 46 | 47 | error_t smtpClientPlainAuth(SmtpClientContext *context, 48 | const char_t *username, const char_t *password); 49 | 50 | error_t smtpClientCramMd5Auth(SmtpClientContext *context, 51 | const char_t *username, const char_t *password); 52 | 53 | //C++ guard 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /smtp/smtp_client_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file smtp_client_misc.h 3 | * @brief Helper functions for SMTP client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SMTP_CLIENT_MISC_H 32 | #define _SMTP_CLIENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "smtp/smtp_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SMTP client related functions 44 | void smtpClientChangeState(SmtpClientContext *context, 45 | SmtpClientState newState); 46 | 47 | error_t smtpClientSendCommand(SmtpClientContext *context, 48 | SmtpClientReplyCallback callback); 49 | 50 | error_t smtpClientFormatCommand(SmtpClientContext *context, 51 | const char_t *command, const char_t *argument); 52 | 53 | error_t smtpClientParseEhloReply(SmtpClientContext *context, 54 | char_t *replyLine); 55 | 56 | error_t smtpClientFormatMailHeader(SmtpClientContext *context, 57 | const SmtpMailAddr *from, const SmtpMailAddr *recipients, 58 | uint_t numRecipients, const char_t *subject); 59 | 60 | error_t smtpClientFormatMultipartHeader(SmtpClientContext *context, 61 | const char_t *filename, const char_t *contentType, 62 | const char_t *contentTransferEncoding, bool_t last); 63 | 64 | error_t smtpClientCheckTimeout(SmtpClientContext *context); 65 | 66 | //C++ guard 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /smtp/smtp_client_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file smtp_client_transport.h 3 | * @brief Transport protocol abstraction layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SMTP_CLIENT_TRANSPORT_H 32 | #define _SMTP_CLIENT_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "smtp/smtp_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SMTP client related functions 44 | error_t smtpClientOpenConnection(SmtpClientContext *context); 45 | 46 | error_t smtpClientEstablishConnection(SmtpClientContext *context, 47 | const IpAddr *serverIpAddr, uint16_t serverPort); 48 | 49 | error_t smtpClientOpenSecureConnection(SmtpClientContext *context); 50 | error_t smtpClientEstablishSecureConnection(SmtpClientContext *context); 51 | 52 | error_t smtpClientShutdownConnection(SmtpClientContext *context); 53 | void smtpClientCloseConnection(SmtpClientContext *context); 54 | 55 | error_t smtpClientSendData(SmtpClientContext *context, const void *data, 56 | size_t length, size_t *written, uint_t flags); 57 | 58 | error_t smtpClientReceiveData(SmtpClientContext *context, void *data, 59 | size_t size, size_t *received, uint_t flags); 60 | 61 | //C++ guard 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /snmp/snmp_agent_dispatch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_agent_dispatch.h 3 | * @brief SNMP message dispatching 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_AGENT_DISPATCH_H 32 | #define _SNMP_AGENT_DISPATCH_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "snmp/snmp_agent.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SNMP agent related functions 44 | error_t snmpProcessMessage(SnmpAgentContext *context); 45 | 46 | error_t snmpv1ProcessMessage(SnmpAgentContext *context); 47 | error_t snmpv2cProcessMessage(SnmpAgentContext *context); 48 | error_t snmpv3ProcessMessage(SnmpAgentContext *context); 49 | 50 | //C++ guard 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /snmp/snmp_agent_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_agent_misc.h 3 | * @brief Helper functions for SNMP agent 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_AGENT_MISC_H 32 | #define _SNMP_AGENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "snmp/snmp_agent.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SNMP agent related functions 44 | void snmpLockMib(SnmpAgentContext *context); 45 | void snmpUnlockMib(SnmpAgentContext *context); 46 | 47 | SnmpUserEntry *snmpCreateCommunityEntry(SnmpAgentContext *context); 48 | 49 | SnmpUserEntry *snmpFindCommunityEntry(SnmpAgentContext *context, 50 | const char_t *community, size_t length); 51 | 52 | error_t snmpParseVarBinding(const uint8_t *p, 53 | size_t length, SnmpVarBind *var, size_t *consumed); 54 | 55 | error_t snmpWriteVarBinding(SnmpAgentContext *context, const SnmpVarBind *var); 56 | error_t snmpCopyVarBindingList(SnmpAgentContext *context); 57 | 58 | error_t snmpWriteTrapVarBindingList(SnmpAgentContext *context, 59 | uint_t genericTrapType, uint_t specificTrapCode, 60 | const SnmpTrapObject *objectList, uint_t objectListSize); 61 | 62 | error_t snmpTranslateStatusCode(SnmpMessage *message, error_t status, uint_t index); 63 | 64 | //C++ guard 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /snmp/snmp_agent_object.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_agent_object.h 3 | * @brief MIB object access 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_AGENT_OBJECT_H 32 | #define _SNMP_AGENT_OBJECT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "snmp/snmp_agent.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SNMP agent related functions 44 | error_t snmpSetObjectValue(SnmpAgentContext *context, 45 | const SnmpMessage *message, SnmpVarBind *var, bool_t commit); 46 | 47 | error_t snmpGetObjectValue(SnmpAgentContext *context, 48 | const SnmpMessage *message, SnmpVarBind *var); 49 | 50 | error_t snmpGetNextObject(SnmpAgentContext *context, 51 | const SnmpMessage *message, SnmpVarBind *var); 52 | 53 | error_t snmpFindMibObject(SnmpAgentContext *context, 54 | const uint8_t *oid, size_t oidLen, const MibObject **object); 55 | 56 | //C++ guard 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /snmp/snmp_agent_pdu.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_agent_pdu.h 3 | * @brief SNMP agent (PDU processing) 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_AGENT_PDU_H 32 | #define _SNMP_AGENT_PDU_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "snmp/snmp_agent.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SNMP agent related functions 44 | error_t snmpProcessPdu(SnmpAgentContext *context); 45 | 46 | error_t snmpProcessGetRequestPdu(SnmpAgentContext *context); 47 | error_t snmpProcessGetBulkRequestPdu(SnmpAgentContext *context); 48 | error_t snmpProcessSetRequestPdu(SnmpAgentContext *context); 49 | 50 | error_t snmpFormatReportPdu(SnmpAgentContext *context, error_t errorIndication); 51 | 52 | //C++ guard 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /snmp/snmp_agent_trap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file snmp_agent_trap.h 3 | * @brief SNMP trap notifications 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNMP_AGENT_TRAP_H 32 | #define _SNMP_AGENT_TRAP_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "snmp/snmp_agent.h" 37 | 38 | //Trap notification support 39 | #ifndef SNMP_AGENT_TRAP_SUPPORT 40 | #define SNMP_AGENT_TRAP_SUPPORT ENABLED 41 | #elif (SNMP_AGENT_TRAP_SUPPORT != ENABLED && SNMP_AGENT_TRAP_SUPPORT != DISABLED) 42 | #error SNMP_AGENT_TRAP_SUPPORT parameter is not valid 43 | #endif 44 | 45 | //C++ guard 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | 51 | /** 52 | * @brief Object descriptor for trap notifications 53 | **/ 54 | 55 | typedef struct 56 | { 57 | uint8_t oid[SNMP_MAX_OID_SIZE]; 58 | size_t oidLen; 59 | } SnmpTrapObject; 60 | 61 | 62 | //SNMP trap related functions 63 | error_t snmpFormatTrapMessage(SnmpAgentContext *context, SnmpVersion version, 64 | const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode, 65 | const SnmpTrapObject *objectList, uint_t objectListSize); 66 | 67 | error_t snmpFormatTrapPdu(SnmpAgentContext *context, SnmpVersion version, 68 | const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode, 69 | const SnmpTrapObject *objectList, uint_t objectListSize); 70 | 71 | //C++ guard 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /sntp/sntp_client_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sntp_client_misc.h 3 | * @brief Helper functions for SNTP client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SNTP_CLIENT_MISC_H 32 | #define _SNTP_CLIENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "sntp/sntp_client.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //SNTP client related functions 44 | error_t sntpClientOpenConnection(SntpClientContext *context); 45 | void sntpClientCloseConnection(SntpClientContext *context); 46 | 47 | error_t sntpClientSendRequest(SntpClientContext *context); 48 | error_t sntpClientReceiveResponse(SntpClientContext *context); 49 | 50 | error_t sntpClientCheckResponse(SntpClientContext *context, 51 | const IpAddr *ipAddr, uint16_t port, const uint8_t *message, 52 | size_t length); 53 | 54 | error_t sntpClientParseResponse(SntpClientContext *context, 55 | NtpTimestamp *timestamp); 56 | 57 | error_t sntpClientCheckTimeout(SntpClientContext *context); 58 | 59 | //C++ guard 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /syslog/syslog_client_misc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file syslog_client_misc.c 3 | * @brief Helper functions for Syslog client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | //Switch to the appropriate trace level 32 | #define TRACE_LEVEL SYSLOG_TRACE_LEVEL 33 | 34 | //Dependencies 35 | #include "syslog/syslog_client.h" 36 | #include "syslog/syslog_client_misc.h" 37 | #include "debug.h" 38 | 39 | //Check TCP/IP stack configuration 40 | #if (SYSLOG_CLIENT_SUPPORT == ENABLED) 41 | 42 | 43 | /** 44 | * @brief Format timestamp 45 | * @param[in] time Unix timestamp 46 | * @param[out] buffer Buffer where to store the formatted string 47 | * @return Length of the formatted string 48 | **/ 49 | 50 | size_t syslogClientFormatTimestamp(time_t time, char_t *buffer) 51 | { 52 | size_t n; 53 | DateTime dateTime; 54 | 55 | //Abbreviated months 56 | static const char_t months[13][4] = 57 | { 58 | " ", 59 | "Jan", 60 | "Feb", 61 | "Mar", 62 | "Apr", 63 | "May", 64 | "Jun", 65 | "Jul", 66 | "Aug", 67 | "Sep", 68 | "Oct", 69 | "Nov", 70 | "Dec" 71 | }; 72 | 73 | //Convert Unix timestamp to date 74 | convertUnixTimeToDate(time, &dateTime); 75 | 76 | //The format of the timestamp field is Mmm dd hh:mm:ss. If the day of the 77 | //month is less than 10, then it must be represented as a space and then the 78 | //number (refer to RFC 3164, section 4.1.2) 79 | n = osSprintf(buffer, "%s %2" PRIu8 " %02" PRIu8 ":%02" PRIu8 ":%02" PRIu8, 80 | months[dateTime.month], dateTime.day, dateTime.hours, dateTime.minutes, 81 | dateTime.seconds); 82 | 83 | //Return the length of the formatted string 84 | return n; 85 | } 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /syslog/syslog_client_misc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file syslog_client_misc.h 3 | * @brief Helper functions for Syslog client 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _SYSLOG_CLIENT_MISC_H 32 | #define _SYSLOG_CLIENT_MISC_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "syslog/syslog_client.h" 37 | #include "date_time.h" 38 | 39 | //C++ guard 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | //Syslog client related functions 45 | size_t syslogClientFormatTimestamp(time_t time, char_t *buffer); 46 | 47 | //C++ guard 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /web_socket/web_socket_auth.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file web_socket_auth.h 3 | * @brief HTTP authentication for WebSockets 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _WEB_SOCKET_AUTH_H 32 | #define _WEB_SOCKET_AUTH_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "web_socket/web_socket.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //WebSocket related functions 44 | error_t webSocketParseAuthenticateField(WebSocket *webSocket, char_t *value); 45 | 46 | size_t webSocketAddAuthorizationField(WebSocket *webSocket, char_t *output); 47 | 48 | void webSocketConvertArrayToHexString(const uint8_t *input, 49 | size_t inputLen, char_t *output); 50 | 51 | //C++ guard 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /web_socket/web_socket_frame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file web_socket_frame.h 3 | * @brief WebSocket frame parsing and formatting 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _WEB_SOCKET_FRAME_H 32 | #define _WEB_SOCKET_FRAME_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "web_socket/web_socket.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //WebSocket related functions 44 | error_t webSocketFormatFrameHeader(WebSocket *webSocket, 45 | bool_t fin, WebSocketFrameType type, size_t payloadLen); 46 | 47 | error_t webSocketParseFrameHeader(WebSocket *webSocket, 48 | const WebSocketFrame *frame, WebSocketFrameType *type); 49 | 50 | error_t webSocketFormatCloseFrame(WebSocket *webSocket); 51 | 52 | //C++ guard 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /web_socket/web_socket_transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file web_socket_transport.h 3 | * @brief WebSocket transport layer 4 | * 5 | * @section License 6 | * 7 | * SPDX-License-Identifier: GPL-2.0-or-later 8 | * 9 | * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved. 10 | * 11 | * This file is part of CycloneTCP Open. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 2 16 | * of the License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software Foundation, 25 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | * 27 | * @author Oryx Embedded SARL (www.oryx-embedded.com) 28 | * @version 2.5.0 29 | **/ 30 | 31 | #ifndef _WEB_SOCKET_TRANSPORT_H 32 | #define _WEB_SOCKET_TRANSPORT_H 33 | 34 | //Dependencies 35 | #include "core/net.h" 36 | #include "web_socket/web_socket.h" 37 | 38 | //C++ guard 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | //WebSocket related functions 44 | error_t webSocketOpenConnection(WebSocket *webSocket); 45 | 46 | error_t webSocketEstablishConnection(WebSocket *webSocket, 47 | const IpAddr *serverIpAddr, uint16_t serverPort); 48 | 49 | error_t webSocketShutdownConnection(WebSocket *webSocket); 50 | void webSocketCloseConnection(WebSocket *webSocket); 51 | 52 | error_t webSocketSendData(WebSocket *webSocket, const void *data, 53 | size_t length, size_t *written, uint_t flags); 54 | 55 | error_t webSocketReceiveData(WebSocket *webSocket, void *data, 56 | size_t size, size_t *received, uint_t flags); 57 | 58 | //C++ guard 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | --------------------------------------------------------------------------------