Home
last modified time | relevance | path

Searched refs:protocol (Results 1 – 25 of 358) sorted by relevance

12345678910>>...15

/net/ax25/
Dax25_iface.c57 struct ax25_protocol *protocol; in ax25_protocol_release() local
60 protocol = protocol_list; in ax25_protocol_release()
61 if (protocol == NULL) in ax25_protocol_release()
64 if (protocol->pid == pid) { in ax25_protocol_release()
65 protocol_list = protocol->next; in ax25_protocol_release()
69 while (protocol != NULL && protocol->next != NULL) { in ax25_protocol_release()
70 if (protocol->next->pid == pid) { in ax25_protocol_release()
71 protocol->next = protocol->next->next; in ax25_protocol_release()
75 protocol = protocol->next; in ax25_protocol_release()
161 struct ax25_protocol *protocol; in ax25_protocol_function() local
[all …]
/net/ipv4/netfilter/
Dnf_socket_ipv4.c20 extract_icmp4_fields(const struct sk_buff *skb, u8 *protocol, in extract_icmp4_fields() argument
51 if (inside_iph->protocol != IPPROTO_TCP && in extract_icmp4_fields()
52 inside_iph->protocol != IPPROTO_UDP) in extract_icmp4_fields()
64 *protocol = inside_iph->protocol; in extract_icmp4_fields()
75 const u8 protocol, in nf_socket_get_sock_v4() argument
80 switch (protocol) { in nf_socket_get_sock_v4()
99 u8 uninitialized_var(protocol); in nf_sk_lookup_slow_v4()
106 if (iph->protocol == IPPROTO_UDP || iph->protocol == IPPROTO_TCP) { in nf_sk_lookup_slow_v4()
111 iph->protocol == IPPROTO_UDP ? in nf_sk_lookup_slow_v4()
116 protocol = iph->protocol; in nf_sk_lookup_slow_v4()
[all …]
Dnf_reject_ipv4.c24 if (ip_hdr(oldskb)->protocol != IPPROTO_TCP) in nf_reject_ip_tcphdr_get()
46 __u8 protocol, int ttl) in nf_reject_iphdr_put() argument
57 niph->protocol = protocol; in nf_reject_iphdr_put()
63 nskb->protocol = htons(ETH_P_IP); in nf_reject_iphdr_put()
155 if (dev_hard_header(nskb, nskb->dev, ntohs(nskb->protocol), in nf_send_reset()
173 u8 proto = iph->protocol; in nf_send_unreach()
/net/netfilter/
Dutils.c11 unsigned int dataoff, u8 protocol) in nf_ip_checksum() argument
20 if ((protocol != IPPROTO_TCP && protocol != IPPROTO_UDP && in nf_ip_checksum()
23 skb->len - dataoff, protocol, in nf_ip_checksum()
30 if (protocol != IPPROTO_TCP && protocol != IPPROTO_UDP) in nf_ip_checksum()
35 protocol, 0); in nf_ip_checksum()
45 u8 protocol) in nf_ip_checksum_partial() argument
53 return nf_ip_checksum(skb, hook, dataoff, protocol); in nf_ip_checksum_partial()
56 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial()
65 unsigned int dataoff, u8 protocol) in nf_ip6_checksum() argument
75 skb->len - dataoff, protocol, in nf_ip6_checksum()
[all …]
/net/ipv6/
Dxfrm6_protocol.c26 static inline struct xfrm6_protocol __rcu **proto_handlers(u8 protocol) in proto_handlers() argument
28 switch (protocol) { in proto_handlers()
45 static int xfrm6_rcv_cb(struct sk_buff *skb, u8 protocol, int err) in xfrm6_rcv_cb() argument
49 struct xfrm6_protocol __rcu **head = proto_handlers(protocol); in xfrm6_rcv_cb()
54 for_each_protocol_rcu(*proto_handlers(protocol), handler) in xfrm6_rcv_cb()
171 static inline const struct inet6_protocol *netproto(unsigned char protocol) in netproto() argument
173 switch (protocol) { in netproto()
186 unsigned char protocol) in xfrm6_protocol_register() argument
194 if (!proto_handlers(protocol) || !netproto(protocol)) in xfrm6_protocol_register()
199 if (!rcu_dereference_protected(*proto_handlers(protocol), in xfrm6_protocol_register()
[all …]
Dprotocol.c28 int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char protocol) in inet6_add_protocol() argument
30 return !cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_add_protocol()
35 int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char protocol) in inet6_del_protocol() argument
39 ret = (cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_del_protocol()
52 int inet6_add_offload(const struct net_offload *prot, unsigned char protocol) in inet6_add_offload() argument
54 return !cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_add_offload()
59 int inet6_del_offload(const struct net_offload *prot, unsigned char protocol) in inet6_del_offload() argument
63 ret = (cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_del_offload()
Dfou6.c22 struct flowi6 *fl6, u8 *protocol, __be16 sport) in fou6_build_udp() argument
37 *protocol = IPPROTO_UDP; in fou6_build_udp()
41 u8 *protocol, struct flowi6 *fl6) in fou6_build_header() argument
48 err = __fou_build_header(skb, e, protocol, &sport, type); in fou6_build_header()
52 fou6_build_udp(skb, e, fl6, protocol, sport); in fou6_build_header()
58 u8 *protocol, struct flowi6 *fl6) in gue6_build_header() argument
65 err = __gue_build_header(skb, e, protocol, &sport, type); in gue6_build_header()
69 fou6_build_udp(skb, e, fl6, protocol, sport); in gue6_build_header()
Daf_inet6.c107 static int inet6_create(struct net *net, struct socket *sock, int protocol, in inet6_create() argument
119 if (protocol < 0 || protocol >= IPPROTO_MAX) in inet6_create()
130 if (protocol == answer->protocol) { in inet6_create()
131 if (protocol != IPPROTO_IP) in inet6_create()
135 if (IPPROTO_IP == protocol) { in inet6_create()
136 protocol = answer->protocol; in inet6_create()
139 if (IPPROTO_IP == answer->protocol) in inet6_create()
154 PF_INET6, protocol, sock->type); in inet6_create()
161 PF_INET6, protocol); in inet6_create()
194 inet->inet_num = protocol; in inet6_create()
[all …]
/net/ipv4/
Dxfrm4_protocol.c26 static inline struct xfrm4_protocol __rcu **proto_handlers(u8 protocol) in proto_handlers() argument
28 switch (protocol) { in proto_handlers()
45 static int xfrm4_rcv_cb(struct sk_buff *skb, u8 protocol, int err) in xfrm4_rcv_cb() argument
49 struct xfrm4_protocol __rcu **head = proto_handlers(protocol); in xfrm4_rcv_cb()
197 static inline const struct net_protocol *netproto(unsigned char protocol) in netproto() argument
199 switch (protocol) { in netproto()
212 unsigned char protocol) in xfrm4_protocol_register() argument
220 if (!proto_handlers(protocol) || !netproto(protocol)) in xfrm4_protocol_register()
225 if (!rcu_dereference_protected(*proto_handlers(protocol), in xfrm4_protocol_register()
229 for (pprev = proto_handlers(protocol); in xfrm4_protocol_register()
[all …]
Dprotocol.c32 int inet_add_protocol(const struct net_protocol *prot, unsigned char protocol) in inet_add_protocol() argument
36 protocol); in inet_add_protocol()
40 return !cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_add_protocol()
45 int inet_add_offload(const struct net_offload *prot, unsigned char protocol) in inet_add_offload() argument
47 return !cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_add_offload()
52 int inet_del_protocol(const struct net_protocol *prot, unsigned char protocol) in inet_del_protocol() argument
56 ret = (cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_del_protocol()
65 int inet_del_offload(const struct net_offload *prot, unsigned char protocol) in inet_del_offload() argument
69 ret = (cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_del_offload()
Dgre_offload.c20 __be16 protocol = skb->protocol; in gre_gso_segment() local
41 skb->protocol = skb->inner_protocol; in gre_gso_segment()
51 skb_gso_error_unwind(skb, protocol, tnl_hlen, mac_offset, in gre_gso_segment()
72 skb->protocol = protocol; in gre_gso_segment()
150 type = greh->protocol; in gre_gro_receive()
198 greh2->protocol != greh->protocol) { in gre_gro_receive()
238 type = greh->protocol; in gre_gro_complete()
Dip_input.c151 u8 protocol = ip_hdr(skb)->protocol; in ip_call_ra_chain() local
162 if (sk && inet_sk(sk)->inet_num == protocol && in ip_call_ra_chain()
187 void ip_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int protocol) in ip_protocol_deliver_rcu() argument
193 raw = raw_local_deliver(skb, protocol); in ip_protocol_deliver_rcu()
195 ipprot = rcu_dereference(inet_protos[protocol]); in ip_protocol_deliver_rcu()
207 protocol = -ret; in ip_protocol_deliver_rcu()
231 ip_protocol_deliver_rcu(net, skb, ip_hdr(skb)->protocol); in ip_local_deliver_finish()
320 int protocol = iph->protocol; in ip_rcv_finish_core() local
322 ipprot = rcu_dereference(inet_protos[protocol]); in ip_rcv_finish_core()
Daf_inet.c247 static int inet_create(struct net *net, struct socket *sock, int protocol, in inet_create() argument
258 if (protocol < 0 || protocol >= IPPROTO_MAX) in inet_create()
271 if (protocol == answer->protocol) { in inet_create()
272 if (protocol != IPPROTO_IP) in inet_create()
276 if (IPPROTO_IP == protocol) { in inet_create()
277 protocol = answer->protocol; in inet_create()
280 if (IPPROTO_IP == answer->protocol) in inet_create()
295 PF_INET, protocol, sock->type); in inet_create()
302 PF_INET, protocol); in inet_create()
335 inet->inet_num = protocol; in inet_create()
[all …]
/net/phonet/
Daf_phonet.c27 static const struct phonet_protocol *phonet_proto_get(unsigned int protocol) in phonet_proto_get() argument
31 if (protocol >= PHONET_NPROTO) in phonet_proto_get()
35 pp = rcu_dereference(proto_tab[protocol]); in phonet_proto_get()
50 static int pn_socket_create(struct net *net, struct socket *sock, int protocol, in pn_socket_create() argument
61 if (protocol == 0) { in pn_socket_create()
65 protocol = PN_PROTO_PHONET; in pn_socket_create()
68 protocol = PN_PROTO_PIPE; in pn_socket_create()
75 pnp = phonet_proto_get(protocol); in pn_socket_create()
77 request_module("net-pf-%d-proto-%d", PF_PHONET, protocol) == 0) in pn_socket_create()
78 pnp = phonet_proto_get(protocol); in pn_socket_create()
[all …]
/net/netfilter/ipset/
Dip_set_getport.c25 get_port(const struct sk_buff *skb, int protocol, unsigned int protooff, in get_port() argument
28 switch (protocol) { in get_port()
92 *proto = protocol; in get_port()
103 int protocol = iph->protocol; in ip_set_get_ip4_port() local
106 if (protocol <= 0) in ip_set_get_ip4_port()
110 switch (protocol) { in ip_set_get_ip4_port()
122 *proto = protocol; in ip_set_get_ip4_port()
126 return get_port(skb, protocol, protooff, src, port, proto); in ip_set_get_ip4_port()
/net/netfilter/ipvs/
Dip_vs_core.c243 struct sk_buff *skb, int protocol, in ip_vs_conn_fill_param_persist() argument
248 ip_vs_conn_fill_param(svc->ipvs, svc->af, protocol, caddr, cport, vaddr, in ip_vs_conn_fill_param_persist()
318 int protocol = iph->protocol; in ip_vs_sched_persist() local
339 protocol = IPPROTO_IP; in ip_vs_sched_persist()
344 if (ip_vs_conn_fill_param_persist(svc, skb, protocol, &snet, 0, in ip_vs_sched_persist()
403 && iph->protocol == IPPROTO_UDP) ? in ip_vs_sched_persist()
409 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, src_addr, in ip_vs_sched_persist()
550 && iph->protocol == IPPROTO_UDP) ? in ip_vs_schedule()
559 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, in ip_vs_schedule()
618 iph->protocol == IPPROTO_UDP) ? in ip_vs_leave()
[all …]
Dip_vs_conn.c140 return ip_vs_conn_hashkey(p->ipvs, p->af, p->protocol, addr, port); in ip_vs_conn_hashkey_param()
147 ip_vs_conn_fill_param(cp->ipvs, cp->af, cp->protocol, in ip_vs_conn_hashkey_conn()
278 p->protocol == cp->protocol && in __ip_vs_conn_in_get()
305 ip_vs_proto_name(p->protocol), in ip_vs_conn_in_get()
326 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->saddr, in ip_vs_conn_fill_param_proto()
329 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->daddr, in ip_vs_conn_fill_param_proto()
373 ip_vs_addr_equal(p->protocol == IPPROTO_IP ? AF_UNSPEC : in ip_vs_ct_in_get()
377 p->protocol == cp->protocol && in ip_vs_ct_in_get()
389 ip_vs_proto_name(p->protocol), in ip_vs_ct_in_get()
418 p->protocol == cp->protocol && in ip_vs_conn_out_get()
[all …]
/net/ceph/
Dauth.c24 static int ceph_auth_init_protocol(struct ceph_auth_client *ac, int protocol) in ceph_auth_init_protocol() argument
26 switch (protocol) { in ceph_auth_init_protocol()
160 ceph_encode_32(&p, ac->protocol); in ceph_build_auth_request()
184 int protocol; in ceph_handle_auth_reply() local
196 protocol = ceph_decode_32(&p); in ceph_handle_auth_reply()
221 if (!protocol && result < 0) { in ceph_handle_auth_reply()
226 if (ac->protocol && ac->protocol != protocol) { in ceph_handle_auth_reply()
228 ac->protocol = 0; in ceph_handle_auth_reply()
231 if (ac->protocol != protocol) { in ceph_handle_auth_reply()
232 ret = ceph_auth_init_protocol(ac, protocol); in ceph_handle_auth_reply()
[all …]
/net/bridge/netfilter/
Debt_ip.c61 if (NF_INVF(info, EBT_IP_PROTO, info->protocol != ih->protocol)) in ebt_ip_mt()
117 if (info->protocol != IPPROTO_TCP && in ebt_ip_mt_check()
118 info->protocol != IPPROTO_UDP && in ebt_ip_mt_check()
119 info->protocol != IPPROTO_UDPLITE && in ebt_ip_mt_check()
120 info->protocol != IPPROTO_SCTP && in ebt_ip_mt_check()
121 info->protocol != IPPROTO_DCCP) in ebt_ip_mt_check()
130 info->protocol != IPPROTO_ICMP) in ebt_ip_mt_check()
138 info->protocol != IPPROTO_IGMP) in ebt_ip_mt_check()
Debt_log.c53 print_ports(const struct sk_buff *skb, uint8_t protocol, int offset) in print_ports() argument
55 if (protocol == IPPROTO_TCP || in print_ports()
56 protocol == IPPROTO_UDP || in print_ports()
57 protocol == IPPROTO_UDPLITE || in print_ports()
58 protocol == IPPROTO_SCTP || in print_ports()
59 protocol == IPPROTO_DCCP) { in print_ports()
108 &ih->saddr, &ih->daddr, ih->tos, ih->protocol); in ebt_log_packet()
109 print_ports(skb, ih->protocol, ih->ihl*4); in ebt_log_packet()
Debt_ip6.c70 if (NF_INVF(info, EBT_IP6_PROTO, info->protocol != nexthdr)) in ebt_ip6_mt()
118 if (info->protocol != IPPROTO_TCP && in ebt_ip6_mt_check()
119 info->protocol != IPPROTO_UDP && in ebt_ip6_mt_check()
120 info->protocol != IPPROTO_UDPLITE && in ebt_ip6_mt_check()
121 info->protocol != IPPROTO_SCTP && in ebt_ip6_mt_check()
122 info->protocol != IPPROTO_DCCP) in ebt_ip6_mt_check()
131 info->protocol != IPPROTO_ICMPV6) in ebt_ip6_mt_check()
/net/nfc/nci/
DKconfig4 tristate "NCI protocol support"
7 NCI (NFC Controller Interface) is a communication protocol between
16 tristate "NCI over SPI protocol support"
19 NCI (NFC Controller Interface) is a communication protocol between
26 tristate "NCI over UART protocol support"
/net/core/
Dlwt_bpf.c90 if (skb->protocol == htons(ETH_P_IP)) { in bpf_lwt_input_reroute()
99 } else if (skb->protocol == htons(ETH_P_IPV6)) { in bpf_lwt_input_reroute()
185 if (skb->protocol == htons(ETH_P_IP)) in bpf_lwt_xmit_reroute()
187 else if (skb->protocol == htons(ETH_P_IPV6)) in bpf_lwt_xmit_reroute()
211 fl4.flowi4_proto = iph->protocol; in bpf_lwt_xmit_reroute()
276 __be16 proto = skb->protocol; in bpf_xmit()
286 if (skb->protocol != proto) { in bpf_xmit()
540 __u8 protocol; in handle_gso_encap() local
550 protocol = ip_hdr(skb)->protocol; in handle_gso_encap()
554 protocol = ipv6_hdr(skb)->nexthdr; in handle_gso_encap()
[all …]
/net/can/
DKconfig11 communications protocol. Development of the CAN bus started in
12 1983 at Robert Bosch GmbH, and the protocol was officially
15 applications. More information on the CAN network protocol family
27 The raw CAN protocol option offers access to the CAN bus via
29 most cases where no higher level protocol is being used. The raw
31 To receive/send raw CAN messages, use AF_CAN with protocol CAN_RAW.
43 To use the Broadcast Manager, use AF_CAN with protocol CAN_BCM.
/net/sched/
Dcls_rsvp.h77 u8 protocol; member
99 static inline unsigned int hash_dst(__be32 *dst, u8 protocol, u8 tunnelid) in hash_dst() argument
105 return (h ^ protocol ^ tunnelid) & 0xFF; in hash_dst()
135 u8 protocol; in rsvp_classify() local
156 protocol = nhptr->nexthdr; in rsvp_classify()
161 protocol = nhptr->protocol; in rsvp_classify()
167 h1 = hash_dst(dst, protocol, tunnelid); in rsvp_classify()
173 protocol == s->protocol && in rsvp_classify()
569 h1 = hash_dst(dst, pinfo ? pinfo->protocol : 0, pinfo ? pinfo->tunnelid : 0); in rsvp_change()
590 pinfo && pinfo->protocol == s->protocol && in rsvp_change()
[all …]

12345678910>>...15