/net/ax25/ |
D | ax25_iface.c | 60 struct ax25_protocol *protocol; in ax25_protocol_release() local 63 protocol = protocol_list; in ax25_protocol_release() 64 if (protocol == NULL) in ax25_protocol_release() 67 if (protocol->pid == pid) { in ax25_protocol_release() 68 protocol_list = protocol->next; in ax25_protocol_release() 72 while (protocol != NULL && protocol->next != NULL) { in ax25_protocol_release() 73 if (protocol->next->pid == pid) { in ax25_protocol_release() 74 protocol->next = protocol->next->next; in ax25_protocol_release() 78 protocol = protocol->next; in ax25_protocol_release() 164 struct ax25_protocol *protocol; in ax25_protocol_function() local [all …]
|
/net/ipv4/netfilter/ |
D | nf_socket_ipv4.c | 24 extract_icmp4_fields(const struct sk_buff *skb, u8 *protocol, in extract_icmp4_fields() argument 55 if (inside_iph->protocol != IPPROTO_TCP && in extract_icmp4_fields() 56 inside_iph->protocol != IPPROTO_UDP) in extract_icmp4_fields() 68 *protocol = inside_iph->protocol; in extract_icmp4_fields() 79 const u8 protocol, in nf_socket_get_sock_v4() argument 84 switch (protocol) { in nf_socket_get_sock_v4() 104 u8 uninitialized_var(protocol); in nf_sk_lookup_slow_v4() 111 if (iph->protocol == IPPROTO_UDP || iph->protocol == IPPROTO_TCP) { in nf_sk_lookup_slow_v4() 116 iph->protocol == IPPROTO_UDP ? in nf_sk_lookup_slow_v4() 121 protocol = iph->protocol; in nf_sk_lookup_slow_v4() [all …]
|
D | nf_reject_ipv4.c | 27 if (ip_hdr(oldskb)->protocol != IPPROTO_TCP) in nf_reject_ip_tcphdr_get() 49 __u8 protocol, int ttl) in nf_reject_iphdr_put() argument 60 niph->protocol = protocol; in nf_reject_iphdr_put() 66 nskb->protocol = htons(ETH_P_IP); in nf_reject_iphdr_put() 156 if (dev_hard_header(nskb, nskb->dev, ntohs(nskb->protocol), in nf_send_reset() 184 if (iph->protocol == IPPROTO_TCP || iph->protocol == IPPROTO_UDP) in nf_send_unreach() 185 proto = iph->protocol; in nf_send_unreach()
|
/net/ipv6/ |
D | xfrm6_protocol.c | 30 static inline struct xfrm6_protocol __rcu **proto_handlers(u8 protocol) in proto_handlers() argument 32 switch (protocol) { in proto_handlers() 49 int xfrm6_rcv_cb(struct sk_buff *skb, u8 protocol, int err) in xfrm6_rcv_cb() argument 53 struct xfrm6_protocol __rcu **head = proto_handlers(protocol); in xfrm6_rcv_cb() 58 for_each_protocol_rcu(*proto_handlers(protocol), handler) in xfrm6_rcv_cb() 170 static inline const struct inet6_protocol *netproto(unsigned char protocol) in netproto() argument 172 switch (protocol) { in netproto() 185 unsigned char protocol) in xfrm6_protocol_register() argument 193 if (!proto_handlers(protocol) || !netproto(protocol)) in xfrm6_protocol_register() 198 if (!rcu_dereference_protected(*proto_handlers(protocol), in xfrm6_protocol_register() [all …]
|
D | protocol.c | 32 int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char protocol) in inet6_add_protocol() argument 34 return !cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_add_protocol() 39 int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char protocol) in inet6_del_protocol() argument 43 ret = (cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_del_protocol() 56 int inet6_add_offload(const struct net_offload *prot, unsigned char protocol) in inet6_add_offload() argument 58 return !cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_add_offload() 63 int inet6_del_offload(const struct net_offload *prot, unsigned char protocol) in inet6_del_offload() argument 67 ret = (cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_del_offload()
|
D | fou6.c | 20 struct flowi6 *fl6, u8 *protocol, __be16 sport) in fou6_build_udp() argument 35 *protocol = IPPROTO_UDP; in fou6_build_udp() 39 u8 *protocol, struct flowi6 *fl6) in fou6_build_header() argument 46 err = __fou_build_header(skb, e, protocol, &sport, type); in fou6_build_header() 50 fou6_build_udp(skb, e, fl6, protocol, sport); in fou6_build_header() 56 u8 *protocol, struct flowi6 *fl6) in gue6_build_header() argument 63 err = __gue_build_header(skb, e, protocol, &sport, type); in gue6_build_header() 67 fou6_build_udp(skb, e, fl6, protocol, sport); in gue6_build_header()
|
D | af_inet6.c | 110 static int inet6_create(struct net *net, struct socket *sock, int protocol, in inet6_create() argument 122 if (protocol < 0 || protocol >= IPPROTO_MAX) in inet6_create() 133 if (protocol == answer->protocol) { in inet6_create() 134 if (protocol != IPPROTO_IP) in inet6_create() 138 if (IPPROTO_IP == protocol) { in inet6_create() 139 protocol = answer->protocol; in inet6_create() 142 if (IPPROTO_IP == answer->protocol) in inet6_create() 157 PF_INET6, protocol, sock->type); in inet6_create() 164 PF_INET6, protocol); in inet6_create() 196 inet->inet_num = protocol; in inet6_create() [all …]
|
/net/ipv4/ |
D | xfrm4_protocol.c | 30 static inline struct xfrm4_protocol __rcu **proto_handlers(u8 protocol) in proto_handlers() argument 32 switch (protocol) { in proto_handlers() 49 int xfrm4_rcv_cb(struct sk_buff *skb, u8 protocol, int err) in xfrm4_rcv_cb() argument 53 struct xfrm4_protocol __rcu **head = proto_handlers(protocol); in xfrm4_rcv_cb() 196 static inline const struct net_protocol *netproto(unsigned char protocol) in netproto() argument 198 switch (protocol) { in netproto() 211 unsigned char protocol) in xfrm4_protocol_register() argument 219 if (!proto_handlers(protocol) || !netproto(protocol)) in xfrm4_protocol_register() 224 if (!rcu_dereference_protected(*proto_handlers(protocol), in xfrm4_protocol_register() 228 for (pprev = proto_handlers(protocol); in xfrm4_protocol_register() [all …]
|
D | protocol.c | 35 int inet_add_protocol(const struct net_protocol *prot, unsigned char protocol) in inet_add_protocol() argument 39 protocol); in inet_add_protocol() 43 return !cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_add_protocol() 48 int inet_add_offload(const struct net_offload *prot, unsigned char protocol) in inet_add_offload() argument 50 return !cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_add_offload() 55 int inet_del_protocol(const struct net_protocol *prot, unsigned char protocol) in inet_del_protocol() argument 59 ret = (cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_del_protocol() 68 int inet_del_offload(const struct net_offload *prot, unsigned char protocol) in inet_del_offload() argument 72 ret = (cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_del_offload()
|
D | gre_offload.c | 24 __be16 protocol = skb->protocol; in gre_gso_segment() local 45 skb->protocol = skb->inner_protocol; in gre_gso_segment() 55 skb_gso_error_unwind(skb, protocol, tnl_hlen, mac_offset, in gre_gso_segment() 76 skb->protocol = protocol; in gre_gso_segment() 154 type = greh->protocol; in gre_gro_receive() 202 greh2->protocol != greh->protocol) { in gre_gro_receive() 242 type = greh->protocol; in gre_gro_complete()
|
D | ip_input.c | 157 u8 protocol = ip_hdr(skb)->protocol; in ip_call_ra_chain() local 168 if (sk && inet_sk(sk)->inet_num == protocol && in ip_call_ra_chain() 198 int protocol = ip_hdr(skb)->protocol; in ip_local_deliver_finish() local 203 raw = raw_local_deliver(skb, protocol); in ip_local_deliver_finish() 205 ipprot = rcu_dereference(inet_protos[protocol]); in ip_local_deliver_finish() 218 protocol = -ret; in ip_local_deliver_finish() 330 int protocol = iph->protocol; in ip_rcv_finish() local 332 ipprot = rcu_dereference(inet_protos[protocol]); in ip_rcv_finish()
|
D | xfrm4_mode_beet.c | 27 iph->protocol = XFRM_MODE_SKB_CB(skb)->protocol; in xfrm4_beet_make_header() 55 offsetof(struct iphdr, protocol); in xfrm4_beet_output() 69 ph->nexthdr = top_iph->protocol; in xfrm4_beet_output() 73 top_iph->protocol = IPPROTO_BEETPH; in xfrm4_beet_output() 89 if (unlikely(XFRM_MODE_SKB_CB(skb)->protocol == IPPROTO_BEETPH)) { in xfrm4_beet_input() 103 XFRM_MODE_SKB_CB(skb)->protocol = ph->nexthdr; in xfrm4_beet_input()
|
D | netfilter.c | 128 unsigned int dataoff, u_int8_t protocol) in nf_ip_checksum() argument 137 if ((protocol == 0 && !csum_fold(skb->csum)) || in nf_ip_checksum() 139 skb->len - dataoff, protocol, in nf_ip_checksum() 146 if (protocol == 0) in nf_ip_checksum() 151 protocol, 0); in nf_ip_checksum() 160 u_int8_t protocol) in nf_ip_checksum_partial() argument 168 return nf_ip_checksum(skb, hook, dataoff, protocol); in nf_ip_checksum_partial() 171 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial()
|
D | af_inet.c | 243 static int inet_create(struct net *net, struct socket *sock, int protocol, in inet_create() argument 254 if (protocol < 0 || protocol >= IPPROTO_MAX) in inet_create() 267 if (protocol == answer->protocol) { in inet_create() 268 if (protocol != IPPROTO_IP) in inet_create() 272 if (IPPROTO_IP == protocol) { in inet_create() 273 protocol = answer->protocol; in inet_create() 276 if (IPPROTO_IP == answer->protocol) in inet_create() 291 PF_INET, protocol, sock->type); in inet_create() 298 PF_INET, protocol); in inet_create() 330 inet->inet_num = protocol; in inet_create() [all …]
|
/net/phonet/ |
D | af_phonet.c | 40 static struct phonet_protocol *phonet_proto_get(unsigned int protocol) in phonet_proto_get() argument 44 if (protocol >= PHONET_NPROTO) in phonet_proto_get() 48 pp = rcu_dereference(proto_tab[protocol]); in phonet_proto_get() 63 static int pn_socket_create(struct net *net, struct socket *sock, int protocol, in pn_socket_create() argument 74 if (protocol == 0) { in pn_socket_create() 78 protocol = PN_PROTO_PHONET; in pn_socket_create() 81 protocol = PN_PROTO_PIPE; in pn_socket_create() 88 pnp = phonet_proto_get(protocol); in pn_socket_create() 90 request_module("net-pf-%d-proto-%d", PF_PHONET, protocol) == 0) in pn_socket_create() 91 pnp = phonet_proto_get(protocol); in pn_socket_create() [all …]
|
/net/netfilter/ipset/ |
D | ip_set_getport.c | 24 get_port(const struct sk_buff *skb, int protocol, unsigned int protooff, in get_port() argument 27 switch (protocol) { in get_port() 91 *proto = protocol; in get_port() 102 int protocol = iph->protocol; in ip_set_get_ip4_port() local 105 if (protocol <= 0) in ip_set_get_ip4_port() 109 switch (protocol) { in ip_set_get_ip4_port() 121 *proto = protocol; in ip_set_get_ip4_port() 125 return get_port(skb, protocol, protooff, src, port, proto); in ip_set_get_ip4_port()
|
/net/netfilter/ipvs/ |
D | ip_vs_core.c | 210 struct sk_buff *skb, int protocol, in ip_vs_conn_fill_param_persist() argument 215 ip_vs_conn_fill_param(svc->ipvs, svc->af, protocol, caddr, cport, vaddr, in ip_vs_conn_fill_param_persist() 285 int protocol = iph->protocol; in ip_vs_sched_persist() local 306 protocol = IPPROTO_IP; in ip_vs_sched_persist() 311 if (ip_vs_conn_fill_param_persist(svc, skb, protocol, &snet, 0, in ip_vs_sched_persist() 370 && iph->protocol == IPPROTO_UDP) ? in ip_vs_sched_persist() 376 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, src_addr, in ip_vs_sched_persist() 515 && iph->protocol == IPPROTO_UDP) ? in ip_vs_schedule() 524 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, in ip_vs_schedule() 583 iph->protocol == IPPROTO_UDP) ? in ip_vs_leave() [all …]
|
D | ip_vs_conn.c | 145 return ip_vs_conn_hashkey(p->ipvs, p->af, p->protocol, addr, port); in ip_vs_conn_hashkey_param() 152 ip_vs_conn_fill_param(cp->ipvs, cp->af, cp->protocol, in ip_vs_conn_hashkey_conn() 282 p->protocol == cp->protocol && in __ip_vs_conn_in_get() 309 ip_vs_proto_name(p->protocol), in ip_vs_conn_in_get() 330 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->saddr, in ip_vs_conn_fill_param_proto() 333 ip_vs_conn_fill_param(ipvs, af, iph->protocol, &iph->daddr, in ip_vs_conn_fill_param_proto() 377 ip_vs_addr_equal(p->protocol == IPPROTO_IP ? AF_UNSPEC : in ip_vs_ct_in_get() 381 p->protocol == cp->protocol && in ip_vs_ct_in_get() 393 ip_vs_proto_name(p->protocol), in ip_vs_ct_in_get() 422 p->protocol == cp->protocol && in ip_vs_conn_out_get() [all …]
|
/net/ceph/ |
D | auth.c | 24 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/ |
D | ebt_ip.c | 51 if (NF_INVF(info, EBT_IP_PROTO, info->protocol != ih->protocol)) in ebt_ip_mt() 93 if (info->protocol != IPPROTO_TCP && in ebt_ip_mt_check() 94 info->protocol != IPPROTO_UDP && in ebt_ip_mt_check() 95 info->protocol != IPPROTO_UDPLITE && in ebt_ip_mt_check() 96 info->protocol != IPPROTO_SCTP && in ebt_ip_mt_check() 97 info->protocol != IPPROTO_DCCP) in ebt_ip_mt_check()
|
D | ebt_log.c | 52 print_ports(const struct sk_buff *skb, uint8_t protocol, int offset) in print_ports() argument 54 if (protocol == IPPROTO_TCP || in print_ports() 55 protocol == IPPROTO_UDP || in print_ports() 56 protocol == IPPROTO_UDPLITE || in print_ports() 57 protocol == IPPROTO_SCTP || in print_ports() 58 protocol == IPPROTO_DCCP) { in print_ports() 107 &ih->saddr, &ih->daddr, ih->tos, ih->protocol); in ebt_log_packet() 108 print_ports(skb, ih->protocol, ih->ihl*4); in ebt_log_packet()
|
D | ebt_ip6.c | 69 if (NF_INVF(info, EBT_IP6_PROTO, info->protocol != nexthdr)) in ebt_ip6_mt() 117 if (info->protocol != IPPROTO_TCP && in ebt_ip6_mt_check() 118 info->protocol != IPPROTO_UDP && in ebt_ip6_mt_check() 119 info->protocol != IPPROTO_UDPLITE && in ebt_ip6_mt_check() 120 info->protocol != IPPROTO_SCTP && in ebt_ip6_mt_check() 121 info->protocol != IPPROTO_DCCP) in ebt_ip6_mt_check() 130 info->protocol != IPPROTO_ICMPV6) in ebt_ip6_mt_check()
|
/net/nfc/nci/ |
D | Kconfig | 3 tristate "NCI protocol support" 6 NCI (NFC Controller Interface) is a communication protocol between 15 tristate "NCI over SPI protocol support" 18 NCI (NFC Controller Interface) is a communication protocol between 25 tristate "NCI over UART protocol support"
|
/net/bridge/ |
D | br_netfilter_hooks.c | 73 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP)) 76 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6)) 79 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP)) 84 return skb->protocol; in vlan_proto() 85 else if (skb->protocol == htons(ETH_P_8021Q)) in vlan_proto() 110 (skb->protocol == htons(ETH_P_PPP_SES) && \ 115 (skb->protocol == htons(ETH_P_PPP_SES) && \ 167 switch (skb->protocol) { in nf_bridge_encap_header_len() 249 skb->protocol = htons(ETH_P_8021Q); in nf_bridge_update_protocol() 252 skb->protocol = htons(ETH_P_PPP_SES); in nf_bridge_update_protocol() [all …]
|
/net/sched/ |
D | cls_rsvp.h | 81 u8 protocol; member 106 static inline unsigned int hash_dst(__be32 *dst, u8 protocol, u8 tunnelid) in hash_dst() argument 112 return (h ^ protocol ^ tunnelid) & 0xFF; in hash_dst() 142 u8 protocol; in rsvp_classify() local 163 protocol = nhptr->nexthdr; in rsvp_classify() 168 protocol = nhptr->protocol; in rsvp_classify() 174 h1 = hash_dst(dst, protocol, tunnelid); in rsvp_classify() 180 protocol == s->protocol && in rsvp_classify() 575 h1 = hash_dst(dst, pinfo ? pinfo->protocol : 0, pinfo ? pinfo->tunnelid : 0); in rsvp_change() 596 pinfo && pinfo->protocol == s->protocol && in rsvp_change() [all …]
|