text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```unknown # This makefile builds the sample for a POSIX system, like Linux # It required mbedTLS to be installed on the system, e.g. # libmbedtls-dev package on Debian/Ubuntu Linux. big_http_download: src/big_http_download.c $(CC) $^ -lmbedcrypto -o $@ ```
/content/code_sandbox/samples/net/sockets/big_http_download/Makefile.host
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
68
```unknown "-----BEGIN CERTIFICATE-----\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" "9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI\n" "2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx\n" "1x7e/dfgy5SDN67sH0...
/content/code_sandbox/samples/net/sockets/big_http_download/src/DigiCertGlobalRootG2.crt.pem
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
598
```unknown "-----BEGIN CERTIFICATE-----\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" your_sha256_hash\n" "h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+\n" "0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U\n" "A5/TR5d8mUgjU+g4rk...
/content/code_sandbox/samples/net/sockets/big_http_download/src/isrgrootx1.pem
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,126
```objective-c /* * */ #ifndef __CA_CERTIFICATE_H__ #define __CA_CERTIFICATE_H__ #define CA_CERTIFICATE_TAG 1 /* By default only certificates in DER format are supported. If you want to use * certificate in PEM format, you can enable support for it in Kconfig. */ /* ISRG Root X1 for path_to_url * DigiCert Glob...
/content/code_sandbox/samples/net/sockets/big_http_download/src/ca_certificate.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
127
```restructuredtext .. zephyr:code-sample:: socket-can :name: SocketCAN :relevant-api: bsd_sockets socket_can Send and receive raw CAN frames using BSD sockets API. Overview ******** The socket CAN sample is a server/client application that sends and receives raw CAN frames using BSD socket API. The applic...
/content/code_sandbox/samples/net/sockets/can/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
336
```unknown # Private config options for can sample app mainmenu "SocketCAN sample application" config SAMPLE_SOCKETCAN_LOOPBACK_MODE bool "Loopback mode" default y help Set the controller to loopback mode. This allows testing without a second board. source "Kconfig.zephyr" ```
/content/code_sandbox/samples/net/sockets/can/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
63
```unknown CONFIG_CAN=y CONFIG_NET_L2_ETHERNET=n CONFIG_CAN_MAX_FILTER=5 CONFIG_NETWORKING=y CONFIG_NET_DRIVERS=y CONFIG_NET_CANBUS=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_CAN=y CONFIG_POSIX_API=y CONFIG_NET_IPV6=n CONFIG_NET_IPV4=n CONFIG_NET_MGMT=n CONFIG_NET_TCP=n CONFIG_NET_UDP=n CONFIG_NET_DEFAULT_IF_CANBUS_R...
/content/code_sandbox/samples/net/sockets/can/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
208
```yaml sample: name: SocketCAN sample common: tags: - net - socket - can filter: dt_chosen_enabled("zephyr,canbus") and not dt_compat_enabled("kvaser,pcican") depends_on: can harness: console # native_posix does not work with CONFIG_POSIX_API platform_exclude: - native_posix - native_...
/content/code_sandbox/samples/net/sockets/can/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
377
```c /* * */ #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <errno.h> #include "mbedtls/md.h" #if !defined(__ZEPHYR__) || defined(CONFIG_POSIX_API) #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <netd...
/content/code_sandbox/samples/net/sockets/big_http_download/src/big_http_download.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,039
```unknown # The board has very limited amount of memory so use limited resources CONFIG_NET_PKT_RX_COUNT=10 CONFIG_NET_PKT_TX_COUNT=10 CONFIG_NET_BUF_RX_COUNT=10 CONFIG_NET_BUF_TX_COUNT=10 CONFIG_NET_SHELL=n CONFIG_NET_MAX_CONTEXTS=2 ```
/content/code_sandbox/samples/net/sockets/can/boards/stm32f072b_disco.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
61
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_socket_can_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <zephyr/drivers/can.h> #include <zephyr/net/socket.h> #include <zephyr/net/socketcan.h> #include <zephyr/net/socketcan_utils.h> #define PRIORITY k_thread_priority_get(k_curr...
/content/code_sandbox/samples/net/sockets/can/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,898
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y CONFIG_PCIE=y #CONFIG_ETHERNET_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/txtime/overlay-e1000.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown CONFIG_NET_VLAN=y # We have one non-vlan interface and two VLAN interfaces CONFIG_NET_VLAN_COUNT=2 # There will be three network interfaces. # First ethernet interface will use these settings CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1" CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::2" CONFIG_NET_CONFIG_MY_I...
/content/code_sandbox/samples/net/sockets/txtime/overlay-vlan.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
266
```restructuredtext .. zephyr:code-sample:: so_txtime :name: UDP sender using SO_TXTIME :relevant-api: bsd_sockets ethernet Control the transmission time of a packet using SO_TXTIME socket option. Overview ******** This sample is a simple UDP sender/receiver which will set the SO_TXTIME socket option and ex...
/content/code_sandbox/samples/net/sockets/txtime/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
363
```unknown # Private config options for txtime sample app mainmenu "Networking TXTIME sample application" config NET_SAMPLE_PEER string "Peer IP address we are sending packets to" help The value depends on your network setup. This could be a multicast address if needed. If port is not specified, then 4242...
/content/code_sandbox/samples/net/sockets/txtime/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
726
```yaml common: harness: net depends_on: netif # We can only run this in platforms that support PTP clock and TXTIME platform_allow: - native_sim - native_sim/native/64 integration_platforms: - native_sim sample: description: Socket SO_TXTIME sample name: txtime-socket tests: sample.net.sock...
/content/code_sandbox/samples/net/sockets/txtime/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
111
```unknown # Generic networking options CONFIG_NETWORKING=y CONFIG_NET_UDP=y CONFIG_NET_TCP=n CONFIG_NET_IPV6=y CONFIG_NET_IPV4=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_NET_CONTEXT_PRIORITY=y CONFIG_NET_CONTEXT_TXTIME=y CONFIG_NET_TC_TX_COUNT=7 CONFIG_NET_TC_RX_COUNT=7 CONFIG_NET_STATISTICS=y CONFIG_NET_PKT_TXT...
/content/code_sandbox/samples/net/sockets/txtime/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
464
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_txtime_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <zephyr/net/ethernet.h> /* User data for the interface callback */ struct ud { struct net_if *first; struct net_if *second; }; static void iface_cb(struct net_if *iface, void *...
/content/code_sandbox/samples/net/sockets/txtime/src/vlan.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
824
```unknown CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK=y CONFIG_PTP=y ```
/content/code_sandbox/samples/net/sockets/txtime/boards/native_sim.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
16
```unknown CONFIG_BT=n # Disable TCP and IPv4 (TCP disabled to avoid heavy traffic) CONFIG_NET_TCP=n CONFIG_NET_IPV4=n CONFIG_NET_CONFIG_NEED_IPV6=y CONFIG_NET_CONFIG_NEED_IPV4=n CONFIG_NET_CONFIG_MY_IPV4_ADDR="" CONFIG_NET_CONFIG_PEER_IPV4_ADDR="" CONFIG_NET_L2_IEEE802154=y CONFIG_NET_L2_IEEE802154_SHELL=y CONFIG_N...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-802154.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
119
```unknown CONFIG_NET_VLAN=y # Allow useful interface assigned to VLAN interface CONFIG_NET_INTERFACE_NAME_LEN=15 # We have one non-vlan interface and two VLAN interfaces CONFIG_NET_VLAN_COUNT=2 # There will be three network interfaces so allocate enough IPv4 and IPv6 configs. CONFIG_NET_IF_MAX_IPV4_COUNT=3 CONFIG_N...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-vlan.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
352
```unknown CONFIG_NET_L2_IEEE802154=y CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::2" ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-cc2520.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
27
```shell if [ -z "$RUNNING_FROM_MAIN_SCRIPT" ]; then echo "Do not run this script directly!" echo "Run $ZEPHYR_BASE/scripts/net/run-sample-tests.sh instead." exit 1 fi start_configuration || return $? start_zephyr "$overlay" || return $? start_docker "/net-tools/echo-client -i eth0 192.0.2.1" \ "/...
/content/code_sandbox/samples/net/sockets/echo_server/docker-test.sh
shell
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
169
```unknown CONFIG_NO_OPTIMIZATIONS=y CONFIG_DEBUG=y CONFIG_ASSERT=y CONFIG_STACK_SENTINEL=y CONFIG_STACK_CANARIES=y ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-debug.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y CONFIG_PCIE=y #CONFIG_ETHERNET_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-e1000.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y #CONFIG_ETHERNET_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-smsc911x.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
29
```unknown CONFIG_NET_L2_VIRTUAL=y CONFIG_NET_L2_VIRTUAL_MGMT=y CONFIG_NET_L2_IPIP=y CONFIG_NET_IF_MAX_IPV6_COUNT=4 CONFIG_NET_IF_MAX_IPV4_COUNT=4 # First tunneling interface will have these settings CONFIG_NET_SAMPLE_TUNNEL_PEER_ADDR="192.0.2.2" #CONFIG_NET_SAMPLE_TUNNEL_PEER_ADDR="2001:db8::2" # Use this for IPv6 ...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-tunnel.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
143
```unknown CONFIG_BT=n # Disable IPv4 CONFIG_NET_IPV4=n CONFIG_NET_CONFIG_NEED_IPV6=y CONFIG_NET_CONFIG_NEED_IPV4=n CONFIG_NET_CONFIG_MY_IPV4_ADDR="" CONFIG_NET_CONFIG_PEER_IPV4_ADDR="" CONFIG_NET_L2_IEEE802154=y CONFIG_NET_L2_IEEE802154_SHELL=y CONFIG_NET_L2_IEEE802154_LOG_LEVEL_INF=y # Uncomment for 868 MHz #CONF...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-802154-subg.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
121
```unknown # USB Device settings CONFIG_USB_DEVICE_STACK=y # Select USB Configurations CONFIG_USB_DEVICE_NETWORK_ECM=y CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n # Logging CONFIG_USB_DRIVER_LOG_LEVEL_INF=y CONFIG_USB_DEVICE_LOG_LEVEL_INF=y ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-netusb.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
54
```unknown CONFIG_LOG=y CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_LOG_BUFFER_SIZE=1024 CONFIG_NET_LOG=y CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y CONFIG_NET_CONN_LOG_LEVEL_DBG=y CONFIG_NET_CONTEXT_LOG_LEVEL_DBG=y CONFIG_NET_TCP_LOG_LEVEL_DBG=y #CONFIG_NET_IF_LOG_LEVEL_DBG=y #CONFIG_NET_L2_ETHERNE...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-log.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
87
```unknown CONFIG_ETH_NATIVE_POSIX=n CONFIG_NET_DRIVERS=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_NET_NATIVE_OFFLOADED_SOCKETS=y CONFIG_HEAP_MEM_POOL_SIZE=1024 # IPv6 DAD requires lower level network interface access, below exposed socket-level access CONFIG_NET_IPV6_DAD=n ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-nsos.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
73
```unknown CONFIG_BT=n # Disable TCP and IPv4 (TCP disabled to avoid heavy traffic) CONFIG_NET_TCP=n CONFIG_NET_IPV4=n # Disabling Ethernet CONFIG_NET_SLIP_TAP=n # Enable UART PIPE 802.15.4 driver CONFIG_IEEE802154_UPIPE=y CONFIG_NET_CONFIG_NEED_IPV6=y CONFIG_NET_CONFIG_NEED_IPV4=n CONFIG_NET_CONFIG_MY_IPV4_ADDR="" ...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-qemu_802154.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
143
```unknown CONFIG_NET_CAPTURE=y # These might need adjustment if you have more than # two network interfaces. CONFIG_NET_IF_MAX_IPV6_COUNT=3 CONFIG_NET_IF_MAX_IPV4_COUNT=3 CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=2 CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=4 ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-capture.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
66
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_txtime_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <errno.h> #include <stdio.h> #include <inttypes.h> #include <zephyr/drivers/ptp_clock.h> #include <zephyr/shell/shell.h> #include <zephyr/net/net_mgmt.h> #include <zephyr/net/net_...
/content/code_sandbox/samples/net/sockets/txtime/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
4,681
```unknown CONFIG_MAIN_STACK_SIZE=3072 CONFIG_NET_BUF_RX_COUNT=80 CONFIG_NET_BUF_TX_COUNT=80 # TLS configuration CONFIG_MBEDTLS=y CONFIG_MBEDTLS_BUILTIN=y CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=60000 CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=2048 CONFIG_NET_SOCKETS_SOCKOPT_TLS=y CONFIG_NET_SOCKETS_TLS_MAX_CON...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-tls.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
136
```unknown # Private config options for echo-server sample app mainmenu "Networking echo-server sample application" config NET_SAMPLE_NUM_HANDLERS int "How many connections to serve at the same time" default 1 help Each connection is served by a thread which needs memory. Only increase the value here if rea...
/content/code_sandbox/samples/net/sockets/echo_server/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
565
```unknown CONFIG_NET_MGMT_EVENT_STACK_SIZE=65535 CONFIG_PRIVILEGED_STACK_SIZE=65535 CONFIG_NET_TX_STACK_SIZE=65535 CONFIG_NET_RX_STACK_SIZE=65535 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=65535 CONFIG_MAIN_STACK_SIZE=65535 CONFIG_IDLE_STACK_SIZE=65535 CONFIG_ISR_STACK_SIZE=65535 CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535 CON...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-max-stacks.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
104
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y CONFIG_NET_SLIP_TAP=n CONFIG_SLIP=n ```
/content/code_sandbox/samples/net/sockets/echo_server/overlay-qemu_cortex_m3_eth.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```restructuredtext .. zephyr:code-sample:: sockets-echo-server :name: Echo server (advanced) :relevant-api: bsd_sockets tls_credentials Implement a UDP/TCP server that sends received packets back to the sender. Overview ******** The echo-server sample application for Zephyr implements a UDP/TCP server that...
/content/code_sandbox/samples/net/sockets/echo_server/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,098
```unknown CONFIG_REQUIRES_FULL_LIBC=y # Disable TCP and IPv4 (TCP disabled to avoid heavy traffic) CONFIG_NET_TCP=n CONFIG_NET_IPV4=n CONFIG_NET_IPV6_NBR_CACHE=n CONFIG_NET_IPV6_MLD=n CONFIG_NET_CONFIG_NEED_IPV4=n CONFIG_NET_CONFIG_MY_IPV4_ADDR="" CONFIG_NET_CONFIG_PEER_IPV4_ADDR="" CONFIG_SYSTEM_WORKQUEUE_STACK_SI...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-ot.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
309
```unknown # This configuration is designed to enable feature that might be disabled by default in the network stack CONFIG_NET_CONFIG_NEED_IPV4=y CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.11.111" CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.168.11.100" CONFIG_NET_CONFIG_MY_IPV4_GW="192.168.11.1" # Optimized networking setting...
/content/code_sandbox/samples/net/sockets/echo_server/overlay-full_network_stack.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
204
```unknown # Generic networking options CONFIG_NETWORKING=y CONFIG_NET_UDP=y CONFIG_NET_TCP=y CONFIG_NET_IPV6=y CONFIG_NET_IPV4=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_NET_CONNECTION_MANAGER=y # Kernel options CONFIG_MAIN_STACK_SIZE=2048 CONFIG_ENTROPY_GENERATOR=y CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_INIT_ST...
/content/code_sandbox/samples/net/sockets/echo_server/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
346
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_echo_server_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <zephyr/net/ethernet.h> /* User data for the interface callback */ struct ud { struct net_if *first; struct net_if *second; struct net_if *eth; }; static void iface_cb(st...
/content/code_sandbox/samples/net/sockets/echo_server/src/vlan.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
887
```yaml common: harness: net tags: - net - socket depends_on: netif min_flash: 140 sample: description: Test network sockets using a client/server sample name: Socket Echo Server tests: sample.net.sockets.echo_server: platform_allow: - qemu_x86 - qemu_x86_64 - sam_e70_xplaine...
/content/code_sandbox/samples/net/sockets/echo_server/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,275
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_echo_server_sample, LOG_LEVEL_DBG); #include <zephyr/usb/usb_device.h> #include <zephyr/net/net_config.h> int init_usb(void) { int ret; ret = usb_enable(NULL); if (ret != 0) { LOG_ERR("Cannot enable USB (%d)", ret); return ret; } (void)...
/content/code_sandbox/samples/net/sockets/echo_server/src/usb.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
106
```objective-c /* * */ #ifndef __CERTIFICATE_H__ #define __CERTIFICATE_H__ #define SERVER_CERTIFICATE_TAG 1 #define PSK_TAG 2 #if !defined(CONFIG_NET_SAMPLE_CERTS_WITH_SC) static const unsigned char server_certificate[] = { #include "echo-apps-cert.der.inc" }; /* This is the private key in pkcs#8 format. */ stati...
/content/code_sandbox/samples/net/sockets/echo_server/src/certificate.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
194
```objective-c /* * */ #define MY_PORT 4242 #if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS) || defined(CONFIG_NET_TCP) || \ defined(CONFIG_COVERAGE_GCOV) #define STACK_SIZE 4096 #else #define STACK_SIZE 2048 #endif #if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIOR...
/content/code_sandbox/samples/net/sockets/echo_server/src/common.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
486
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_echo_server_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <zephyr/net/ethernet.h> #include <zephyr/net/virtual_mgmt.h> #include <zephyr/net/conn_mgr_monitor.h> /* User data for the interface callback */ struct ud { struct net_if *t...
/content/code_sandbox/samples/net/sockets/echo_server/src/tunnel.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,184
```c /* udp.c - UDP specific code for echo server */ /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_echo_server_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <errno.h> #include <stdio.h> #include <zephyr/net/socket.h> #include <zephyr/net/tls_credentials.h> #include "common.h" #incl...
/content/code_sandbox/samples/net/sockets/echo_server/src/udp.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,824
```objective-c /* * */ #ifndef __DUMMY_PSK_H__ #define __DUMMY_PSK_H__ static const unsigned char psk[] = {0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; static const char psk_id[] = "PSK_identity"; #endif /* __DUMMY_PSK_H__ */ ```
/content/code_sandbox/samples/net/sockets/echo_server/src/dummy_psk.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
136
```c /* tcp.c - TCP specific code for echo server */ /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_echo_server_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <errno.h> #include <stdio.h> #include <zephyr/net/socket.h> #include <zephyr/net/tls_credentials.h> #include "common.h" #incl...
/content/code_sandbox/samples/net/sockets/echo_server/src/tcp.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,167
```c /* echo-server.c - Networking echo server */ /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_echo_server_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <zephyr/linker/sections.h> #include <errno.h> #include <zephyr/shell/shell.h> #include <zephyr/net/net_core.h> #include <zephyr/...
/content/code_sandbox/samples/net/sockets/echo_server/src/echo-server.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,298
```unknown # # # # Reduced configs to fit into SAMR21 SoC CONFIG_CPP=n CONFIG_NET_PKT_RX_COUNT=5 CONFIG_NET_PKT_TX_COUNT=5 CONFIG_NET_BUF_RX_COUNT=5 CONFIG_NET_BUF_TX_COUNT=5 CONFIG_NET_MAX_CONTEXTS=2 CONFIG_NET_MAX_CONN=1 CONFIG_NET_MAX_ROUTES=1 CONFIG_NET_MAX_NEXTHOPS=1 CONFIG_SHELL_STACK_SIZE=768 CONFIG_SHELL_CMD...
/content/code_sandbox/samples/net/sockets/echo_server/boards/samr21_xpro.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
187
```unknown CONFIG_PM=y CONFIG_PM_DEVICE=y CONFIG_NET_STATISTICS_POWER_MANAGEMENT=y ```
/content/code_sandbox/samples/net/sockets/echo_server/boards/frdm_k64f.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```unknown /* * */ /** * Overlay to enable for CC1352R1 / CC1352P1-based boards. */ / { chosen { zephyr,ieee802154 = &ieee802154g; }; }; &ieee802154 { status = "disabled"; }; &ieee802154g { status = "okay"; }; ```
/content/code_sandbox/samples/net/sockets/echo_server/boards/cc1352-enable-subg.overlay
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
71
```unknown # Overlay for experimental TCP as qemu_x86 with E1000 CONFIG_PCIE=y CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y ```
/content/code_sandbox/samples/net/sockets/echo/overlay-e1000.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
37
```unknown CONFIG_LOG=y CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_NET_LOG=y #CONFIG_NET_IF_LOG_LEVEL_DBG=y #CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y CONFIG_NET_CONN_LOG_LEVEL_DBG=y CONFIG_NET_CONTEXT_LOG_LEVEL_DBG=y CONFIG_NET_TCP_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/echo/overlay-log.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
79
```unknown # General config CONFIG_MAIN_STACK_SIZE=1200 CONFIG_POSIX_API=y # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_TCP=y CONFIG_NET_SOCKETS=y CONFIG_NET_IPV4_MAPPING_TO_IPV6=y # Network driver config CONFIG_TEST_RANDOM_GENERATOR=y # Network address config CONFIG_NET_CON...
/content/code_sandbox/samples/net/sockets/echo/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
164
```yaml sample: description: BSD Sockets API TCP echo server sample name: socket_echo common: harness: net depends_on: netif filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC tests: sample.net.sockets.echo: tags: - net - socket sample.net.sockets.echo.offload.simplelink: pl...
/content/code_sandbox/samples/net/sockets/echo/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
113
```unknown # This makefile builds socket_echo sample for POSIX system, like Linux socket_echo: src/socket_echo.c $(CC) $^ -o $@ ```
/content/code_sandbox/samples/net/sockets/echo/Makefile.host
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
34
```restructuredtext .. zephyr:code-sample:: sockets-echo :name: Echo server (simple) :relevant-api: bsd_sockets Implements a simple IPv4/IPv6 TCP echo server using BSD sockets. Overview ******** The sockets/echo sample application for Zephyr implements a TCP echo server supporting both IPv4 and IPv6 and usi...
/content/code_sandbox/samples/net/sockets/echo/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
553
```unknown # Networking Config: CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n CONFIG_NET_SOCKETS=y # Enable SimpleLink WiFi Driver and Socket Offload CONFIG_WIFI=y CONFIG_WIFI_SIMPLELINK=y CONFIG_NET_SOCKETS_OFFLOAD=y # Disable unneeded settings from the base prj.conf: CONFIG_TEST_RANDOM...
/content/code_sandbox/samples/net/sockets/echo/boards/cc3235sf_launchxl.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
137
```unknown # Networking Config: CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n CONFIG_NET_SOCKETS=y # Enable SimpleLink WiFi Driver and Socket Offload CONFIG_WIFI=y CONFIG_WIFI_SIMPLELINK=y CONFIG_NET_SOCKETS_OFFLOAD=y # Disable unneeded settings from the base prj.conf: CONFIG_TEST_RANDOM...
/content/code_sandbox/samples/net/sockets/echo/boards/cc3220sf_launchxl.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
129
```c /* * */ #include <stdio.h> #include <stdlib.h> #include <errno.h> #ifndef __ZEPHYR__ #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #else #include <zephyr/net/socket.h> #include <zephyr/kernel.h> #endif #define BIND_PORT 4242 int main(void) { int opt; socklen...
/content/code_sandbox/samples/net/sockets/echo/src/socket_echo.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
720
```unknown # General config CONFIG_REQUIRES_FULL_LIBC=y CONFIG_MAIN_STACK_SIZE=1200 # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_TCP=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_POLL_MAX=5 CONFIG_POSIX_API=y # Network driver config CONFIG_TEST_RANDOM_GENERATOR=y # Network addr...
/content/code_sandbox/samples/net/sockets/echo_async/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
171
```yaml sample: description: BSD Sockets API TCP echo server sample using non-blocking sockets name: socket_echo_async common: filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC harness: net platform_allow: qemu_x86 tags: - net - socket tests: sample.net.sockets.echo_async: extra_co...
/content/code_sandbox/samples/net/sockets/echo_async/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
89
```unknown # This makefile builds sample for POSIX system, like Linux socket_echo: src/socket_echo.c $(CC) $^ -o $@ ```
/content/code_sandbox/samples/net/sockets/echo_async/Makefile.host
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```restructuredtext .. zephyr:code-sample:: async-sockets-echo :name: Asynchronous echo server using poll() :relevant-api: bsd_sockets Implement an asynchronous IPv4/IPv6 TCP echo server using BSD sockets and poll() Overview ******** The sockets/echo-async sample application for Zephyr implements an asynchr...
/content/code_sandbox/samples/net/sockets/echo_async/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
645
```unknown # Networking Config: CONFIG_NET_NATIVE=n # Enable SimpleLink WiFi Driver and Socket Offload CONFIG_WIFI=y CONFIG_WIFI_SIMPLELINK=y CONFIG_NET_SOCKETS_OFFLOAD=y # Disable unneeded settings from the base prj.conf: CONFIG_NET_CONFIG_SETTINGS=n CONFIG_NET_CONFIG_MY_IPV4_ADDR="" CONFIG_NET_CONFIG_PEER_IPV4_ADDR...
/content/code_sandbox/samples/net/sockets/echo_async/boards/cc3220sf_launchxl.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
114
```restructuredtext .. zephyr:code-sample:: coap-client :name: CoAP client :relevant-api: coap Use the CoAP library to implement a client that fetches a resource. Overview ******** This sample is a simple CoAP client showing how to retrieve information from a resource. This demo assumes that the platform o...
/content/code_sandbox/samples/net/sockets/coap_client/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
419
```unknown # Generic networking options CONFIG_NETWORKING=y CONFIG_REQUIRES_FULL_LIBC=y CONFIG_NET_IPV6=y CONFIG_NET_UDP=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_POLL_MAX=4 CONFIG_POSIX_API=y CONFIG_COAP=y # Kernel options CONFIG_ENTROPY_GENERATOR=y CONFIG_TEST_RANDOM_GENERATOR=y # Logging CONFIG_PRINTK=y CONFIG_N...
/content/code_sandbox/samples/net/sockets/coap_client/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
153
```c /* * */ #include <stdio.h> #include <stdbool.h> #include <errno.h> #include <stdlib.h> #if !defined(__ZEPHYR__) #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <fcntl.h> #include <poll.h> #define USE_IPV6 #else #include <zephyr/posix/fcntl.h> #include <ze...
/content/code_sandbox/samples/net/sockets/echo_async/src/socket_echo.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,639
```yaml common: filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC sample: description: TBD name: TBD tests: sample.net.sockets.coap_client: harness: net tags: - net - socket platform_allow: qemu_x86 ```
/content/code_sandbox/samples/net/sockets/coap_client/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
65
```unknown # Add hostname CONFIG_NET_HOSTNAME_ENABLE=y # IPv4 autoconfiguration CONFIG_NET_IPV4_AUTO=y # Remove static IP configuration CONFIG_NET_CONFIG_SETTINGS=n # Add LLMNR responder CONFIG_LLMNR_RESPONDER=y ```
/content/code_sandbox/samples/net/sockets/dumb_http_server/overlay-zeroconf.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
53
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y CONFIG_PCIE=y #CONFIG_ETHERNET_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/dumb_http_server/overlay-e1000.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y ```
/content/code_sandbox/samples/net/sockets/dumb_http_server/overlay-smsc911x.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```unknown # USB Device settings CONFIG_USB_DEVICE_STACK=y # Select USB Configurations CONFIG_USB_DEVICE_NETWORK_ECM=y # Logging CONFIG_USB_DRIVER_LOG_LEVEL_INF=y CONFIG_USB_DEVICE_LOG_LEVEL_INF=y ```
/content/code_sandbox/samples/net/sockets/dumb_http_server/overlay-netusb.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
45
```restructuredtext .. zephyr:code-sample:: socket-dumb-http-server :name: Dumb HTTP server :relevant-api: bsd_sockets net_pkt Implement a simple, portable, HTTP server using BSD sockets. Overview ******** The sockets/dumb_http_server sample application for Zephyr implements a skeleton HTTP server using a B...
/content/code_sandbox/samples/net/sockets/dumb_http_server/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
602
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y CONFIG_NET_SLIP_TAP=n CONFIG_SLIP=n ```
/content/code_sandbox/samples/net/sockets/dumb_http_server/overlay-qemu_cortex_m3_eth.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```unknown # General config CONFIG_REQUIRES_FULL_LIBC=y # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n CONFIG_NET_TCP=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y # Network driver config CONFIG_TEST_RANDOM_GENERATOR=y # Network address config CONFIG_NET_CONFIG_SETTINGS=y CONFIG_NET_CONFIG_N...
/content/code_sandbox/samples/net/sockets/dumb_http_server/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
165
```yaml sample: description: BSD Sockets API dumb HTTP server example name: socket_dumb_http_server common: filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC harness: net min_ram: 32 min_flash: 96 tags: - net - socket platform_exclude: intel_adsp/cavs25 tests: sample.net.sockets.du...
/content/code_sandbox/samples/net/sockets/dumb_http_server/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
291
```unknown # This makefile builds socket_echo sample for POSIX system, like Linux # # Before using this Makefile, run Zephyr build process once to generate # include files. socket_dumb_http: src/socket_dumb_http.c $(CC) $^ -o $@ ```
/content/code_sandbox/samples/net/sockets/dumb_http_server/Makefile.host
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
60
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_coap_client_sample, LOG_LEVEL_DBG); #include <errno.h> #include <zephyr/sys/printk.h> #include <zephyr/sys/byteorder.h> #include <zephyr/kernel.h> #include <zephyr/net/socket.h> #include <zephyr/net/net_mgmt.h> #include <zephyr/net/net_ip.h> #inc...
/content/code_sandbox/samples/net/sockets/coap_client/src/coap-client.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,674
```c /* * */ #include <stdio.h> #include <stdlib.h> #include <errno.h> #if !defined(__ZEPHYR__) || defined(CONFIG_POSIX_API) #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #else #include <zephyr/net/socket.h> #include <zephyr/kernel.h> #include <zephyr/net/net_pkt.h> ...
/content/code_sandbox/samples/net/sockets/dumb_http_server/src/socket_dumb_http.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
993
```unknown CONFIG_MAIN_STACK_SIZE=3072 CONFIG_NET_BUF_RX_COUNT=80 CONFIG_NET_BUF_TX_COUNT=80 # TLS configuration CONFIG_MBEDTLS=y CONFIG_MBEDTLS_BUILTIN=y CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=60000 CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=2048 CONFIG_NET_SOCKETS_SOCKOPT_TLS=y CONFIG_NET_SOCKETS_TLS_MAX_CON...
/content/code_sandbox/samples/net/sockets/websocket_client/overlay-tls.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
94
```unknown # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_TCP=y CONFIG_NET_SHELL=y CONFIG_NET_STATISTICS=y # Sockets CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_POLL_MAX=4 # Network driver config CONFIG_TEST_RANDOM_GENERATOR=y # Network address config CONFIG_NET_CONFIG_SETTINGS=y ...
/content/code_sandbox/samples/net/sockets/websocket_client/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
304
```restructuredtext .. zephyr:code-sample:: sockets-websocket-client :name: WebSocket Client :relevant-api: bsd_sockets websocket Implement a Websocket client that connects to a Websocket server. Overview ******** This sample application implements a Websocket client that will do an HTTP or HTTPS handshake ...
/content/code_sandbox/samples/net/sockets/websocket_client/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
660
```yaml common: tags: - net - http - http_client - websocket_client - websocket min_ram: 35 depends_on: netif # native_posix does not work with CONFIG_POSIX_API platform_exclude: - native_posix - native_posix/native/64 sample: description: Websocket client sample name: websocke...
/content/code_sandbox/samples/net/sockets/websocket_client/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
117
```objective-c /* * */ #define CA_CERTIFICATE_TAG 1 #define TLS_PEER_HOSTNAME "localhost" /* This is the same cert as what is found in net-tools/https-cert.pem file */ static const unsigned char ca_certificate[] = { #include "https-cert.der.inc" }; ```
/content/code_sandbox/samples/net/sockets/websocket_client/src/ca_certificate.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
57
```shell if [ -z "$RUNNING_FROM_MAIN_SCRIPT" ]; then echo "Do not run this script directly!" echo "Run $ZEPHYR_BASE/scripts/net/run-sample-tests.sh instead." exit 1 fi # First the non-tls version start_configuration || return $? start_zephyr "$overlay" "-DCONFIG_NET_SAMPLE_SERVE_LARGE_FILE=y" || return $?...
/content/code_sandbox/samples/net/sockets/dumb_http_server_mt/docker-test.sh
shell
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
429
```restructuredtext .. zephyr:code-sample:: socket-dumb-http-server-mt :name: Dumb HTTP server (multi-threaded) :relevant-api: bsd_sockets net_pkt thread_apis tls_credentials Implement a simple HTTP server supporting simultaneous connections using BSD sockets. Overview ******** The ``sockets/dumb_http_serve...
/content/code_sandbox/samples/net/sockets/dumb_http_server_mt/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
472
```unknown CONFIG_MAIN_STACK_SIZE=3072 # TLS configuration CONFIG_MBEDTLS=y CONFIG_MBEDTLS_BUILTIN=y CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=60000 CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=4096 CONFIG_NET_SOCKETS_SOCKOPT_TLS=y CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=20 ```
/content/code_sandbox/samples/net/sockets/dumb_http_server_mt/overlay-tls.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
78
```unknown # Private config options for this sample app mainmenu "Networking dumb-http-server-mt sample application" config NET_SAMPLE_NUM_HANDLERS int "How many connections to serve at the same time" default 2 help Each connection is served by a thread which needs memory. Only increase the value here if re...
/content/code_sandbox/samples/net/sockets/dumb_http_server_mt/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
126
```unknown # Kernel options CONFIG_TEST_RANDOM_GENERATOR=y # POSIX options CONFIG_ZVFS_OPEN_MAX=20 CONFIG_POSIX_API=y # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_TCP=y CONFIG_NET_UDP=n CONFIG_NET_SOCKETS=y CONFIG_NET_MAX_CONN=20 CONFIG_NET_MAX_CONTEXTS=20 CONFIG_NET_STATISTI...
/content/code_sandbox/samples/net/sockets/dumb_http_server_mt/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
315
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_websocket_client_sample, LOG_LEVEL_DBG); #include <zephyr/misc/lorem_ipsum.h> #include <zephyr/net/net_ip.h> #include <zephyr/net/socket.h> #include <zephyr/net/tls_credentials.h> #include <zephyr/net/websocket.h> #include <zephyr/random/random.h>...
/content/code_sandbox/samples/net/sockets/websocket_client/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,939
```yaml sample: description: BSD Sockets API multithreaded dumb HTTP server example name: socket_dumb_http_server_mt common: harness: net depends_on: netif min_ram: 128 min_flash: 128 tags: - net - socket - http # native_posix does not work with CONFIG_POSIX_API platform_exclude: - nat...
/content/code_sandbox/samples/net/sockets/dumb_http_server_mt/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
141
```restructuredtext .. zephyr:code-sample:: async-sockets-echo-select :name: Asynchronous echo server using select() :relevant-api: bsd_sockets Implement an asynchronous IPv4/IPv6 TCP echo server using BSD sockets and select() Overview ******** The sockets/echo_async_select sample application for Zephyr imp...
/content/code_sandbox/samples/net/sockets/echo_async_select/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
615
```unknown # General config CONFIG_REQUIRES_FULL_LIBC=y CONFIG_MAIN_STACK_SIZE=1200 CONFIG_POSIX_API=y # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_TCP=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_POLL_MAX=5 # Network driver config CONFIG_TEST_RANDOM_GENERATOR=y # Network addre...
/content/code_sandbox/samples/net/sockets/echo_async_select/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
171
```yaml sample: description: BSD Sockets API TCP echo server sample using non-blocking sockets name: socket_echo_async common: harness: net platform_allow: qemu_x86 tags: - net - socket filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC tests: sample.net.sockets.echo_async_select: e...
/content/code_sandbox/samples/net/sockets/echo_async_select/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
90
```unknown # This makefile builds sample for POSIX system, like Linux socket_echo_select: src/socket_echo_select.c $(CC) $^ -o $@ ```
/content/code_sandbox/samples/net/sockets/echo_async_select/Makefile.host
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
34