Home
last modified time | relevance | path

Searched refs:NLMSG_ALIGN (Results 1 – 25 of 50) sorted by relevance

12

/Linux-v5.4/include/uapi/linux/
Dnetlink.h90 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) macro
91 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
93 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
95 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
96 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
Dnetfilter_decnet.h53 #define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg)))
Dif_addr.h68 #define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
Dgenetlink.h19 #define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
Drtnetlink.h358 #define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
601 #define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
740 #define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
Dtipc_config.h374 #define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr))
Dif_link.h178 #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
/Linux-v5.4/tools/include/uapi/linux/
Dnetlink.h90 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) macro
91 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
93 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
95 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
96 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
Dif_link.h178 #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
/Linux-v5.4/tools/testing/selftests/net/
Dudpgso.c364 char data[NLMSG_ALIGN(sizeof(*nh)) + in set_route_mtu()
365 NLMSG_ALIGN(sizeof(*rt)) + in set_route_mtu()
366 NLMSG_ALIGN(RTA_LENGTH(sizeof(addr6))) + in set_route_mtu()
367 NLMSG_ALIGN(RTA_LENGTH(sizeof(int))) + in set_route_mtu()
368 NLMSG_ALIGN(RTA_LENGTH(0) + RTA_LENGTH(sizeof(int)))]; in set_route_mtu()
382 off += NLMSG_ALIGN(sizeof(*nh)); in set_route_mtu()
391 off += NLMSG_ALIGN(sizeof(*rt)); in set_route_mtu()
400 off += NLMSG_ALIGN(rta->rta_len); in set_route_mtu()
406 off += NLMSG_ALIGN(rta->rta_len); in set_route_mtu()
412 off += NLMSG_ALIGN(rta->rta_len); in set_route_mtu()
/Linux-v5.4/tools/lib/bpf/
Dnetlink.c157 + NLMSG_ALIGN(req.nh.nlmsg_len)); in bpf_set_link_xdp_fd()
198 attr = (struct nlattr *) ((void *) ifi + NLMSG_ALIGN(sizeof(*ifi))); in __dump_link_nlmsg()
315 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_class_nlmsg()
354 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_qdisc_nlmsg()
393 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_filter_nlmsg()
/Linux-v5.4/net/decnet/netfilter/
Ddn_rtmsg.c40 size = NLMSG_ALIGN(rt_skb->len) + in dnrmg_build_message()
41 NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg)); in dnrmg_build_message()
/Linux-v5.4/include/uapi/linux/netfilter/
Dnfnetlink_compat.h60 + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
/Linux-v5.4/drivers/scsi/
Dscsi_netlink.c50 rlen = NLMSG_ALIGN(nlh->nlmsg_len); in scsi_nl_rcv_msg()
/Linux-v5.4/net/phonet/
Dpn_netlink.c30 skb = nlmsg_new(NLMSG_ALIGN(sizeof(struct ifaddrmsg)) + in phonet_address_notify()
196 skb = nlmsg_new(NLMSG_ALIGN(sizeof(struct ifaddrmsg)) + in rtm_phonet_notify()
/Linux-v5.4/include/net/
Dnetlink.h485 return NLMSG_ALIGN(nlmsg_msg_size(payload)); in nlmsg_total_size()
524 return (struct nlattr *) (data + NLMSG_ALIGN(hdrlen)); in nlmsg_attrdata()
534 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen); in nlmsg_attrlen()
560 int totlen = NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_next()
Dgenetlink.h370 return NLMSG_ALIGN(genlmsg_msg_size(payload)); in genlmsg_total_size()
/Linux-v5.4/net/xfrm/
Dxfrm_user.c1096 return NLMSG_ALIGN(4) in xfrm_spdinfo_msgsize()
1223 return NLMSG_ALIGN(4) in xfrm_sadinfo_msgsize()
1965 return NLMSG_ALIGN(sizeof(struct xfrm_aevent_id)) in xfrm_aevent_msgsize()
2442 return NLMSG_ALIGN(sizeof(struct xfrm_userpolicy_id)) in xfrm_migrate_msgsize()
2690 return NLMSG_ALIGN(sizeof(struct xfrm_user_expire)) in xfrm_expire_msgsize()
2761 int len = NLMSG_ALIGN(sizeof(struct xfrm_usersa_flush)); in xfrm_notify_sa_flush()
2842 len += NLMSG_ALIGN(headlen); in xfrm_notify_sa()
2911 return NLMSG_ALIGN(sizeof(struct xfrm_user_acquire)) in xfrm_acquire_msgsize()
3037 return NLMSG_ALIGN(sizeof(struct xfrm_user_polexpire)) in xfrm_polexpire_msgsize()
3111 len += NLMSG_ALIGN(headlen); in xfrm_notify_policy()
[all …]
/Linux-v5.4/net/netfilter/
Dnfnetlink.c472 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in nfnetlink_rcv_batch()
519 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in nfnetlink_rcv_skb_batch()
/Linux-v5.4/drivers/infiniband/core/
Dnetlink.c248 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in rdma_nl_rcv_skb()
Daddr.c166 len += NLMSG_ALIGN(sizeof(*header)); in ib_nl_ip_send_msg()
180 header = skb_put(skb, NLMSG_ALIGN(sizeof(*header))); in ib_nl_ip_send_msg()
/Linux-v5.4/net/core/
Dsock_diag.c115 return NLMSG_ALIGN(sizeof(struct inet_diag_msg) in sock_diag_nlmsg_size()
/Linux-v5.4/net/bridge/
Dbr_mdb.c305 return NLMSG_ALIGN(sizeof(struct br_port_msg)) in rtnl_mdb_nlmsg_size()
497 return NLMSG_ALIGN(sizeof(struct br_port_msg)) in rtnl_rtr_nlmsg_size()
/Linux-v5.4/tools/accounting/
Dgetdelays.c141 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd()
/Linux-v5.4/net/netlink/
Daf_netlink.c2170 nlh = skb_put(skb, NLMSG_ALIGN(size)); in __nlmsg_put()
2176 if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0) in __nlmsg_put()
2177 memset(nlmsg_data(nlh) + len, 0, NLMSG_ALIGN(size) - size); in __nlmsg_put()
2486 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in netlink_rcv_skb()

12