/linux/net/xdp/ |
H A D | xsk_diag.c | 17 static int xsk_diag_put_info(const struct xdp_sock *xs, struct sk_buff *nlskb) in xsk_diag_put_info() argument 23 return nla_put(nlskb, XDP_DIAG_INFO, sizeof(di), &di); in xsk_diag_put_info() 27 struct sk_buff *nlskb) in xsk_diag_put_ring() argument 32 return nla_put(nlskb, nl_type, sizeof(dr), &dr); in xsk_diag_put_ring() 36 struct sk_buff *nlskb) in xsk_diag_put_rings_cfg() argument 41 err = xsk_diag_put_ring(xs->rx, XDP_DIAG_RX_RING, nlskb); in xsk_diag_put_rings_cfg() 43 err = xsk_diag_put_ring(xs->tx, XDP_DIAG_TX_RING, nlskb); in xsk_diag_put_rings_cfg() 47 static int xsk_diag_put_umem(const struct xdp_sock *xs, struct sk_buff *nlskb) in xsk_diag_put_umem() argument 69 err = nla_put(nlskb, XDP_DIAG_UMEM, sizeof(du), &du); in xsk_diag_put_umem() 72 XDP_DIAG_UMEM_FILL_RING, nlskb); in xsk_diag_put_umem() [all …]
|
/linux/net/netfilter/ |
H A D | nfnetlink_hook.c | 61 static struct nlattr *nfnl_start_info_type(struct sk_buff *nlskb, enum nfnl_hook_chaintype t) in nfnl_start_info_type() argument 63 struct nlattr *nest = nla_nest_start(nlskb, NFNLA_HOOK_CHAIN_INFO); in nfnl_start_info_type() 69 ret = nla_put_be32(nlskb, NFNLA_HOOK_INFO_TYPE, htonl(t)); in nfnl_start_info_type() 73 nla_nest_cancel(nlskb, nest); in nfnl_start_info_type() 77 static int nfnl_hook_put_bpf_prog_info(struct sk_buff *nlskb, in nfnl_hook_put_bpf_prog_info() argument 91 nest = nfnl_start_info_type(nlskb, NFNL_HOOK_TYPE_BPF); in nfnl_hook_put_bpf_prog_info() 95 nest2 = nla_nest_start(nlskb, NFNLA_HOOK_INFO_DESC); in nfnl_hook_put_bpf_prog_info() 99 ret = nla_put_be32(nlskb, NFNLA_HOOK_BPF_ID, htonl(prog->aux->id)); in nfnl_hook_put_bpf_prog_info() 103 nla_nest_end(nlskb, nest2); in nfnl_hook_put_bpf_prog_info() 104 nla_nest_end(nlskb, nest); in nfnl_hook_put_bpf_prog_info() [all …]
|
H A D | nf_tables_trace.c | 28 static int trace_fill_header(struct sk_buff *nlskb, u16 type, in trace_fill_header() argument 37 nla = nla_reserve(nlskb, type, len); in trace_fill_header() 44 static int nf_trace_fill_ll_header(struct sk_buff *nlskb, in nf_trace_fill_ll_header() argument 63 return nla_put(nlskb, NFTA_TRACE_LL_HEADER, sizeof(veth), &veth); in nf_trace_fill_ll_header() 66 static int nf_trace_fill_dev_info(struct sk_buff *nlskb, in nf_trace_fill_dev_info() argument 71 if (nla_put_be32(nlskb, NFTA_TRACE_IIF, in nf_trace_fill_dev_info() 75 if (nla_put_be16(nlskb, NFTA_TRACE_IIFTYPE, in nf_trace_fill_dev_info() 81 if (nla_put_be32(nlskb, NFTA_TRACE_OIF, in nf_trace_fill_dev_info() 85 if (nla_put_be16(nlskb, NFTA_TRACE_OIFTYPE, in nf_trace_fill_dev_info() 93 static int nf_trace_fill_pkt_info(struct sk_buff *nlskb, in nf_trace_fill_pkt_info() argument [all …]
|
H A D | nfnetlink_queue.c | 419 nfqnl_put_packet_info(struct sk_buff *nlskb, struct sk_buff *packet, in nfqnl_put_packet_info() argument 432 return flags ? nla_put_be32(nlskb, NFQA_SKB_INFO, htonl(flags)) : 0; in nfqnl_put_packet_info()
|
/linux/net/unix/ |
H A D | diag.c | 14 static int sk_diag_dump_name(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_name() argument 22 return nla_put(nlskb, UNIX_DIAG_NAME, in sk_diag_dump_name() 27 static int sk_diag_dump_vfs(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_vfs() argument 37 return nla_put(nlskb, UNIX_DIAG_VFS, sizeof(uv), &uv); in sk_diag_dump_vfs() 43 static int sk_diag_dump_peer(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_peer() argument 53 return nla_put_u32(nlskb, UNIX_DIAG_PEER, ino); in sk_diag_dump_peer() 59 static int sk_diag_dump_icons(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_icons() argument 69 attr = nla_reserve(nlskb, UNIX_DIAG_ICONS, in sk_diag_dump_icons() 89 static int sk_diag_show_rqlen(struct sock *sk, struct sk_buff *nlskb) in sk_diag_show_rqlen() argument 101 return nla_put(nlskb, UNIX_DIAG_RQLEN, sizeof(rql), &rql); in sk_diag_show_rqlen() [all …]
|
/linux/net/packet/ |
H A D | diag.c | 13 static int pdiag_put_info(const struct packet_sock *po, struct sk_buff *nlskb) in pdiag_put_info() argument 35 return nla_put(nlskb, PACKET_DIAG_INFO, sizeof(pinfo), &pinfo); in pdiag_put_info() 38 static int pdiag_put_mclist(const struct packet_sock *po, struct sk_buff *nlskb) in pdiag_put_mclist() argument 43 mca = nla_nest_start_noflag(nlskb, PACKET_DIAG_MCLIST); in pdiag_put_mclist() 51 dml = nla_reserve_nohdr(nlskb, sizeof(*dml)); in pdiag_put_mclist() 54 nla_nest_cancel(nlskb, mca); in pdiag_put_mclist() 67 nla_nest_end(nlskb, mca); in pdiag_put_mclist() 73 struct sk_buff *nlskb) in pdiag_put_ring() argument 95 return nla_put(nlskb, nl_type, sizeof(pdr), &pdr); in pdiag_put_ring() 113 static int pdiag_put_fanout(struct packet_sock *po, struct sk_buff *nlskb) in pdiag_put_fanout() argument [all …]
|
/linux/net/netlink/ |
H A D | diag.c | 12 static int sk_diag_dump_groups(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_groups() argument 19 return nla_put(nlskb, NETLINK_DIAG_GROUPS, NLGRPSZ(nlk->ngroups), in sk_diag_dump_groups()
|
/linux/net/mptcp/ |
H A D | pm_netlink.c | 2073 static void mptcp_nl_mcast_send(struct net *net, struct sk_buff *nlskb, gfp_t gfp) in mptcp_nl_mcast_send() argument 2076 nlskb, 0, MPTCP_PM_EV_GRP_OFFSET, gfp); in mptcp_nl_mcast_send()
|