Home
last modified time | relevance | path

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

123

/linux/tools/testing/selftests/net/mptcp/
H A Dpm_nl_ctl.c57 off += NLMSG_ALIGN(sizeof(*nh)); in init_genl_req()
62 off += NLMSG_ALIGN(sizeof(*gh)); in init_genl_req()
104 u_int8_t buffer[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in capture_events()
105 NLMSG_ALIGN(sizeof(struct genlmsghdr)) + 1024]; in capture_events()
123 res_len = NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in capture_events()
124 NLMSG_ALIGN(sizeof(struct genlmsghdr)) + 1024; in capture_events()
326 char data[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in resolve_mptcp_pm_netlink()
327 NLMSG_ALIGN(sizeof(struct genlmsghdr)) + in resolve_mptcp_pm_netlink()
343 off += NLMSG_ALIGN(rta->rta_len); in resolve_mptcp_pm_netlink()
351 char data[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in dsf()
[all …]
/linux/tools/testing/selftests/bpf/
H A Dnetlink_helpers.c211 status -= NLMSG_ALIGN(len); in __rtnl_talk_iov()
212 h = (struct nlmsghdr *)((char *)h + NLMSG_ALIGN(len)); in __rtnl_talk_iov()
249 status -= NLMSG_ALIGN(len); in __rtnl_talk_iov()
250 h = (struct nlmsghdr *)((char *)h + NLMSG_ALIGN(len)); in __rtnl_talk_iov()
318 if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) { in addattr_l()
328 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len); in addattr_l()
334 if (NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) { in addraw_l()
341 memset((void *) NLMSG_TAIL(n) + len, 0, NLMSG_ALIGN(len) - len); in addraw_l()
342 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len); in addraw_l()
H A Dnetlink_helpers.h24 ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
H A Dxsk.c409 rta = (struct rtattr *)(((char *)&req) + NLMSG_ALIGN(req.nh.nlmsg_len)); in xsk_set_mtu()
412 req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + RTA_LENGTH(sizeof(mtu)); in xsk_set_mtu()
/linux/tools/include/uapi/linux/
H A 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)))
H A Dif_addr.h69 #define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
H A Dgenetlink.h19 #define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
H A Drtnetlink.h407 #define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
663 #define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
817 #define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
/linux/include/uapi/linux/
H A Dnetlink.h99 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) macro
100 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
102 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
104 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
106 NLMSG_ALIGN((nlh)->nlmsg_len)))
H A Dif_addr.h69 #define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
H A Dgenetlink.h19 #define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
H A Drtnetlink.h407 #define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
663 #define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
817 #define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
H A Dtipc_config.h370 #define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr))
/linux/tools/lib/bpf/
H A Dnlattr.h138 return (struct nlattr *)((void *)req + NLMSG_ALIGN(req->nh.nlmsg_len)); in req_tail()
146 if (NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(NLA_HDRLEN + len) > sizeof(*req)) in nlattr_add()
156 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add()
H A Dnetlink.c354 attr = (struct nlattr *) ((void *) ifi + NLMSG_ALIGN(sizeof(*ifi))); in __dump_link_nlmsg()
704 (struct nlattr *)((void *)tc + NLMSG_ALIGN(sizeof(*tc))), in get_tc_info()
/linux/tools/net/ynl/lib/
H A Dynl-priv.h184 nlh->nlmsg_len += NLMSG_ALIGN(size); in ynl_nlmsg_put_extra_header()
252 attr = (struct nlattr *)((char *)start + NLMSG_ALIGN(skip)); in ynl_attr_first()
262 o = nlh->nlmsg_len + NLA_HDRLEN + NLMSG_ALIGN(size) > nlh->nlmsg_pid; in __ynl_attr_put_overflow()
307 nlh->nlmsg_len += NLMSG_ALIGN(attr->nla_len); in ynl_attr_put()
326 nlh->nlmsg_len += NLMSG_ALIGN(attr->nla_len); in ynl_attr_put_str()
/linux/include/uapi/linux/netfilter/
H A Dnfnetlink_compat.h60 + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
/linux/drivers/scsi/
H A Dscsi_netlink.c50 rlen = NLMSG_ALIGN(nlh->nlmsg_len); in scsi_nl_rcv_msg()
/linux/net/phonet/
H A Dpn_netlink.c30 skb = nlmsg_new(NLMSG_ALIGN(sizeof(struct ifaddrmsg)) + in phonet_address_notify()
208 skb = nlmsg_new(NLMSG_ALIGN(sizeof(struct rtmsg)) + in rtm_phonet_notify()
/linux/tools/bpf/bpftool/
H A Dnet.c222 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_class_nlmsg()
261 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_qdisc_nlmsg()
300 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_filter_nlmsg()
339 attr = (struct nlattr *) ((void *) ifi + NLMSG_ALIGN(sizeof(*ifi))); in __dump_link_nlmsg()
/linux/net/xfrm/
H A Dxfrm_user.c1607 return NLMSG_ALIGN(4) in xfrm_spdinfo_msgsize()
1744 return NLMSG_ALIGN(4) in xfrm_sadinfo_msgsize()
2472 int len = NLMSG_ALIGN(sizeof(*up)); in xfrm_notify_userpolicy()
2535 int len = NLMSG_ALIGN(sizeof(struct xfrm_userpolicy_default)); in xfrm_get_default()
2673 return NLMSG_ALIGN(sizeof(struct xfrm_aevent_id)) in xfrm_aevent_msgsize()
3218 return NLMSG_ALIGN(sizeof(struct xfrm_userpolicy_id)) in xfrm_migrate_msgsize()
3553 return NLMSG_ALIGN(sizeof(struct xfrm_user_expire)) + in xfrm_expire_msgsize()
3637 int len = NLMSG_ALIGN(sizeof(struct xfrm_usersa_flush)); in xfrm_notify_sa_flush()
3732 len += NLMSG_ALIGN(headlen); in xfrm_notify_sa()
3801 return NLMSG_ALIGN(sizeof(struct xfrm_user_acquire)) in xfrm_acquire_msgsize()
[all …]
/linux/drivers/infiniband/core/
H A Dnetlink.c248 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in rdma_nl_rcv_skb()
/linux/tools/testing/selftests/landlock/
H A Daudit.h148 NLMSG_ALIGN(filter->exe_len), in audit_filter_exe()
/linux/tools/testing/selftests/net/ovpn/
H A Dovpn-cli.c1087 if ((int)(NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len)) > maxlen) {
1102 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len); in ovpn_nest_end()
1345 rcv_len -= NLMSG_ALIGN(len); in ovpn_rt_send()
1347 NLMSG_ALIGN(len)); in ovpn_rt_send()
/linux/net/bridge/
H A Dbr_mdb.c513 return NLMSG_ALIGN(sizeof(struct br_port_msg)) + in rtnl_mdb_nlmsg_size()
612 return NLMSG_ALIGN(sizeof(struct br_port_msg)) in rtnl_rtr_nlmsg_size()
1606 nlmsg_size = NLMSG_ALIGN(sizeof(struct br_port_msg)) + in br_mdb_get_reply_alloc()

123