Home
last modified time | relevance | path

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

/freebsd/contrib/wpa/src/drivers/
H A Dpriv_netlink.h49 #define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1)) macro
50 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
51 #define NLMSG_LENGTH(len) ((len) + NLMSG_ALIGN(sizeof(struct nlmsghdr)))
52 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
H A Dnetlink.c31 (u8 *) NLMSG_DATA(h) + NLMSG_ALIGN(sizeof(struct ifinfomsg)), in netlink_receive_link()
199 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)), in netlink_send_oper_ifla()
208 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)), in netlink_send_oper_ifla()
/freebsd/crypto/heimdal/lib/roken/
H A Dgetifaddrs.c277 char reqbuf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in nl_sendreq()
278 NLMSG_ALIGN(sizeof(struct rtgenmsg))]; in nl_sendreq()
558 NLMSG_ALIGN(sizeof(struct ifaddrs[icnt])) in rk_getifaddrs()
562 NLMSG_ALIGN(sizeof(char *[max_ifindex+1])) in rk_getifaddrs()
563 + NLMSG_ALIGN(sizeof(uint16_t [max_ifindex+1]))); in rk_getifaddrs()
577 data += NLMSG_ALIGN(sizeof(struct ifaddrs)) * icnt; in rk_getifaddrs()
581 ifflist = (uint16_t *)(((char *)iflist) + NLMSG_ALIGN(sizeof(char *[max_ifindex+1]))); in rk_getifaddrs()
644 rtasize = NLMSG_PAYLOAD(nlh, nlmlen) - NLMSG_ALIGN(nlm_struct_size); in rk_getifaddrs()
645 for (rta = (struct rtattr *)(((char *)NLMSG_DATA(nlh)) + NLMSG_ALIGN(nlm_struct_size)); in rk_getifaddrs()
664 sockaddr_size = NLMSG_ALIGN(sa_len); in rk_getifaddrs()
[all …]
/freebsd/sys/netlink/
H A Dnetlink.h210 #define NLMSG_ALIGN(_len) NL_ITEM_ALIGN(_len) macro
216 #define NLMSG_SPACE(_len) NLMSG_ALIGN(NLMSG_LENGTH(_len))
219 #define _NLMSG_ALIGNED_LEN(_hdr) NLMSG_ALIGN(_NLMSG_LEN(_hdr))
225 #define NLMSG_HDRLEN (NLMSG_ALIGN(sizeof(struct nlmsghdr)))
H A Dnetlink_snl.h311 ssize_t sz = NLMSG_ALIGN(hdr->nlmsg_len); in snl_send_message()
366 ss->off += NLMSG_ALIGN(hdr->nlmsg_len); in snl_read_message_dbg()
398 ss->off += NLMSG_ALIGN(hdr->nlmsg_len); in snl_read_message()
972 int hdrlen = sizeof(int) + NLMSG_ALIGN(errmsg->msg.nlmsg_len); in snl_parse_errmsg()
H A Dnetlink_io.c348 int msglen = NLMSG_ALIGN(hdr->nlmsg_len); in nl_process_nbuf()
/freebsd/contrib/libpcap/
H A Dpcap-netfilter-linux.c69 #define HDR_LENGTH (NLMSG_LENGTH(NLMSG_ALIGN(sizeof(struct nfgenmsg))))
217 int attr_len = nlh->nlmsg_len - NLMSG_ALIGN(HDR_LENGTH); in netfilter_read_linux()
252 pkth.caplen = pkth.len = nlh->nlmsg_len-NLMSG_ALIGN(sizeof(struct nlmsghdr)); in netfilter_read_linux()
277 msg_len = NLMSG_ALIGN(nlh->nlmsg_len); in netfilter_read_linux()
368 struct nfattr *nfa = (struct nfattr *) (buf + NLMSG_ALIGN(nlh->nlmsg_len)); in netfilter_send_config_msg()
373 nlh->nlmsg_len = NLMSG_ALIGN(nlh->nlmsg_len) + NFA_ALIGN(nfa->nfa_len); in netfilter_send_config_msg()
413 if (nlh->nlmsg_len < NLMSG_ALIGN(sizeof(struct nlmsgerr))) { in netfilter_send_config_msg()
/freebsd/sys/compat/linux/
H A Dlinux_netlink.c205 out_hdr = nlmsg_reserve_data(nw, NLMSG_ALIGN(hdr->nlmsg_len), char); in handle_default_out()
226 memcpy(next_hdr, hdr + 1, NLMSG_ALIGN(sz)); in _nlmsg_copy_next_header()
530 dst_payload = nlmsg_reserve_data(nw, NLMSG_ALIGN(copy_len), char); in nlmsg_error_to_linux()
589 msglen = NLMSG_ALIGN(hdr->nlmsg_len); in nlmsgs_to_linux()
/freebsd/contrib/libfido2/src/
H A Dnetlink.c38 #define NLA_HDRLEN NLMSG_ALIGN(sizeof(struct nlattr))
138 (skip = NLMSG_ALIGN(nlalen)) > *len || in nla_from_buf()
196 (skip = NLMSG_ALIGN(msglen)) > *len || in nlmsg_from_buf()
277 if ((skip = NLMSG_ALIGN(len)) > UINT16_MAX - sizeof(a.u) || in nlmsg_setattr()
/freebsd/contrib/wpa/src/ap/
H A Dvlan_full.c648 nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg)); in vlan_read_ifnames()