Home
last modified time | relevance | path

Searched refs:proto (Results 1 – 25 of 132) sorted by relevance

123456

/Zephyr-latest/subsys/net/l2/ppp/
Dlink.c21 STRUCT_SECTION_FOREACH(ppp_protocol_handler, proto) { in lcp_up()
22 if (proto->protocol == PPP_LCP) { in lcp_up()
26 if (proto->lower_up) { in lcp_up()
27 proto->lower_up(ctx); in lcp_up()
36 STRUCT_SECTION_FOREACH(ppp_protocol_handler, proto) { in do_network()
37 if (proto->protocol == PPP_CCP || proto->protocol == PPP_ECP) { in do_network()
38 if (proto->open) { in do_network()
39 proto->open(ctx); in do_network()
49 STRUCT_SECTION_FOREACH(ppp_protocol_handler, proto) { in do_network()
50 if (proto->protocol == PPP_CCP || proto->protocol == PPP_ECP || in do_network()
[all …]
Dnetwork.c19 void ppp_network_up(struct ppp_context *ctx, int proto) in ppp_network_up() argument
27 NET_DBG("[%p] Proto %s (0x%04x) %s (%d)", ctx, ppp_proto2str(proto), in ppp_network_up()
28 proto, "up", ctx->network_protos_up); in ppp_network_up()
31 void ppp_network_down(struct ppp_context *ctx, int proto) in ppp_network_down() argument
40 NET_DBG("[%p] Proto %s (0x%04x) %s (%d)", ctx, ppp_proto2str(proto), in ppp_network_down()
41 proto, "down", ctx->network_protos_up); in ppp_network_down()
44 void ppp_network_done(struct ppp_context *ctx, int proto) in ppp_network_done() argument
58 STRUCT_SECTION_FOREACH(ppp_protocol_handler, proto) { in ppp_network_all_down()
59 if (proto->protocol != PPP_LCP && proto->lower_down) { in ppp_network_all_down()
60 proto->lower_down(ctx); in ppp_network_all_down()
[all …]
/Zephyr-latest/tests/net/socket/register/src/
Dmain.c21 int proto; member
33 .test_case.proto = IPPROTO_UDP,
40 .test_case.proto = IPPROTO_UDP,
48 .test_case.proto = 0,
56 .test_case.proto = 0,
63 .test_case.proto = 0,
70 .test_case.proto = IPPROTO_UDP,
77 .test_case.proto = IPPROTO_UDP,
84 .test_case.proto = IPPROTO_UDP,
91 .test_case.proto = IPPROTO_UDP,
[all …]
/Zephyr-latest/drivers/firmware/scmi/
Dcore.c90 static int scmi_send_message_pre_kernel(struct scmi_protocol *proto, in scmi_send_message_pre_kernel() argument
96 ret = scmi_transport_send_message(proto->transport, proto->tx, msg); in scmi_send_message_pre_kernel()
108 while (!scmi_transport_channel_is_free(proto->transport, proto->tx)) { in scmi_send_message_pre_kernel()
111 ret = scmi_transport_read_message(proto->transport, proto->tx, reply); in scmi_send_message_pre_kernel()
119 static int scmi_send_message_post_kernel(struct scmi_protocol *proto, in scmi_send_message_post_kernel() argument
125 if (!proto->tx) { in scmi_send_message_post_kernel()
130 ret = k_mutex_lock(&proto->tx->lock, K_USEC(SCMI_CHAN_LOCK_TIMEOUT_USEC)); in scmi_send_message_post_kernel()
136 ret = scmi_transport_send_message(proto->transport, proto->tx, msg); in scmi_send_message_post_kernel()
143 ret = k_sem_take(&proto->tx->sem, K_USEC(SCMI_CHAN_SEM_TIMEOUT_USEC)); in scmi_send_message_post_kernel()
149 ret = scmi_transport_read_message(proto->transport, proto->tx, reply); in scmi_send_message_post_kernel()
[all …]
Dclk.c25 int scmi_clock_rate_get(struct scmi_protocol *proto, in scmi_clock_rate_get() argument
33 if (!proto || !rate) { in scmi_clock_rate_get()
37 if (proto->id != SCMI_PROTOCOL_CLOCK) { in scmi_clock_rate_get()
42 SCMI_COMMAND, proto->id, 0x0); in scmi_clock_rate_get()
50 ret = scmi_send_message(proto, &msg, &reply); in scmi_clock_rate_get()
64 int scmi_clock_config_set(struct scmi_protocol *proto, in scmi_clock_config_set() argument
71 if (!proto || !cfg) { in scmi_clock_config_set()
75 if (proto->id != SCMI_PROTOCOL_CLOCK) { in scmi_clock_config_set()
95 SCMI_COMMAND, proto->id, 0x0); in scmi_clock_config_set()
103 ret = scmi_send_message(proto, &msg, &reply); in scmi_clock_config_set()
[all …]
Dmailbox.h25 #define _SCMI_MBOX_CHAN_NAME(proto, idx)\ argument
26 CONCAT(SCMI_TRANSPORT_CHAN_NAME(proto, idx), _, priv)
35 #define _SCMI_MBOX_CHAN_DEFINE_PRIV_TX(node_id, proto) \ argument
36 static struct scmi_mbox_channel _SCMI_MBOX_CHAN_NAME(proto, 0) =\
49 #define _SCMI_MBOX_CHAN_DEFINE(node_id, proto, idx) \ argument
50 _SCMI_MBOX_CHAN_DEFINE_PRIV_TX(node_id, proto); \
51 DT_SCMI_TRANSPORT_CHAN_DEFINE(node_id, idx, proto, \
52 &(_SCMI_MBOX_CHAN_NAME(proto, idx))); \
58 #define _SCMI_MBOX_CHAN_DEFINE_OPTIONAL(node_id, proto, idx) \ argument
60 (_SCMI_MBOX_CHAN_DEFINE(node_id, proto, idx)), \
Dpinctrl.c13 struct scmi_protocol *proto; in scmi_pinctrl_settings_configure() local
18 proto = &SCMI_PROTOCOL_NAME(SCMI_PROTOCOL_PINCTRL); in scmi_pinctrl_settings_configure()
25 if (!proto) { in scmi_pinctrl_settings_configure()
29 if (proto->id != SCMI_PROTOCOL_PINCTRL) { in scmi_pinctrl_settings_configure()
44 SCMI_COMMAND, proto->id, 0x0); in scmi_pinctrl_settings_configure()
53 ret = scmi_send_message(proto, &msg, &reply); in scmi_pinctrl_settings_configure()
/Zephyr-latest/drivers/clock_control/
Dclock_control_arm_scmi.c23 struct scmi_protocol *proto; in scmi_clock_on_off() local
27 proto = dev->data; in scmi_clock_on_off()
28 data = proto->data; in scmi_clock_on_off()
40 return scmi_clock_config_set(proto, &cfg); in scmi_clock_on_off()
57 struct scmi_protocol *proto; in scmi_clock_get_rate() local
60 proto = dev->data; in scmi_clock_get_rate()
61 data = proto->data; in scmi_clock_get_rate()
68 return scmi_clock_rate_get(proto, clk_id, rate); in scmi_clock_get_rate()
79 struct scmi_protocol *proto; in scmi_clock_init() local
84 proto = dev->data; in scmi_clock_init()
[all …]
/Zephyr-latest/include/zephyr/drivers/firmware/scmi/
Dutil.h29 #define SCMI_PROTOCOL_NAME(proto) CONCAT(scmi_protocol_, proto) argument
53 #define SCMI_TRANSPORT_CHAN_NAME(proto, idx) CONCAT(scmi_channel_, proto, _, idx) argument
128 #define DT_SCMI_TRANSPORT_CHAN_DEFINE(node_id, idx, proto, pdata) \ argument
129 struct scmi_channel SCMI_TRANSPORT_CHAN_NAME(proto, idx) = \
149 #define DT_SCMI_PROTOCOL_DATA_DEFINE(node_id, proto, pdata) \ argument
150 STRUCT_SECTION_ITERABLE(scmi_protocol, SCMI_PROTOCOL_NAME(proto)) = \
152 .id = proto, \
161 #define DT_SCMI_PROTOCOL_DATA_DEFINE(node_id, proto, pdata) \ argument
162 STRUCT_SECTION_ITERABLE(scmi_protocol, SCMI_PROTOCOL_NAME(proto)) = \
164 .id = proto, \
Dclk.h68 int scmi_clock_protocol_attributes(struct scmi_protocol *proto,
81 int scmi_clock_config_set(struct scmi_protocol *proto,
93 int scmi_clock_rate_get(struct scmi_protocol *proto,
Dprotocol.h31 #define SCMI_MESSAGE_HDR_MAKE(id, type, proto, token) \ argument
34 SCMI_FIELD_MAKE(proto, GENMASK(7, 0), 10) | \
119 int scmi_send_message(struct scmi_protocol *proto,
/Zephyr-latest/tests/modules/nanopb/
DCMakeLists.txt11 zephyr_nanopb_sources(app proto/simple.proto)
14 proto/complex.proto
15 proto/sub/nested.proto
/Zephyr-latest/samples/net/promiscuous_mode/src/
Dmain.c66 const char *proto; in print_info() local
87 next_hdr = NET_IPV4_HDR(pkt)->proto; in print_info()
102 proto = "TCP"; in print_info()
106 proto = "UDP"; in print_info()
111 proto = "ICMP"; in print_info()
114 proto = "<unknown>"; in print_info()
133 "IPv4", proto, len, in print_info()
137 LOG_INF("%s %s (%zd) %s -> %s", "IPv4", proto, in print_info()
144 "IPv6", proto, len, in print_info()
148 LOG_INF("%s %s (%zd) %s -> %s", "IPv6", proto, in print_info()
/Zephyr-latest/subsys/net/ip/
Dconnection.c108 conn, conn->proto, conn->family, conn->flags, in conn_register_debug()
158 uint16_t proto, uint8_t family, in conn_find_handler() argument
171 if (conn->proto != proto) { in conn_find_handler()
328 int net_conn_register(uint16_t proto, uint8_t family, in net_conn_register() argument
343 proto, family, remote_addr, local_addr, in net_conn_register()
410 conn->proto = proto; in net_conn_register()
582 struct net_conn *conn, uint8_t proto) in conn_raw_socket() argument
586 if (proto == ETH_P_ALL) { in conn_raw_socket()
598 conn->proto != ETH_P_ALL && in conn_raw_socket()
599 conn->proto != net_pkt_ll_proto_type(pkt)) { in conn_raw_socket()
[all …]
Dconnection.h75 uint16_t proto; member
106 int net_conn_register(uint16_t proto, uint8_t family,
116 static inline int net_conn_register(uint16_t proto, uint8_t family, in net_conn_register() argument
126 ARG_UNUSED(proto); in net_conn_register()
191 uint8_t proto,
196 uint8_t proto, in net_conn_input() argument
Dpacket_socket.h29 enum net_verdict net_packet_socket_input(struct net_pkt *pkt, uint8_t proto);
32 uint8_t proto) in net_packet_socket_input() argument
/Zephyr-latest/subsys/net/lib/sockets/
Dsocket_dispatcher.c19 int proto; member
28 static int sock_dispatch_create(int family, int type, int proto);
30 static bool is_tls(int proto) in is_tls() argument
32 if ((proto >= IPPROTO_TLS_1_0 && proto <= IPPROTO_TLS_1_2) || in is_tls()
33 (proto >= IPPROTO_DTLS_1_0 && proto <= IPPROTO_DTLS_1_2)) { in is_tls()
57 new_fd = socket_create(ctx->family, ctx->type, ctx->proto); in sock_dispatch_socket()
83 int proto, bool native_only) in sock_dispatch_find() argument
102 if (!sock_family->is_supported(family, type, proto)) { in sock_dispatch_find()
117 ctx->proto, true); in sock_dispatch_native()
131 ctx->proto, false); in sock_dispatch_default()
[all …]
Dsockets_packet.c43 static int zpacket_socket(int family, int type, int proto) in zpacket_socket() argument
54 if (proto == 0) { in zpacket_socket()
56 proto = IPPROTO_RAW; in zpacket_socket()
65 proto = ntohs(proto); in zpacket_socket()
68 ret = net_context_get(family, type, proto, &ctx); in zpacket_socket()
488 static bool packet_is_supported(int family, int type, int proto) in packet_is_supported() argument
492 proto = ntohs(proto); in packet_is_supported()
493 return proto == ETH_P_ALL in packet_is_supported()
494 || proto == ETH_P_ECAT in packet_is_supported()
495 || proto == ETH_P_IEEE802154 in packet_is_supported()
[all …]
/Zephyr-latest/subsys/net/lib/zperf/
Dzperf_session.c24 enum session_proto proto) in get_session() argument
32 if (proto != SESSION_TCP && proto != SESSION_UDP) { in get_session()
39 struct session *ptr = &sessions[proto][i]; in get_session()
105 void zperf_session_reset(enum session_proto proto) in zperf_session_reset() argument
109 if (proto >= SESSION_PROTO_END) { in zperf_session_reset()
113 i = (int)proto; in zperf_session_reset()
/Zephyr-latest/subsys/net/lib/dns/
Ddns_sd.c85 + DNS_LABEL_LEN_SIZE + strlen(ref->proto) in service_proto_size()
222 static bool proto_is_valid(const char *proto) in proto_is_valid() argument
226 if (proto == NULL) { in proto_is_valid()
231 proto_size = strlen(proto); in proto_is_valid()
234 proto, proto_size, DNS_SD_PROTO_SIZE); in proto_is_valid()
238 if (!(strncasecmp("_tcp", proto, DNS_SD_PROTO_SIZE) == 0 || in proto_is_valid()
239 strncasecmp("_udp", proto, DNS_SD_PROTO_SIZE) == 0)) { in proto_is_valid()
242 proto); in proto_is_valid()
293 && proto_is_valid(inst->proto) in rec_is_valid()
367 inst->proto, in add_ptr_record()
[all …]
/Zephyr-latest/samples/net/sockets/echo_server/src/
Dudp.c49 NET_ERR("Failed to create UDP socket (%s): %d", data->proto, in start_udp_proto()
66 NET_ERR("Failed to set UDP secure option (%s): %d", data->proto, in start_udp_proto()
76 data->proto, errno); in start_udp_proto()
99 NET_ERR("Failed to bind UDP socket (%s): %d", data->proto, in start_udp_proto()
115 MY_PORT, data->proto); in process_udp()
125 NET_ERR("UDP (%s): Connection error %d", data->proto, in process_udp()
136 NET_ERR("UDP (%s): Failed to send %d", data->proto, in process_udp()
143 NET_INFO("%s UDP: Sent %u packets", data->proto, in process_udp()
148 data->proto, received); in process_udp()
210 LOG_INF("%s UDP: Received %d B/sec", data->proto, in print_stats()
[all …]
Dtcp.c82 LOG_ERR("Failed to create TCP socket (%s): %d", data->proto, in start_tcp_proto()
98 LOG_ERR("Failed to set TCP secure option (%s): %d", data->proto, in start_tcp_proto()
122 LOG_ERR("Failed to bind TCP socket (%s): %d", data->proto, in start_tcp_proto()
130 data->proto, errno); in start_tcp_proto()
157 LOG_INF("TCP (%s): Connection closed", data->proto); in handle_data()
161 LOG_ERR("TCP (%s): Connection error %d", data->proto, in handle_data()
187 "closing socket", data->proto); in handle_data()
192 data->proto, offset); in handle_data()
195 LOG_INF("%s TCP: Sent %u packets", data->proto, in handle_data()
233 MY_PORT, data->proto); in process_tcp()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/
Dsmp_udp.c51 enum proto_type proto; member
80 static const char *smp_udp_proto_to_name(enum proto_type proto) in smp_udp_proto_to_name() argument
83 if (proto == PROTOCOL_IPV4) { in smp_udp_proto_to_name()
89 if (proto == PROTOCOL_IPV6) { in smp_udp_proto_to_name()
162 static int create_socket(enum proto_type proto, int *sock) in create_socket() argument
178 if (proto == PROTOCOL_IPV4) { in create_socket()
189 if (proto == PROTOCOL_IPV6) { in create_socket()
204 smp_udp_proto_to_name(proto), err); in create_socket()
212 smp_udp_proto_to_name(proto), err); in create_socket()
232 rc = create_socket(conf->proto, &conf->sock); in smp_udp_receive_thread()
[all …]
/Zephyr-latest/samples/net/sockets/websocket_client/src/
Dmain.c166 size_t buf_len, const char *proto) in recv_data_wso_api() argument
189 "waiting (%d/%d)", proto, ret, errno); in recv_data_wso_api()
201 proto, amount, total_read, remaining); in recv_data_wso_api()
205 LOG_DBG("%s recv %d bytes", proto, total_read); in recv_data_wso_api()
210 size_t buf_len, const char *proto) in recv_data_bsd_api() argument
227 "waiting (%d/%d)", proto, ret, errno); in recv_data_bsd_api()
239 proto, amount, read_pos, remaining); in recv_data_bsd_api()
243 LOG_DBG("%s recv %d bytes", proto, read_pos); in recv_data_bsd_api()
247 static bool send_and_wait_msg(int sock, size_t amount, const char *proto, in send_and_wait_msg() argument
277 LOG_ERR("%s failed to send data using %s (%d)", proto, in send_and_wait_msg()
[all …]
/Zephyr-latest/samples/net/sockets/echo_client/src/
Dtcp.c63 LOG_ERR("%s TCP: Failed to send data, errno %d", data->proto, in send_tcp_data()
67 LOG_DBG("%s TCP: Sent %d bytes", data->proto, in send_tcp_data()
78 LOG_ERR("Too much data received: TCP %s", data->proto); in compare_tcp_data()
83 LOG_ERR("Invalid data received: TCP %s", data->proto); in compare_tcp_data()
102 LOG_ERR("Failed to create TCP socket (%s): %d", data->proto, in start_tcp_proto()
152 data->proto, errno); in start_tcp_proto()
160 data->proto, errno); in start_tcp_proto()
175 LOG_ERR("Cannot connect to TCP remote (%s): %d", data->proto, in start_tcp_proto()
218 data->proto, data->tcp.received); in process_tcp_proto()
222 LOG_INF("%s TCP: Exchanged %u packets", data->proto, in process_tcp_proto()

123456