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
/*
*
*/
&pinctrl {
spi3_default_alt: spi3_default_alt {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 4)>,
<NRF_PSEL(SPIM_MOSI, 1, 5)>,
<NRF_PSEL(SPIM_MISO, 1, 6)>;
};
};
spi3_sleep_alt: spi3_sleep_alt {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 4)>,
<NRF_PSEL(SPIM_MOSI, 1, 5)>,
<N... | /content/code_sandbox/samples/net/wifi/boards/reel_board.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 322 |
```unknown
CONFIG_NET_IF_MAX_IPV4_COUNT=2
CONFIG_NET_MGMT_EVENT_QUEUE_TIMEOUT=20
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
``` | /content/code_sandbox/samples/net/wifi/boards/cy8cproto_062_4343w.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 31 |
```unknown
# Conf file to test the net_wifi shell module with the cc3220sf WiFi driver
# cmake .. -DBOARD=cc3220sf_launchxl
CONFIG_WIFI_SIMPLELINK=y
# Debugging
CONFIG_WIFI_LOG_LEVEL_DBG=y
CONFIG_DEBUG=y
``` | /content/code_sandbox/samples/net/wifi/boards/cc3220sf_launchxl.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```unknown
CONFIG_GPIO=y
CONFIG_WIFI_WINC1500_REGION_EUROPE=y
``` | /content/code_sandbox/samples/net/wifi/boards/reel_board.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 18 |
```unknown
CONFIG_WIFI_NXP=y
CONFIG_NXP_RW610=y
CONFIG_NXP_WIFI_SHELL=y
#
# C Library
#
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CBPRINTF_FP_SUPPORT=y
# log
CONFIG_WIFI_LOG_LEVEL_DBG=y
CONFIG_THREAD_LOCAL_STORAGE=y
CONFIG_ASSERT=y
CONFIG_ASSERT_LEVEL=2
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG_PRINTK=n
# os
CONFIG_THREAD_CUS... | /content/code_sandbox/samples/net/wifi/boards/rd_rw612_bga.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,156 |
```unknown
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIU44Xbg9l+1kCAggA
MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECBx6SOeZLPFiBIIEyBbU4bj1/Sq0
W5O13hWtq34nTHG+HtgOG61u8659V+0Txbd6E6gBlMTUDtczKCb2BS7D2uugSwTR
Xj1CeLha1qfsWT3IEe38KB/r+TXA1CESblkHBeYjHYOhOoRSNjg8e+QddFim4uuN
6eCqgia4jJj... | /content/code_sandbox/samples/net/wifi/test_certs/server-key.pem | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,021 |
```unknown
-----BEGIN CERTIFICATE-----
MIIE9zCCA9+gAwIBAgIUNX/wAWvB0xblUUghlsoear4f6kkwDQYJKoZIhvcNAQEL
your_sha256_hash
your_sha256_hash
your_sha256_hash
your_sha256_hash
your_sha256_hash
your_sha256_hash
your_sha256_hash
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzR3RL3+70yN+1Nx0bAXT60qqf
AxCk/NXphq5cxUT5skXc97KUUnIQ1SaL... | /content/code_sandbox/samples/net/wifi/test_certs/ca.pem | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 738 |
```unknown
-----BEGIN ENCRYPTED PRIVATE KEY-----
your_sha256_hash
your_sha256_hash
NoEhloVT9ZbxSfYUOoD86w6OUgLW9I9zgH7v1lZ+Q6YnZ6lPxi+NthUvZZNd0M4f
rEAkJMeVqCImk9C5DYUdsEyVxxbWCiBKuO+j14S8RaetKvTVlYZjdkdbwW4chwLs
joPtKUtRMhWdQ5XF9qtVhmKjqHHTEFhOXP/VMCd6bNOkjzneuUDlLj+EOl8K1NVZ
tpZUi6D2p0tksrMokgl3n0Esee4W6XKemJ8KyLkA34... | /content/code_sandbox/samples/net/wifi/test_certs/client-key.pem | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,180 |
```unknown
Bag Attributes
localKeyID: 70 E4 1E 20 0B 8A 3E 65 06 98 99 29 C2 A4 26 33 38 D8 94 23
subject=C = FR, ST = Radius, O = Example Inc, CN = Example Server Certificate, emailAddress = admin@example.org
issuer=C = FR, ST = Radius, L = Somewhere, O = Example Inc, emailAddress = admin@example.org, CN = Example Ce... | /content/code_sandbox/samples/net/wifi/test_certs/server.pem | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,141 |
```unknown
Bag Attributes
localKeyID: DF 33 79 D4 52 3A 61 87 BF DD 0C BC BB 90 F5 1D 8C D0 02 1E
subject=C = FR, ST = Radius, O = Example Inc, CN = Example user, emailAddress = user.example@example.org
issuer=C = FR, ST = Radius, L = Somewhere, O = Example Inc, emailAddress = admin@example.org, CN = Example Certifica... | /content/code_sandbox/samples/net/wifi/test_certs/client.pem | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,847 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_UDP=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=5
CONFIG_NET_LOG=y
CONFIG_LOG=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_SOCKETS_POLL_M... | /content/code_sandbox/samples/net/dns_resolve/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 442 |
```yaml
common:
harness: net
depends_on: netif
tags:
- net
- dns
platform_exclude:
- native_posix
- native_posix/native/64
sample:
description: DNS resolver, mDNS and LLMNR responder
name: DNS resolver and responder sample application
tests:
sample.net.dns_resolve.mdns:
extra_configs:
... | /content/code_sandbox/samples/net/dns_resolve/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 175 |
```restructuredtext
.. zephyr:code-sample:: dns-resolve
:name: DNS resolve
:relevant-api: dns_resolve net_mgmt
Resolve an IP address for a given hostname.
Overview
********
This application will setup IP address for the device, and then
try to resolve various hostnames according to how the user has
configur... | /content/code_sandbox/samples/net/dns_resolve/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 982 |
```unknown
# Config to disable TLS and DHCPv4, allowing insecure MQTT and a static IP address.
# This allows quick testing of the application without need for a DHCP server or secure MQTT broker set up.
# Only recommended for quick sampling/testing.
# Usage: west build -b <board> -- -DOVERLAY_CONFIG=overlay-static-inse... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/overlay-static-insecure.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 170 |
```unknown
CONFIG_NET_DHCPV4=n
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2"
CONFIG_DNS_RESOLVER=y
CONFIG_DNS_SERVER_IP_ADDRESSES=y
CONFIG_DNS_SERVER1="192.0.2.2"
``` | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/overlay-static.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 88 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_dns_resolve_client_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/linker/sections.h>
#include <errno.h>
#include <stdio.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_mgmt.h>
#incl... | /content/code_sandbox/samples/net/dns_resolve/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,471 |
```restructuredtext
.. zephyr:code-sample:: secure-mqtt-sensor-actuator
:name: Secure MQTT Sensor/Actuator
:relevant-api: mqtt_socket sensor_interface
Implement an MQTT-based IoT sensor/actuator device
Overview
********
This sample demonstrates the implementation of an IoT sensor/actuator device.
The applic... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,403 |
```unknown
mainmenu "Secure MQTT Sensor Actuator Sample Application"
config NET_SAMPLE_MQTT_BROKER_HOSTNAME
string "Hostname of MQTT broker"
default "test.mosquitto.org"
help
MQTT broker's hostname or IP address.
config NET_SAMPLE_MQTT_BROKER_PORT
string "MQTT Broker Connection Port"
default "8883"
help
... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 389 |
```unknown
# Enable network stack
CONFIG_NETWORKING=y
CONFIG_NET_LOG=y
# Enable IPv4
CONFIG_NET_IPV4=y
# Enable IPv6
CONFIG_NET_IPV6=y
# Enable TCP
CONFIG_NET_TCP=y
# Enable DHCP
CONFIG_NET_DHCPV4=y
# Enable Sockets (used by MQTT lib)
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
# Enable MQTT
CONFIG_MQTT... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 283 |
```yaml
sample:
name: Secure MQTT Sensor/Actuator Sample
tests:
sample.net.secure_mqtt_sensor_actuator:
harness: net
tags:
- net
- mqtt
- sensors
filter: dt_alias_exists("ambient-temp0")
integration_platforms:
- adi_eval_adin1110ebz
sample.net.secure_mqtt_sensor_actuator.st... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 223 |
```objective-c
/*
*
*/
#ifndef __MQTT_CLIENT_H__
#define __MQTT_CLIENT_H__
/** MQTT connection timeouts */
#define MSECS_NET_POLL_TIMEOUT 5000
#define MSECS_WAIT_RECONNECT 1000
/** MQTT connection status flag */
extern bool mqtt_connected;
/**
* @brief Initialise the MQTT client & broker configuration
*/
int a... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/src/mqtt_client.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 203 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(app_device, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/led.h>
#include <zephyr/random/random.h>
#include "device.h"
#define SENSOR_CHAN SENSOR_CHAN_AMBIENT_TEMP
#define SENSOR_UNIT ... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/src/device.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 787 |
```objective-c
/*
*
*/
#ifndef __DEVICE_H__
#define __DEVICE_H__
/** @brief Sensor sample structure */
struct sensor_sample {
const char *unit;
int value;
};
/** @brief Available board LEDs */
enum led_id {
LED_NET, /* Network status LED*/
LED_USER /* User LED */
};
/** @brief LED states */
enum led_state {
... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/src/device.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 213 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(app_main, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/net/mqtt.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_mgmt.h>
#include <zephyr/net/conn_mgr_monitor.h>
#include "mqtt_client.h"
#include "device.h"
#define NET_L4_EV... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 876 |
```objective-c
/*
*
*/
#ifndef __CERT_H__
#define __CERT_H__
/* The CA certficate of the MQTT broker should be included here
* The certificate can either be in DER or PEM format.
* A DER certificate can be converted to a byte array using
* "cat ca.crt | sed -e '1d;$d' | base64 -d |xxd -i"
* If using a PEM c... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/src/tls_config/cert.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 785 |
```unknown
/*
*
*/
&adin1110 {
mdio {
/* Enable link status LED */
ethernet-phy@1 {
led0-en;
led1-en;
};
};
};
``` | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/boards/adi_eval_adin1110ebz.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 47 |
```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
# Running gPTP sample using Docker testing
start_configuration || return $?
start_docker \
"/usr/local/sbin/ptp4l -2 -f /etc/gptp.cfg -m... | /content/code_sandbox/samples/net/gptp/docker-test.sh | shell | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 221 |
```unknown
CONFIG_NET_GPTP_NUM_PORTS=2
``` | /content/code_sandbox/samples/net/gptp/overlay-multiport.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(app_mqtt, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/mqtt.h>
#include <zephyr/data/json.h>
#include <zephyr/random/random.h>
#include "mqtt_client.h"
#include "device.h"
/* Buffers for MQTT client ... | /content/code_sandbox/samples/net/secure_mqtt_sensor_actuator/src/mqtt_client.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,383 |
```unknown
# Private config options for gPTP sample app
# This sample application will have three network interfaces.
# gPTP protocol will run in the non-VLAN interface and then there
# will be two VLAN interface for other use. This is just an example
# how to do this kind of setup. See also VLAN sample application
#... | /content/code_sandbox/samples/net/gptp/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 402 |
```restructuredtext
.. zephyr:code-sample:: gptp
:name: gPTP
:relevant-api: gptp ptp_time
Enable gPTP support and monitor functionality using net-shell.
Overview
********
The gPTP sample application for Zephyr will enable gPTP support, registers
gPTP phase discontinuity callback, enable traffic class suppor... | /content/code_sandbox/samples/net/gptp/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,815 |
```yaml
common:
harness: net
tags:
- net
- gptp
sample:
description: Test gPTP functionality
name: gPTP sample app
tests:
sample.net.gptp:
platform_allow:
- frdm_k64f
- sam_e70_xplained/same70q21
- native_posix
- native_posix/native/64
- native_sim
- native_sim/... | /content/code_sandbox/samples/net/gptp/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 164 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_LOG=y
CONFIG_LOG=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_STATISTICS_USER_API=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NET_PKT_RX_COUNT=32
CONFIG_NET_PKT_TX_COUNT=32
CONFIG_NET_BUF_RX_COUNT=3... | /content/code_sandbox/samples/net/gptp/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 383 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_gptp_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <errno.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_l2.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/ethernet.h>
#include <zephyr/net/gptp.h>
extern void i... | /content/code_sandbox/samples/net/gptp/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 308 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(net_gptp_sample);
#include <zephyr/kernel.h>
#include <errno.h>
#include <stdlib.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/gptp.h>
#include "ethernet/gptp/gptp_messages.h"
#include "ethernet/gptp/gptp_data_set.h"
static int run_durati... | /content/code_sandbox/samples/net/gptp/src/gptp.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 575 |
```unknown
# GMAC driver settings
CONFIG_PTP_CLOCK_SAM_GMAC=y
CONFIG_ETH_SAM_GMAC_MAC_I2C_EEPROM=y
``` | /content/code_sandbox/samples/net/gptp/boards/sam_e70_xplained_same70q21.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 31 |
```unknown
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::2"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.2"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.1"
CONFIG_ETH_NXP_ENET_RX_BUFFERS=6
CONFIG_ETH_NXP_ENET_TX_BUFFERS=4
CONFIG_NET_GPTP_STATISTICS=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG... | /content/code_sandbox/samples/net/gptp/boards/mimxrt1050_evk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 113 |
```unknown
CONFIG_NET_GPTP_NEIGHBOR_PROP_DELAY_THR=1000000
CONFIG_NET_GPTP_PROBE_CLOCK_SOURCE_ON_DEMAND=y
CONFIG_NET_GPTP_CLOCK_ACCURACY_25MS=y
#CONFIG_ETH_NXP_ENET_RX_BUFFERS=6
#CONFIG_ETH_NXP_ENET_TX_BUFFERS=8
CONFIG_NET_GPTP_STATISTICS=y
CONFIG_REQUIRES_FLOAT_PRINTF=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_NET_GPTP_INIT... | /content/code_sandbox/samples/net/gptp/boards/mimxrt1060_evk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 111 |
```unknown
# Settings for native_posix ethernet driver
CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK=y
#CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC=y
CONFIG_ETH_NATIVE_POSIX_MAC_ADDR="00:00:5e:00:53:2a"
# Assume 1 ms accuracy for native_posix simulated clock
CONFIG_NET_GPTP_CLOCK_ACCURACY_1MS=y
``` | /content/code_sandbox/samples/net/gptp/boards/native_sim.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 79 |
```unknown
CONFIG_USERSPACE=n
``` | /content/code_sandbox/samples/net/gptp/boards/qemu_x86.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 6 |
```unknown
# Settings for native_posix ethernet driver
CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK=y
#CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC=y
CONFIG_ETH_NATIVE_POSIX_MAC_ADDR="00:00:5e:00:53:2a"
# Assume 1 ms accuracy for native_posix simulated clock
CONFIG_NET_GPTP_CLOCK_ACCURACY_1MS=y
``` | /content/code_sandbox/samples/net/gptp/boards/native_posix.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 79 |
```unknown
/*
*
*/
&enet {
ptp {
status = "ok";
};
};
``` | /content/code_sandbox/samples/net/gptp/boards/frdm_k64f.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```unknown
CONFIG_NET_TC_TX_COUNT=3
CONFIG_NET_TC_RX_COUNT=2
``` | /content/code_sandbox/samples/net/gptp/boards/xmc45_relax_kit.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
CONFIG_PCIE=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_QEMU_ETHERNET=y
``` | /content/code_sandbox/samples/net/mqtt_sn_publisher/overlay-e1000.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 23 |
```unknown
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::2"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.2"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.1"
CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_CBPRINTF_FP_A_SUPPORT=y
CONFIG_CBPRINTF_FP_ALWAYS_A=y
CONFIG_NET_GPTP_NEIGHBOR_PROP_DELAY_THR... | /content/code_sandbox/samples/net/gptp/boards/frdm_k64f.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 105 |
```unknown
# Configuration options for MQTT-SN sample
mainmenu "MQTT-SN sample application"
config NET_SAMPLE_MQTT_SN_GATEWAY_IP
string "IP of the MQTT-SN gateway"
config NET_SAMPLE_MQTT_SN_GATEWAY_PORT
int "Port of the MQTT-SN gateway"
config NET_SAMPLE_MQTT_SN_BUFFER_SIZE
int "Size of the TX and RX buffers"
... | /content/code_sandbox/samples/net/mqtt_sn_publisher/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 94 |
```unknown
# Generic networking options
CONFIG_NETWORKING=y
CONFIG_NET_UDP=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_SOCKETS=y
CONFIG_POSIX_API=y
CONFIG_ZVFS_OPEN_MAX=6
CONFIG_NET_CONNECTION_MANAGER=y
# Kernel options
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_I... | /content/code_sandbox/samples/net/mqtt_sn_publisher/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 255 |
```yaml
sample:
description: MQTT-SN publisher sample application
name: MQTT-SN publisher
common:
harness: net
tags:
- net
- mqtt
tests:
sample.net.mqtt_publisher.sn:
platform_allow:
- frdm_k64f
- qemu_x86
- pinnacle_100_dvk
- mg100
- native_sim/native/64
integrat... | /content/code_sandbox/samples/net/mqtt_sn_publisher/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 99 |
```c
/*
*
*/
#include "common.h"
#include <errno.h>
#include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/net/mqtt_sn.h>
#include <zephyr/net/conn_mgr_monitor.h>
#include <zephyr/net/net_mgmt.h>
#include <zephyr/net/socket.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(mqtt_sn_publisher_sample, L... | /content/code_sandbox/samples/net/mqtt_sn_publisher/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 632 |
```restructuredtext
.. zephyr:code-sample:: mqtt-sn-publisher
:name: MQTT-SN publisher
:relevant-api: mqtt_sn_socket
Send MQTT-SN PUBLISH messages to an MQTT-SN gateway.
Overview
********
`MQTT <path_to_url`_ (MQ Telemetry Transport) is a lightweight
publish/subscribe messaging protocol optimized for small ... | /content/code_sandbox/samples/net/mqtt_sn_publisher/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,900 |
```objective-c
/*
*
*/
#define STACK_SIZE 2048
#if defined(CONFIG_USERSPACE)
#include <zephyr/app_memory/app_memdomain.h>
extern struct k_mem_partition app_partition;
extern struct k_mem_domain app_domain;
#define APP_BMEM K_APP_BMEM(app_partition)
#define APP_DMEM K_APP_DMEM(app_partition)
#else
#define APP_BMEM
#... | /content/code_sandbox/samples/net/mqtt_sn_publisher/src/common.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 131 |
```unknown
CONFIG_NATIVE_SIM_SLOWDOWN_TO_REAL_TIME=y
``` | /content/code_sandbox/samples/net/mqtt_sn_publisher/boards/native_sim.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 12 |
```unknown
# Configuration options for MQTT-SN sample
CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME=y
``` | /content/code_sandbox/samples/net/mqtt_sn_publisher/boards/native_posix.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```cmake
# Common routines used in net samples
``` | /content/code_sandbox/samples/net/common/common.cmake | cmake | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 10 |
```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
MSG_COUNT=5
start_configuration || return $?
# First IPv6
start_docker "/usr/local/bin/syslog-receiver.py 2001:db8::2" || return $?
star... | /content/code_sandbox/samples/net/syslog_net/docker-test.sh | shell | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 313 |
```unknown
CONFIG_LOG_BACKEND_NET_SERVER=""
CONFIG_LOG_BACKEND_NET_AUTOSTART=n
CONFIG_NET_SAMPLE_SERVER_RUNTIME="192.0.2.2:514"
``` | /content/code_sandbox/samples/net/syslog_net/overlay-runtime-srv-addr.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 32 |
```c
/*
*
*/
#include "common.h"
#include <errno.h>
#include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/net/mqtt_sn.h>
#include <zephyr/net/conn_mgr_monitor.h>
#include <zephyr/net/net_mgmt.h>
#include <zephyr/net/socket.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(mqtt_sn_publisher_sample);
s... | /content/code_sandbox/samples/net/mqtt_sn_publisher/src/udp.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,262 |
```restructuredtext
.. zephyr:code-sample:: syslog-net
:name: Remote syslog
:relevant-api: log_backend log_ctrl
Enable a remote syslog service that sends syslog messages to a remote server
Overview
********
This sample application enables a remote syslog service that will
send syslog messages to a remote se... | /content/code_sandbox/samples/net/syslog_net/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 328 |
```unknown
# Private config options for syslog-net sample app
mainmenu "Networking syslog sample application"
config NET_SAMPLE_SEND_ITERATIONS
int "Send sample data this many times"
default 0
help
Send sample data this many times before exiting. A value of
zero means that the defaults in the application ar... | /content/code_sandbox/samples/net/syslog_net/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 209 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_UDP=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_NET_PKT_RX_COUNT=32
CONFIG_NET_PKT_TX_COUNT=32
CONFIG_NET_BUF_RX_COUNT=32
CONFIG_NET_BUF_TX_COUNT=32
CONFIG_NET_SOCKETS=y
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
CONFIG_NET_IF_MCAST_IPV... | /content/code_sandbox/samples/net/syslog_net/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 309 |
```yaml
common:
harness: net
depends_on: netif
tags:
- net
- syslog
sample:
description: syslog network backend
name: syslog_net
tests:
sample.net.syslog.with_timefuncs:
filter: CONFIG_FULL_LIBC_SUPPORTED
extra_configs:
- CONFIG_REQUIRES_FULL_LIBC=y
sample.net.syslog.ipv4_only:
f... | /content/code_sandbox/samples/net/syslog_net/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 306 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_syslog, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/logging/log_backend.h>
#include <zephyr/logging/log_backend_net.h>
#include <zephyr/logging/log_ctrl.h>
#include <stdlib.h>
BUILD_ASSERT(IS_ENABLED(CONFIG_LOG_BACKEND_NET), "sy... | /content/code_sandbox/samples/net/syslog_net/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 550 |
```restructuredtext
.. zephyr:code-sample:: lldp
:name: Link Layer Discovery Protocol (LLDP)
:relevant-api: lldp net_l2
Enable LLDP support and setup VLANs.
Overview
********
The Link Layer Discovery Protocol sample application for Zephyr will enable
LLDP support and setup VLANs if needed.
The source code ... | /content/code_sandbox/samples/net/lldp/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 300 |
```unknown
# Private config options for LLDP sample app
# This sample application will have three network interfaces.
mainmenu "LLDP sample application"
source "Kconfig.zephyr"
if NET_LLDP
config NET_SAMPLE_IFACE2_MY_IPV6_ADDR
string "My IPv6 address for second interface"
help
The value depends on your netwo... | /content/code_sandbox/samples/net/lldp/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 288 |
```yaml
common:
harness: net
tags:
- net
- lldp
sample:
description: Test LLDP functionality
name: LLDP sample app
tests:
sample.net.lldp:
platform_allow:
- native_posix
- native_posix/native/64
- native_sim
- native_sim/native/64
integration_platforms:
- native_s... | /content/code_sandbox/samples/net/lldp/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 96 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_LOG=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_STATISTICS_USER_API=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NET_PKT_RX_COUNT=32
CONFIG_NET_PKT_TX_COUNT=32
CONFIG_NET_BUF_RX_COUNT=32
CONFIG_NET_... | /content/code_sandbox/samples/net/lldp/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 625 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_lldp_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <errno.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_l2.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/ethernet.h>
static struct lldp_system_name_tlv {
uint... | /content/code_sandbox/samples/net/lldp/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,397 |
```restructuredtext
.. zephyr:code-sample:: telnet-console
:name: Telnet console
:relevant-api: shell_api net_core net_if net_mgmt
Access Zephyr shell over telnet.
Overview
********
This application will setup IPv4/IPv6 addresses on the default
network interface. The telnet console service is started transp... | /content/code_sandbox/samples/net/telnet/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,123 |
```yaml
sample:
name: Telnet Server
tests:
sample.net.telnet:
harness: net
depends_on: netif
tags:
- net
- telnet
platform_exclude:
- native_posix
- native_posix/native/64
``` | /content/code_sandbox/samples/net/telnet/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 61 |
```unknown
CONFIG_PRINTK=y
CONFIG_NETWORKING=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_ARP=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=3
CONFIG_NET_MAX_CONTEXTS=10
CONFIG_NET_PKT_TX_COUNT=20
CONFIG_NET_BUF_TX_COUNT=50
CON... | /content/code_sandbox/samples/net/telnet/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 188 |
```unknown
/*
*
*/
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
``` | /content/code_sandbox/samples/net/wpan_serial/app.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 44 |
```restructuredtext
.. zephyr:code-sample:: wpan-serial
:name: 802.15.4 "serial-radio"
:relevant-api: ieee802154 uart_interface
Implement a slip-radio device for Contiki-based border routers.
Overview
********
The wpan_serial sample shows how to use hardware with 802.15.4 radio and USB
controller as a "seri... | /content/code_sandbox/samples/net/wpan_serial/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 627 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_telnet_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/linker/sections.h>
#include <errno.h>
#include <stdio.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_mgmt.h>
#if defined(CONF... | /content/code_sandbox/samples/net/telnet/src/telnet.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 952 |
```unknown
CONFIG_GPIO=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_NETWORKING=y
CONFIG_IEEE802154=y
CONFIG_IEEE802154_RAW_MODE=y
CONFIG_NET_PKT_RX_COUNT=6
CONFIG_NET_PKT_TX_COUNT=6
CONFIG_NET_BUF_DATA_SIZE=128
CONFI... | /content/code_sandbox/samples/net/wpan_serial/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 107 |
```yaml
sample:
description: Test wpan_serial sample
name: wpan_serial
common:
depends_on: usb_device
harness: net
tags: usb ieee802154
platform_exclude: pinnacle_100_dvk
tests:
sample.net.wpan.serial:
filter: dt_chosen_enabled("zephyr,ieee802154")
platform_exclude: thingy53/nrf5340/cpuapp/ns rayt... | /content/code_sandbox/samples/net/wpan_serial/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 162 |
```shell
#!/bin/sh
#
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Setup virtual lan (VLAN) in Linux side that would work with this sample.
if [ -z "$1" ]; then
echo "Network interface is mi... | /content/code_sandbox/samples/net/vlan/vlan-setup-linux.sh | shell | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 604 |
```restructuredtext
.. zephyr:code-sample:: vlan
:name: Virtual LAN
:relevant-api: vlan_api net_l2 net_if
Setup two virtual LAN networks and use net-shell to view the networks' settings.
Overview
********
The VLAN sample application for Zephyr will setup two virtual LAN networks.
The application sample enab... | /content/code_sandbox/samples/net/vlan/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 592 |
```unknown
# Private config options for VLAN sample app
mainmenu "Networking VLAN sample application"
config NET_SAMPLE_IFACE2_MY_IPV6_ADDR
string "My IPv6 address for second interface"
help
The value depends on your network setup.
config NET_SAMPLE_IFACE2_MY_IPV4_ADDR
string "My IPv4 address for second inter... | /content/code_sandbox/samples/net/vlan/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 338 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_LOG=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_STATISTICS=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NET_PKT_RX_COUNT=32
CONFIG_NET_PKT_TX_COUNT=32
CONFIG_NET_BUF_RX_COUNT=32
CONFIG_NET_BUF_TX_COUNT=32
CONFIG_NET_IF_UNI... | /content/code_sandbox/samples/net/vlan/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 504 |
```yaml
common:
harness: net
tags:
- net
- vlan
sample:
description: Test VLAN functionality
name: VLAN sample app
tests:
sample.net.vlan:
depends_on: eth
``` | /content/code_sandbox/samples/net/vlan/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 49 |
```c
/*
*
*/
/**
* @file
* @brief App implementing 802.15.4 "serial-radio" protocol
*
* Application implementing 802.15.4 "serial-radio" protocol compatible
* with popular Contiki-based native border routers.
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(wpan_serial, CONFIG_USB_DEVICE_LOG_LEVEL);
#i... | /content/code_sandbox/samples/net/wpan_serial/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,495 |
```restructuredtext
.. zephyr:code-sample:: dsa
:name: DSA (Distributed Switch Architecture)
:relevant-api: DSA
Test and debug Distributed Switch Architecture
Overview
********
Example on testing/debugging Distributed Switch Architecture
The source code for this sample application can be found at:
:zephyr_... | /content/code_sandbox/samples/net/dsa/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 169 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_vlan_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <errno.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_l2.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/ethernet.h>
struct ud {
struct net_if *first;
struct... | /content/code_sandbox/samples/net/vlan/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 884 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_LOG=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_STATISTICS_USER_API=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NET_PKT_RX_COUNT=64
CONFIG_NET_PKT_TX_COUNT=64
CONFIG_NET_BUF_RX_COUNT=64
CONFIG_NET_... | /content/code_sandbox/samples/net/dsa/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 451 |
```yaml
sample:
description: Test DSA functionality
name: DSA sample app
common:
harness: net
tags:
- net
- dsa
tests:
sample.net.dsa:
build_only: true
platform_allow: ip_k66f
depends_on: eth
``` | /content/code_sandbox/samples/net/dsa/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 67 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_dsa_lldp_sample, CONFIG_NET_DSA_LOG_LEVEL);
#include <zephyr/net/dsa.h>
#include "main.h"
static void iface_cb(struct net_if *iface, void *user_data)
{
struct ud *ifaces = user_data;
if (net_if_l2(iface) != &NET_L2_GET_NAME(ETHERNET)) {
ret... | /content/code_sandbox/samples/net/dsa/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 862 |
```objective-c
/*
*
*/
#ifndef __DSA_SAMPLE__
#define __DSA_SAMPLE__
#include <zephyr/kernel.h>
#include <errno.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_l2.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/ethernet.h>
#define MCAST_DEST_MAC0 0x01
#define MCA... | /content/code_sandbox/samples/net/dsa/src/main.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 911 |
```unknown
/*
*
*/
&enet_mac {
local-mac-address = [00 00 12 13 00 10];
};
&lan3 {
local-mac-address = [00 00 12 13 00 37];
};
&lan2 {
local-mac-address = [00 00 12 13 00 27];
};
&lan1 {
local-mac-address = [00 00 12 13 00 17];
};
``` | /content/code_sandbox/samples/net/dsa/boards/ip_k66f.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 96 |
```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/zperf/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
``` | /content/code_sandbox/samples/net/zperf/overlay-netusb.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 35 |
```unknown
/*
*
*/
/ {
cdc_ecm_eth0: cdc_ecm_eth0 {
compatible = "zephyr,cdc-ecm-ethernet";
remote-mac-address = "00005E005301";
};
};
``` | /content/code_sandbox/samples/net/zperf/usbd_next_ecm.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 54 |
```c
/*
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_l2.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/ethernet.h>
#include <zephyr/net/lldp.h>
#include <errno.h>
#incl... | /content/code_sandbox/samples/net/dsa/src/dsa_lldp.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,594 |
```restructuredtext
.. zephyr:code-sample:: zperf
:name: zperf: Network Traffic Generator
:relevant-api: net_config
Use the zperf shell utility to evaluate network bandwidth.
Description
***********
The zperf sample demonstrates the :ref:`zperf shell utility <zperf>`, which
allows to evaluate network bandwi... | /content/code_sandbox/samples/net/zperf/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 389 |
```unknown
CONFIG_NET_DRIVERS=y
CONFIG_NET_LOOPBACK=y
CONFIG_NET_LOOPBACK_MTU=1100
# Enable for testing TX only
CONFIG_NET_LOOPBACK_SIMULATE_PACKET_DROP=y
CONFIG_NET_BUF_DATA_SIZE=1100
# Optimized networking settings for performance
CONFIG_NET_PKT_RX_COUNT=32
CONFIG_NET_PKT_TX_COUNT=48
CONFIG_NET_BUF_RX_COUNT=32
CONFI... | /content/code_sandbox/samples/net/zperf/overlay-loopback.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 89 |
```unknown
CONFIG_USB_DEVICE_STACK_NEXT=y
CONFIG_LOG=y
CONFIG_USBD_LOG_LEVEL_WRN=y
CONFIG_UDC_DRIVER_LOG_LEVEL_WRN=y
``` | /content/code_sandbox/samples/net/zperf/overlay-usbd_next_ecm.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 31 |
```unknown
source "Kconfig.zephyr"
config NET_SAMPLE_CODE_RELOCATE
bool "Relocate networking code into RAM"
select CODE_DATA_RELOCATION
help
Relocate networking code into RAM when running the zperf
sample. Can improve performance on platforms with fast code
RAM.
if NET_SAMPLE_CODE_RELOCATE
config NET_SA... | /content/code_sandbox/samples/net/zperf/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 108 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_ZPERF=y
CONFIG_NET_LOG=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_TCP_IPV6_ND_REACHABILITY_HINT=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_PKT_RX_COUNT=40
CONFIG_NET_PKT_TX_COUNT=40
CONFIG_NET_BUF_RX_COUNT=160
CONFIG_NET_BU... | /content/code_sandbox/samples/net/zperf/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 325 |
```c
/*
*
*/
/**
* @file
* @brief Zperf sample.
*/
#include <zephyr/usb/usb_device.h>
#include <zephyr/net/net_config.h>
#ifdef CONFIG_NET_LOOPBACK_SIMULATE_PACKET_DROP
#include <zephyr/net/loopback.h>
#endif
int main(void)
{
#if defined(CONFIG_USB_DEVICE_STACK)
int ret;
ret = usb_enable(NULL);
if (ret != 0)... | /content/code_sandbox/samples/net/zperf/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 181 |
```unknown
# Note: HW accleration does not support IPV6
CONFIG_ETH_NXP_ENET_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"
``` | /content/code_sandbox/samples/net/zperf/boards/mimxrt1050_evk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 45 |
```unknown
# Note: HW accleration does not support IPV6
CONFIG_ETH_NXP_ENET_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"
``` | /content/code_sandbox/samples/net/zperf/boards/mimxrt1060_evk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 45 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.