/net/caif/ |
D | cfpkt_skbuff.c | 18 #define PKT_ERROR(pkt, errmsg) \ argument 20 cfpkt_priv(pkt)->erronous = true; \ 21 skb_reset_tail_pointer(&pkt->skb); \ 46 static inline struct cfpkt_priv_data *cfpkt_priv(struct cfpkt *pkt) in cfpkt_priv() argument 48 return (struct cfpkt_priv_data *) pkt->skb.cb; in cfpkt_priv() 51 static inline bool is_erronous(struct cfpkt *pkt) in is_erronous() argument 53 return cfpkt_priv(pkt)->erronous; in is_erronous() 56 static inline struct sk_buff *pkt_to_skb(struct cfpkt *pkt) in pkt_to_skb() argument 58 return &pkt->skb; in pkt_to_skb() 68 struct cfpkt *pkt = skb_to_pkt(nativepkt); in cfpkt_fromnative() local [all …]
|
D | cfctrl.c | 23 int cmd, struct cfpkt *pkt){ in handle_loop() argument 28 int cmd, struct cfpkt *pkt); 30 static int cfctrl_recv(struct cflayer *layr, struct cfpkt *pkt); 178 struct cfpkt *pkt; in cfctrl_enum_req() local 186 pkt = cfpkt_create(CFPKT_CTRL_PKT_LEN); in cfctrl_enum_req() 187 if (!pkt) in cfctrl_enum_req() 190 init_info(cfpkt_info(pkt), cfctrl); in cfctrl_enum_req() 191 cfpkt_info(pkt)->dev_info->id = physlinkid; in cfctrl_enum_req() 193 cfpkt_addbdy(pkt, CFCTRL_CMD_ENUM); in cfctrl_enum_req() 194 cfpkt_addbdy(pkt, physlinkid); in cfctrl_enum_req() [all …]
|
D | cfserl.c | 29 static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt); 30 static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt); 53 struct cfpkt *pkt = NULL; in cfserl_receive() local 67 pkt = layr->incomplete_frm; in cfserl_receive() 68 if (pkt == NULL) { in cfserl_receive() 73 pkt = newpkt; in cfserl_receive() 80 cfpkt_extr_head(pkt, &tmp8, 1); in cfserl_receive() 82 while (cfpkt_more(pkt) in cfserl_receive() 84 cfpkt_extr_head(pkt, &tmp8, 1); in cfserl_receive() 86 if (!cfpkt_more(pkt)) { in cfserl_receive() [all …]
|
D | cfdgml.c | 24 static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt); 25 static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt); 41 static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt) in cfdgml_receive() argument 50 if (cfpkt_extr_head(pkt, &cmd, 1) < 0) { in cfdgml_receive() 52 cfpkt_destroy(pkt); in cfdgml_receive() 57 if (cfpkt_extr_head(pkt, &dgmhdr, 3) < 0) { in cfdgml_receive() 59 cfpkt_destroy(pkt); in cfdgml_receive() 62 ret = layr->up->receive(layr->up, pkt); in cfdgml_receive() 69 cfpkt_destroy(pkt); in cfdgml_receive() 73 cfpkt_destroy(pkt); in cfdgml_receive() [all …]
|
D | cffrml.c | 28 static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt); 29 static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt); 82 static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt) in cffrml_receive() argument 91 cfpkt_extr_head(pkt, &tmp, 2); in cffrml_receive() 98 if (cfpkt_setlen(pkt, len) < 0) { in cffrml_receive() 101 cfpkt_destroy(pkt); in cffrml_receive() 109 cfpkt_extr_trail(pkt, &tmp, 2); in cffrml_receive() 111 pktchks = cfpkt_iterate(pkt, cffrml_checksum, 0xffff); in cffrml_receive() 113 cfpkt_add_trail(pkt, &tmp, 2); in cffrml_receive() 121 if (cfpkt_erroneous(pkt)) { in cffrml_receive() [all …]
|
D | cfrfml.c | 21 static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt); 22 static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt); 72 struct cfpkt *pkt, int *err) in rfm_append() argument 78 if (cfpkt_extr_head(pkt, seghead, 6) < 0) in rfm_append() 85 tmppkt = cfpkt_append(rfml->incomplete_frm, pkt, in rfm_append() 97 static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt) in cfrfml_receive() argument 112 if (cfpkt_extr_head(pkt, &tmp, 1) < 0) in cfrfml_receive() 119 if (cfpkt_peek_head(pkt, rfml->seghead, 6) < 0) in cfrfml_receive() 124 if (cfpkt_erroneous(pkt)) in cfrfml_receive() 126 rfml->incomplete_frm = pkt; in cfrfml_receive() [all …]
|
D | cfveil.c | 23 static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt); 24 static int cfvei_transmit(struct cflayer *layr, struct cfpkt *pkt); 39 static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt) in cfvei_receive() argument 48 if (cfpkt_extr_head(pkt, &cmd, 1) < 0) { in cfvei_receive() 50 cfpkt_destroy(pkt); in cfvei_receive() 55 ret = layr->up->receive(layr->up, pkt); in cfvei_receive() 59 cfpkt_destroy(pkt); in cfvei_receive() 63 cfpkt_destroy(pkt); in cfvei_receive() 66 cfpkt_destroy(pkt); in cfvei_receive() 70 cfpkt_destroy(pkt); in cfvei_receive() [all …]
|
D | cfutill.c | 24 static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt); 25 static int cfutill_transmit(struct cflayer *layr, struct cfpkt *pkt); 40 static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt) in cfutill_receive() argument 48 if (cfpkt_extr_head(pkt, &cmd, 1) < 0) { in cfutill_receive() 50 cfpkt_destroy(pkt); in cfutill_receive() 56 return layr->up->receive(layr->up, pkt); in cfutill_receive() 59 cfpkt_destroy(pkt); in cfutill_receive() 63 cfpkt_destroy(pkt); in cfutill_receive() 69 cfpkt_destroy(pkt); in cfutill_receive() 72 cfpkt_destroy(pkt); in cfutill_receive() [all …]
|
D | cfvidl.c | 19 static int cfvidl_receive(struct cflayer *layr, struct cfpkt *pkt); 20 static int cfvidl_transmit(struct cflayer *layr, struct cfpkt *pkt); 36 static int cfvidl_receive(struct cflayer *layr, struct cfpkt *pkt) in cfvidl_receive() argument 39 if (cfpkt_extr_head(pkt, &videoheader, 4) < 0) { in cfvidl_receive() 41 cfpkt_destroy(pkt); in cfvidl_receive() 44 return layr->up->receive(layr->up, pkt); in cfvidl_receive() 47 static int cfvidl_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfvidl_transmit() argument 55 cfpkt_destroy(pkt); in cfvidl_transmit() 59 cfpkt_add_head(pkt, &videoheader, 4); in cfvidl_transmit() 61 info = cfpkt_info(pkt); in cfvidl_transmit() [all …]
|
D | cfsrvl.c | 109 struct cfpkt *pkt; in cfservl_modemcmd() local 112 pkt = cfpkt_create(SRVL_CTRL_PKT_SIZE); in cfservl_modemcmd() 113 if (!pkt) in cfservl_modemcmd() 116 if (cfpkt_add_head(pkt, &flow_on, 1) < 0) { in cfservl_modemcmd() 118 cfpkt_destroy(pkt); in cfservl_modemcmd() 121 info = cfpkt_info(pkt); in cfservl_modemcmd() 125 cfpkt_set_prio(pkt, TC_PRIO_CONTROL); in cfservl_modemcmd() 126 return layr->dn->transmit(layr->dn, pkt); in cfservl_modemcmd() 130 struct cfpkt *pkt; in cfservl_modemcmd() local 133 pkt = cfpkt_create(SRVL_CTRL_PKT_SIZE); in cfservl_modemcmd() [all …]
|
D | cfdbgl.c | 17 static int cfdbgl_receive(struct cflayer *layr, struct cfpkt *pkt); 18 static int cfdbgl_transmit(struct cflayer *layr, struct cfpkt *pkt); 33 static int cfdbgl_receive(struct cflayer *layr, struct cfpkt *pkt) in cfdbgl_receive() argument 35 return layr->up->receive(layr->up, pkt); in cfdbgl_receive() 38 static int cfdbgl_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfdbgl_transmit() argument 45 cfpkt_destroy(pkt); in cfdbgl_transmit() 50 info = cfpkt_info(pkt); in cfdbgl_transmit() 54 return layr->dn->transmit(layr->dn, pkt); in cfdbgl_transmit()
|
D | caif_usb.c | 39 static int cfusbl_receive(struct cflayer *layr, struct cfpkt *pkt) in cfusbl_receive() argument 44 cfpkt_extr_head(pkt, &hpad, 1); in cfusbl_receive() 45 cfpkt_extr_head(pkt, NULL, hpad); in cfusbl_receive() 46 return layr->up->receive(layr->up, pkt); in cfusbl_receive() 49 static int cfusbl_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfusbl_transmit() argument 57 skb = cfpkt_tonative(pkt); in cfusbl_transmit() 62 info = cfpkt_info(pkt); in cfusbl_transmit() 72 cfpkt_add_head(pkt, zeros, hpad); in cfusbl_transmit() 73 cfpkt_add_head(pkt, &hpad, 1); in cfusbl_transmit() 74 cfpkt_add_head(pkt, usbl->tx_eth_hdr, sizeof(usbl->tx_eth_hdr)); in cfusbl_transmit() [all …]
|
D | cfmuxl.c | 42 static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt); 43 static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt); 174 static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt) in cfmuxl_receive() argument 180 if (cfpkt_extr_head(pkt, &id, 1) < 0) { in cfmuxl_receive() 182 cfpkt_destroy(pkt); in cfmuxl_receive() 191 cfpkt_destroy(pkt); in cfmuxl_receive() 205 ret = up->receive(up, pkt); in cfmuxl_receive() 211 static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfmuxl_transmit() argument 217 struct caif_payload_info *info = cfpkt_info(pkt); in cfmuxl_transmit() 227 cfpkt_destroy(pkt); in cfmuxl_transmit() [all …]
|
/net/vmw_vsock/ |
D | vmci_transport.c | 51 struct vmci_transport_packet *pkt); 55 struct vmci_transport_packet *pkt); 58 struct vmci_transport_packet *pkt); 61 struct vmci_transport_packet *pkt); 64 struct vmci_transport_packet *pkt); 66 struct vmci_transport_packet *pkt); 75 struct vmci_transport_packet pkt; member 135 vmci_transport_packet_init(struct vmci_transport_packet *pkt, in vmci_transport_packet_init() argument 148 pkt->dg.src = vmci_make_handle(VMADDR_CID_ANY, in vmci_transport_packet_init() 150 pkt->dg.dst = vmci_make_handle(dst->svm_cid, in vmci_transport_packet_init() [all …]
|
D | vmci_transport_notify.c | 23 #define PKT_FIELD(vsk, field_name) (vmci_trans(vsk)->notify.pkt.field_name) 114 struct vmci_transport_packet *pkt, in vmci_transport_handle_waiting_read() argument 125 memcpy(&PKT_FIELD(vsk, peer_waiting_read_info), &pkt->u.wait, in vmci_transport_handle_waiting_read() 144 struct vmci_transport_packet *pkt, in vmci_transport_handle_waiting_write() argument 155 memcpy(&PKT_FIELD(vsk, peer_waiting_write_info), &pkt->u.wait, in vmci_transport_handle_waiting_write() 174 struct vmci_transport_packet *pkt, in vmci_transport_handle_read() argument 310 struct vmci_transport_packet *pkt, in vmci_transport_handle_wrote() argument 608 struct vmci_transport_packet *pkt, in vmci_transport_notify_pkt_handle_pkt() argument 615 switch (pkt->type) { in vmci_transport_notify_pkt_handle_pkt() 617 vmci_transport_handle_wrote(sk, pkt, bottom_half, dst, src); in vmci_transport_notify_pkt_handle_pkt() [all …]
|
/net/netfilter/ |
D | nf_tables_core.c | 37 const struct nft_pktinfo *pkt) in nft_payload_fast_eval() argument 40 const struct sk_buff *skb = pkt->skb; in nft_payload_fast_eval() 47 ptr = skb_network_header(skb) + pkt->xt.thoff; in nft_payload_fast_eval() 91 static void nft_trace_packet(const struct nft_pktinfo *pkt, in nft_trace_packet() argument 95 struct net *net = dev_net(pkt->in ? pkt->in : pkt->out); in nft_trace_packet() 97 nf_log_packet(net, pkt->xt.family, pkt->ops->hooknum, pkt->skb, pkt->in, in nft_trace_packet() 98 pkt->out, &trace_loginfo, "TRACE: %s:%s:%s:%u ", in nft_trace_packet() 104 nft_do_chain(struct nft_pktinfo *pkt, const struct nf_hook_ops *ops) in nft_do_chain() argument 137 !nft_payload_fast_eval(expr, data, pkt)) in nft_do_chain() 138 expr->ops->eval(expr, data, pkt); in nft_do_chain() [all …]
|
D | nft_reject_inet.c | 22 const struct nft_pktinfo *pkt) in nft_reject_inet_eval() argument 25 struct net *net = dev_net((pkt->in != NULL) ? pkt->in : pkt->out); in nft_reject_inet_eval() 27 switch (pkt->ops->pf) { in nft_reject_inet_eval() 31 nf_send_unreach(pkt->skb, priv->icmp_code); in nft_reject_inet_eval() 34 nf_send_reset(pkt->skb, pkt->ops->hooknum); in nft_reject_inet_eval() 37 nf_send_unreach(pkt->skb, in nft_reject_inet_eval() 45 nf_send_unreach6(net, pkt->skb, priv->icmp_code, in nft_reject_inet_eval() 46 pkt->ops->hooknum); in nft_reject_inet_eval() 49 nf_send_reset6(net, pkt->skb, pkt->ops->hooknum); in nft_reject_inet_eval() 52 nf_send_unreach6(net, pkt->skb, in nft_reject_inet_eval() [all …]
|
D | nft_log.c | 31 const struct nft_pktinfo *pkt) in nft_log_eval() argument 34 struct net *net = dev_net(pkt->in ? pkt->in : pkt->out); in nft_log_eval() 36 nf_log_packet(net, pkt->ops->pf, pkt->ops->hooknum, pkt->skb, pkt->in, in nft_log_eval() 37 pkt->out, &priv->loginfo, "%s", priv->prefix); in nft_log_eval()
|
D | nft_meta.c | 29 const struct nft_pktinfo *pkt) in nft_meta_get_eval() argument 32 const struct sk_buff *skb = pkt->skb; in nft_meta_get_eval() 33 const struct net_device *in = pkt->in, *out = pkt->out; in nft_meta_get_eval() 44 dest->data[0] = pkt->ops->pf; in nft_meta_get_eval() 47 dest->data[0] = pkt->tprot; in nft_meta_get_eval() 137 switch (pkt->ops->pf) { in nft_meta_get_eval() 181 const struct nft_pktinfo *pkt) in nft_meta_set_eval() argument 184 struct sk_buff *skb = pkt->skb; in nft_meta_set_eval()
|
/net/ipv6/netfilter/ |
D | nft_reject_ipv6.c | 24 const struct nft_pktinfo *pkt) in nft_reject_ipv6_eval() argument 27 struct net *net = dev_net((pkt->in != NULL) ? pkt->in : pkt->out); in nft_reject_ipv6_eval() 31 nf_send_unreach6(net, pkt->skb, priv->icmp_code, in nft_reject_ipv6_eval() 32 pkt->ops->hooknum); in nft_reject_ipv6_eval() 35 nf_send_reset6(net, pkt->skb, pkt->ops->hooknum); in nft_reject_ipv6_eval()
|
/net/bridge/netfilter/ |
D | nft_reject_bridge.c | 255 const struct nft_pktinfo *pkt) in nft_reject_bridge_eval() argument 258 struct net *net = dev_net((pkt->in != NULL) ? pkt->in : pkt->out); in nft_reject_bridge_eval() 259 const unsigned char *dest = eth_hdr(pkt->skb)->h_dest; in nft_reject_bridge_eval() 265 switch (eth_hdr(pkt->skb)->h_proto) { in nft_reject_bridge_eval() 269 nft_reject_br_send_v4_unreach(pkt->skb, in nft_reject_bridge_eval() 270 pkt->ops->hooknum, in nft_reject_bridge_eval() 274 nft_reject_br_send_v4_tcp_reset(pkt->skb, in nft_reject_bridge_eval() 275 pkt->ops->hooknum); in nft_reject_bridge_eval() 278 nft_reject_br_send_v4_unreach(pkt->skb, in nft_reject_bridge_eval() 279 pkt->ops->hooknum, in nft_reject_bridge_eval() [all …]
|
/net/ipv4/netfilter/ |
D | nft_reject_ipv4.c | 24 const struct nft_pktinfo *pkt) in nft_reject_ipv4_eval() argument 30 nf_send_unreach(pkt->skb, priv->icmp_code); in nft_reject_ipv4_eval() 33 nf_send_reset(pkt->skb, pkt->ops->hooknum); in nft_reject_ipv4_eval()
|
D | nft_masq_ipv4.c | 21 const struct nft_pktinfo *pkt) in nft_masq_ipv4_eval() argument 30 verdict = nf_nat_masquerade_ipv4(pkt->skb, pkt->ops->hooknum, in nft_masq_ipv4_eval() 31 &range, pkt->out); in nft_masq_ipv4_eval()
|
/net/sctp/ |
D | output.c | 189 static sctp_xmit_t sctp_packet_bundle_auth(struct sctp_packet *pkt, in sctp_packet_bundle_auth() argument 192 struct sctp_association *asoc = pkt->transport->asoc; in sctp_packet_bundle_auth() 203 if (chunk->chunk_hdr->type == SCTP_CID_AUTH || pkt->has_auth) in sctp_packet_bundle_auth() 216 retval = __sctp_packet_append_chunk(pkt, auth); in sctp_packet_bundle_auth() 225 static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt, in sctp_packet_bundle_sack() argument 233 if (sctp_chunk_is_data(chunk) && !pkt->has_sack && in sctp_packet_bundle_sack() 234 !pkt->has_cookie_echo) { in sctp_packet_bundle_sack() 237 asoc = pkt->transport->asoc; in sctp_packet_bundle_sack() 244 if (pkt->transport->sack_generation != in sctp_packet_bundle_sack() 245 pkt->transport->asoc->peer.sack_generation) in sctp_packet_bundle_sack() [all …]
|
/net/dccp/ |
D | ccid.h | 65 int (*ccid_hc_rx_parse_options)(struct sock *sk, u8 pkt, 71 int (*ccid_hc_tx_parse_options)(struct sock *sk, u8 pkt, 203 u8 pkt, u8 opt, u8 *val, u8 len) in ccid_hc_tx_parse_options() argument 207 return ccid->ccid_ops->ccid_hc_tx_parse_options(sk, pkt, opt, val, len); in ccid_hc_tx_parse_options() 215 u8 pkt, u8 opt, u8 *val, u8 len) in ccid_hc_rx_parse_options() argument 219 return ccid->ccid_ops->ccid_hc_rx_parse_options(sk, pkt, opt, val, len); in ccid_hc_rx_parse_options()
|