/Zephyr-latest/doc/kernel/data_structures/ |
D | mpsc_pbuf.rst | 3 Multi Producer Single Consumer Packet Buffer 6 A :dfn:`Multi Producer Single Consumer Packet Buffer (MPSC_PBUF)` is a circular 8 packets are stored in the buffer. Packet buffer works under assumption that there 11 Packet is produced in two steps: first requested amount of data is allocated, 12 producer fills the data and commits it. Consuming a packet is also performed in 13 two steps: consumer claims the packet, gets pointer to it and length and later 14 on packet is freed. This approach reduces memory copying. 16 A :dfn:`MPSC Packet Buffer` has the following key properties: 18 * Allocate, commit scheme used for packet producing. 19 * Claim, free scheme used for packet consuming. [all …]
|
/Zephyr-latest/samples/drivers/peci/src/ |
D | main.c | 38 struct peci_msg packet; in peci_ping() local 42 packet.addr = PECI_HOST_ADDR; in peci_ping() 43 packet.cmd_code = PECI_CMD_PING; in peci_ping() 44 packet.tx_buffer.buf = NULL; in peci_ping() 45 packet.tx_buffer.len = PECI_PING_WR_LEN; in peci_ping() 46 packet.rx_buffer.buf = NULL; in peci_ping() 47 packet.rx_buffer.len = PECI_PING_RD_LEN; in peci_ping() 49 ret = peci_transfer(peci_dev, &packet); in peci_ping() 63 struct peci_msg packet; in peci_get_tjmax() local 72 packet.tx_buffer.buf = peci_req_buf; in peci_get_tjmax() [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | mpsc_pbuf.h | 20 * @brief Multi producer, single consumer packet buffer API 21 * @defgroup mpsc_buf MPSC (Multi producer, single consumer) packet buffer API 27 * Multi producer, single consumer packet buffer allows to allocate variable 28 * length consecutive space for storing a packet. When space is allocated 29 * it can be filled by the user (except for the first 2 bits) and when packet 30 * is ready it is committed. It is allowed to allocate another packet before 33 * If buffer is full and packet cannot be allocated then null is returned unless 37 * packet is dropped and claimed packet is marked as invalid when freeing. 39 * Reading packets is performed in two steps. First packet is claimed. Claiming 40 * returns pointer to the packet within the buffer. Packet is freed when no [all …]
|
D | spsc_pbuf.h | 18 * @brief Single producer, single consumer packet buffer API 19 * @defgroup spsc_buf SPSC (Single producer, single consumer) packet buffer API 24 /**@defgroup SPSC_PBUF_FLAGS SPSC packet buffer flags 30 * It shall be used only when packet buffer is shared between two cores as on a single 56 /** @brief Maximum packet length. */ 59 /** @brief First part of packet buffer control block. 62 * by the reader. If packet is shared between to cores then data changed by 76 /** @brief Remaining part of a packet buffer when cache is used. 87 /** @brief Remaining part of a packet buffer when cache is not used. */ 94 * @brief Single producer, single consumer packet buffer [all …]
|
D | mpsc_packet.h | 18 * @brief Multi producer, single consumer packet header 19 * @defgroup mpsc_packet MPSC (Multi producer, single consumer) packet header 27 /** @brief Header that must be added to the first word in each packet. 29 * This fields are controlled by the packet buffer and unless specified must 30 * not be used. Fields must be added at the top of the packet header structure. 36 /** @brief Generic packet header. */ 42 /** @brief Skip packet used internally by the packet buffer. */ 48 /** @brief Generic packet header. */
|
/Zephyr-latest/subsys/net/pkt_filter/ |
D | Kconfig | 1 # Packet filtering config 5 menu "Network Packet Filtering" 8 bool "Network packet filtering" 10 The Network Packet Filtering facility provides the infrastructure 11 to construct custom rules for accepting and/or denying packet 17 bool "Additional network packet filtering hook inside IPv4 stack" 21 rules on the IP packet. 24 bool "Additional network packet filtering hook inside IPv6 stack" 28 rules on the IP packet. 31 bool "Additional network packet filtering hook for connection input" [all …]
|
/Zephyr-latest/samples/net/sockets/packet/ |
D | README.rst | 1 .. zephyr:code-sample:: packet-socket 2 :name: Packet socket 5 Use raw packet sockets over Ethernet. 10 This sample is a simple packet socket application showing usage 11 of packet sockets over Ethernet. The sample prints every packet 12 received, and sends a dummy packet every 5 seconds. 19 When the application is run, it opens a packet socket and prints 20 the length of the packet it receives. After that it sends a dummy 21 packet every 5 seconds. You can use Wireshark to observe these
|
D | sample.yaml | 2 description: Packet socket sample 3 name: packet-socket 5 sample.net.sockets.packet: 15 - packet-socket
|
/Zephyr-latest/doc/connectivity/networking/ |
D | net_pkt_processing_stats.rst | 3 Network Packet Processing Statistics 10 This page describes how to get information about network packet processing 13 Network stack contains infrastructure to figure out how long the network packet 18 network packet statistics is collected. For RX, only UDP, TCP or raw packet 19 type network packet statistics is collected. 33 The TX time tells how long it took for network packet from its creation to 42 information for TX or RX network packets are collected when the network packet 54 took for a network packet to go from previous state to next. 59 * Packet was created by application so the time is **0**. 60 * Packet is about to be placed to transmit queue. The time it took from network [all …]
|
D | net-stack-architecture.rst | 88 1. A network data packet is received by a device driver. 91 data. The network packet is placed in the proper RX queue (implemented by 100 3. The network packet is then passed to the correct L2 driver. The L2 driver 101 can check if the packet is proper and modify it if needed, e.g. strip L2 104 4. The packet is processed by a network interface. The network statistics are 107 5. The packet is then passed to L3 processing. If the packet is IP based, 108 then the L3 layer checks if the packet is a proper IPv6 or IPv4 packet. 110 6. A socket handler then finds an active socket to which the network packet 140 4. An IP header is added to the network packet for a UDP or TCP packet. 143 for the network packet, and also will make sure that the network interface [all …]
|
/Zephyr-latest/subsys/net/lib/mqtt/ |
D | mqtt.c | 76 struct buf_ctx packet; in client_connect() local 83 tx_buf_init(client, &packet); in client_connect() 86 err_code = connect_request_encode(client, &packet); in client_connect() 92 err_code = mqtt_transport_write(client, packet.cur, in client_connect() 93 packet.end - packet.cur); in client_connect() 243 struct buf_ctx packet; in mqtt_publish() local 257 tx_buf_init(client, &packet); in mqtt_publish() 264 err_code = publish_encode(param, &packet); in mqtt_publish() 269 io_vector[0].iov_base = packet.cur; in mqtt_publish() 270 io_vector[0].iov_len = packet.end - packet.cur; in mqtt_publish() [all …]
|
/Zephyr-latest/drivers/bluetooth/hci/ |
D | apollox_blue.h | 20 * @brief SPI transceive function for Bluetooth packet. 22 * @param tx Pointer of transmission packet. 23 * @param tx_len Length of transmission packet. 24 * @param rx Pointer of reception packet. 25 * @param rx_len Length of reception packet. 35 * @param data Pointer of transmission packet. 36 * @param len Length of transmission packet. 55 * @param data Pointer of transmission packet. 56 * @param len Length of transmission packet. 57 * @param transceive SPI transceive function for Bluetooth packet. [all …]
|
/Zephyr-latest/include/zephyr/logging/ |
D | log_frontend_stmesp_demux.h | 74 /** @brief Generic STP demux packet. */ 76 /** Data for MPSC packet handling. */ 82 /** Flag indicating if packet is valid. */ 86 /** @brief Packet with logging message. */ 88 /** Data for MPSC packet handling. */ 94 /** Flag indicating if packet is valid. */ 110 /** @brief Packet with trace point. */ 112 /** Data for MPSC packet handling. */ 118 /** Flag indicating if packet is valid. */ 140 /** @brief Packet with HW event. */ [all …]
|
/Zephyr-latest/subsys/mgmt/mcumgr/transport/include/mgmt/mcumgr/transport/ |
D | smp_reassembly.h | 32 * Note: Currently the function is not able to concatenate buffers so re-assembled packet needs 43 * @return number of expected bytes left to complete the packet, 0 means buffer is complete 45 * -ENOSR if a packet length, read from header, is bigger than 48 * -EOVERFLOW if attempting to add a fragment that would make complete packet larger 50 * -ENOMEM if failed to allocate a new buffer for packet assembly; 52 * of the packet; MTU is set too low; 57 * Return number of expected bytes to complete the packet 64 * @return number of bytes needed to complete the packet; 65 * -EINVAL if there is no packet in re-assembly; 70 * Pass packet for further processing [all …]
|
/Zephyr-latest/lib/os/ |
D | Kconfig | 32 bool "Multi producer, single consumer packet buffer" 35 Enable usage of mpsc packet buffer. Packet buffer is capable of 40 bool "Single producer, single consumer packet buffer" 42 Enable usage of spsc packet buffer. Packet buffer is capable of 64 be used only if all packet buffer instances are used for data sharing 87 If a packet buffer is used for data sharing between two cores then 98 determine the size of the packet buffer. 104 bool "Clear allocated packet" 106 When enabled packet space is zeroed before returning from allocation.
|
/Zephyr-latest/subsys/net/ip/ |
D | packet_socket.h | 2 * @brief Packet Socket related functions 19 * @brief Called by net_core.c when a network packet is received. 21 * @param pkt Network packet 23 * @return NET_OK if the packet was consumed, NET_DROP if 24 * the packet parsing failed and the caller should handle 25 * the received packet. If corresponding IP protocol support is
|
D | canbus_socket.h | 19 * @brief Called by net_core.c when a CANBUS packet is received. 21 * @param pkt Network packet 23 * @return NET_OK if the packet was consumed, NET_DROP if 24 * the packet parsing failed and the caller should handle 25 * the received packet.
|
/Zephyr-latest/include/zephyr/net/ |
D | capture.h | 2 * @brief Network packet capture definitions 24 * @brief Network packet capture support functions 25 * @defgroup net_capture Network packet capture 61 * @brief Setup network packet capturing support. 73 * @return 0 if ok, <0 if network packet capture setup failed 79 * @brief Cleanup network packet capturing support. 87 * @return 0 if ok, <0 if network packet capture cleanup failed 104 * @brief Enable network packet capturing support. 113 * @return 0 if ok, <0 if network packet capture enable failed 131 * @brief Is network packet capture enabled or disabled. [all …]
|
D | net_pkt_filter.h | 2 * @brief Network packet filtering public header file 4 * The network packet filtering provides a mechanism for deciding the fate 5 * of an incoming or outgoing packet based on a set of basic rules. 28 * @brief Network Packet Filter API 29 * @defgroup net_pkt_filter Network Packet Filter API 46 npf_test_fn_t *fn; /**< packet condition test function */ 57 /** @brief Default rule list termination for accepting a packet */ 59 /** @brief Default rule list termination for rejecting a packet */ 148 * @brief Statically define one packet filter rule 152 * network packet path. [all …]
|
D | coap.h | 38 * @brief Set of CoAP packet options we are aware of. 42 * that all options must be added to a packet in numeric order. 103 * The packet is a request or response the destination end-point must 110 * The packet is a request or response that doesn't 123 * Rejecting a packet for any reason is done by sending a message 138 * @brief Set of response codes available for a response packet. 310 * @brief Representation of a CoAP Packet. 315 uint16_t max_len; /**< Max CoAP packet data length */ 318 uint16_t delta; /**< Used for delta calculation in CoAP packet */ 382 uint16_t len; /**< Length of the CoAP packet */ [all …]
|
/Zephyr-latest/tests/lib/mpsc_pbuf/src/ |
D | concurrent.c | 115 static void test_fail(int line, struct test_packet *packet) in test_fail() argument 119 test_failed_cnt = packet->data; in test_fail() 120 test_failed_ctx = packet->ctx; in test_fail() 125 static void consume_check(struct test_packet *packet) in consume_check() argument 127 bool res = track_consume(packet->ctx, packet->data); in consume_check() 130 test_fail(__LINE__, packet); in consume_check() 134 for (int i = 0; i < packet->len - 1; i++) { in consume_check() 135 if (packet->buf[i] != packet->data + i) { in consume_check() 136 test_fail(__LINE__, packet); in consume_check() 143 struct test_packet *packet = (struct test_packet *)item; in drop() local [all …]
|
/Zephyr-latest/tests/subsys/logging/log_frontend_stmesp_demux/src/ |
D | main.c | 40 union log_frontend_stmesp_demux_packet packet = log_frontend_stmesp_demux_claim(); in claim_packet() local 42 if (packet.generic == NULL) { in claim_packet() 43 zassert_equal(exp_len, 0, "%d: Expected a packet", line); in claim_packet() 47 zassert_equal(packet.generic_packet->type, LOG_FRONTEND_STMESP_DEMUX_TYPE_LOG); in claim_packet() 48 zassert_equal(exp_ts, packet.log->timestamp, "%d: Unexpected ts %llu/%x (exp:%llu/%x)", in claim_packet() 49 line, packet.log->timestamp, packet.log->timestamp, exp_ts, exp_ts); in claim_packet() 50 zassert_equal(exp_m_idx, ids[packet.log->hdr.major], "%d: Unexpected major:%d (exp:%d)", in claim_packet() 51 line, packet.log->hdr.major, exp_m_idx); in claim_packet() 52 zassert_equal(exp_len, packet.log->hdr.total_len, "%d: Unexpected len:%d (exp:%d)", line, in claim_packet() 53 packet.log->hdr.total_len, exp_len); in claim_packet() [all …]
|
/Zephyr-latest/tests/net/net_pkt/ |
D | testcase.yaml | 6 net.packet: 9 net.packet.preempt: 12 net.packet.large_buffer: 16 net.packet.allocation_stats:
|
/Zephyr-latest/subsys/net/lib/capture/ |
D | sll.h | 20 uint16_t sll_pkttype; /* Packet type */ 36 uint8_t sll2_pkttype; /* Packet type */ 43 #define SLL_HOST 0 /* packet was sent to us by somebody else */ 44 #define SLL_BROADCAST 1 /* packet was broadcast by somebody else */ 45 #define SLL_MULTICAST 2 /* packet was multicast, but not broadcast, by somebody else */ 46 #define SLL_OTHERHOST 3 /* packet was sent by somebody else to somebody else */ 47 #define SLL_OUTGOING 4 /* packet was sent by us */
|
/Zephyr-latest/include/zephyr/drivers/console/ |
D | uart_mcumgr.h | 33 * @brief Function that gets called when an mcumgr packet is received. 35 * Function that gets called when an mcumgr packet is received. This function 39 * @param rx_buf A buffer containing the incoming mcumgr packet. 44 * @brief Sends an mcumgr packet over UART. 46 * @param data Buffer containing the mcumgr packet to send. 64 * mcumgr request packet is received. 67 * packet is received.
|