Home
last modified time | relevance | path

Searched refs:nw (Results 1 – 25 of 116) sorted by relevance

12345

/freebsd/sys/netlink/
H A Dnetlink_message_writer.c48 nlmsg_get_buf(struct nl_writer *nw, size_t len, bool waitok) in nlmsg_get_buf() argument
52 MPASS(nw->buf == NULL); in nlmsg_get_buf()
54 NL_LOG(LOG_DEBUG3, "Setting up nw %p len %zu %s", nw, len, in nlmsg_get_buf()
57 nw->buf = nl_buf_alloc(len, mflag); in nlmsg_get_buf()
58 if (__predict_false(nw->buf == NULL)) in nlmsg_get_buf()
60 nw->hdr = NULL; in nlmsg_get_buf()
61 nw->malloc_flag = mflag; in nlmsg_get_buf()
62 nw->num_messages = 0; in nlmsg_get_buf()
63 nw->enomem = false; in nlmsg_get_buf()
69 nl_send_one(struct nl_writer *nw) in nl_send_one() argument
[all …]
H A Dnetlink_message_writer.h43 typedef bool nl_writer_cb(struct nl_writer *nw);
75 bool _nlmsg_flush(struct nl_writer *nw);
76 void _nlmsg_ignore_limit(struct nl_writer *nw);
78 bool _nlmsg_refill_buffer(struct nl_writer *nw, size_t required_len);
79 bool _nlmsg_add(struct nl_writer *nw, uint32_t portid, uint32_t seq,
81 bool _nlmsg_end(struct nl_writer *nw);
82 void _nlmsg_abort(struct nl_writer *nw);
84 bool _nlmsg_end_dump(struct nl_writer *nw, int error, struct nlmsghdr *hdr);
88 nl_writer_unicast(struct nl_writer *nw, size_t size, struct nlpcb *nlp, in nl_writer_unicast() argument
91 return (_nl_writer_unicast(nw, size, nlp, waitok)); in nl_writer_unicast()
[all …]
H A Dnetlink_glue.c113 nl_writer_unicast_stub(struct nl_writer *nw, size_t size, struct nlpcb *nlp, in nl_writer_unicast_stub() argument
116 return (get_stub_writer(nw)); in nl_writer_unicast_stub()
120 nl_writer_group_stub(struct nl_writer *nw, size_t size, uint16_t protocol, in nl_writer_group_stub() argument
123 return (get_stub_writer(nw)); in nl_writer_group_stub()
127 nlmsg_flush_stub(struct nl_writer *nw __unused) in nlmsg_flush_stub()
133 nlmsg_ignore_limit_stub(struct nl_writer *nw __unused) in nlmsg_ignore_limit_stub()
138 nlmsg_refill_buffer_stub(struct nl_writer *nw __unused, in nlmsg_refill_buffer_stub()
145 nlmsg_add_stub(struct nl_writer *nw, uint32_t portid, uint32_t seq, uint16_t type, in nlmsg_add_stub() argument
152 nlmsg_end_stub(struct nl_writer *nw __unused) in nlmsg_end_stub()
158 nlmsg_abort_stub(struct nl_writer *nw __unused) in nlmsg_abort_stub()
[all …]
H A Dnetlink_snl.h1155 snl_init_writer(struct snl_state *ss, struct snl_writer *nw) in snl_init_writer() argument
1157 nw->size = SNL_WRITER_BUFFER_SIZE; in snl_init_writer()
1158 nw->base = (char *)snl_allocz(ss, nw->size); in snl_init_writer()
1159 if (__predict_false(nw->base == NULL)) { in snl_init_writer()
1160 nw->error = true; in snl_init_writer()
1161 nw->size = 0; in snl_init_writer()
1163 nw->error = false; in snl_init_writer()
1165 nw->offset = 0; in snl_init_writer()
1166 nw->hdr = NULL; in snl_init_writer()
1167 nw->ss = ss; in snl_init_writer()
[all …]
H A Dnetlink_io.c201 nl_send(struct nl_writer *nw, struct nlpcb *nlp) in nl_send() argument
207 MPASS(nw->hdr == NULL); in nl_send()
208 MPASS(nw->buf != NULL); in nl_send()
209 MPASS(nw->buf->datalen > 0); in nl_send()
212 struct nlmsghdr *hdr = (struct nlmsghdr *)nw->buf->data; in nl_send()
215 nw->buf->datalen, nw->num_messages, hdr->nlmsg_type, in nl_send()
220 nb = linux_netlink_p->msgs_to_linux(nw->buf, nlp, nw->ifp); in nl_send()
221 nl_buf_free(nw->buf); in nl_send()
222 nw->buf = NULL; in nl_send()
226 nb = nw->buf; in nl_send()
[all …]
H A Dnetlink_generic.c178 const struct genl_family *gf, struct nl_writer *nw) in dump_family() argument
180 if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) in dump_family()
183 struct genlmsghdr *ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); in dump_family()
188 nlattr_add_string(nw, CTRL_ATTR_FAMILY_NAME, gf->family_name); in dump_family()
189 nlattr_add_u16(nw, CTRL_ATTR_FAMILY_ID, genl_family_id(gf)); in dump_family()
190 nlattr_add_u32(nw, CTRL_ATTR_VERSION, gf->family_version); in dump_family()
191 nlattr_add_u32(nw, CTRL_ATTR_HDRSIZE, gf->family_hdrsize); in dump_family()
192 nlattr_add_u32(nw, CTRL_ATTR_MAXATTR, gf->family_attr_max); in dump_family()
195 int off = nlattr_add_nested(nw, CTRL_ATTR_OPS); in dump_family()
202 int cmd_off = nlattr_add_nested(nw, ++cnt); in dump_family()
[all …]
H A Dnetlink_sysevent.c83 struct nl_writer nw; in sysevent_write() local
85 if (!nl_writer_group(&nw, NLMSG_LARGE, NETLINK_GENERIC, se->id, 0, in sysevent_write()
91 if (!nlmsg_reply(&nw, &hdr, sizeof(struct genlmsghdr))) { in sysevent_write()
95 struct genlmsghdr *ghdr = nlmsg_reserve_object(&nw, struct genlmsghdr); in sysevent_write()
103 nlattr_add_string(&nw, NLSE_ATTR_SYSTEM, se->name); in sysevent_write()
104 nlattr_add_string(&nw, NLSE_ATTR_SUBSYSTEM, subsystem); in sysevent_write()
105 nlattr_add_string(&nw, NLSE_ATTR_TYPE, type); in sysevent_write()
107 nlattr_add_string(&nw, NLSE_ATTR_DATA, data); in sysevent_write()
108 nlmsg_end(&nw); in sysevent_write()
109 nlmsg_flush(&nw); in sysevent_write()
/freebsd/sbin/ifconfig/
H A Difgeneve.c199 geneve_nl_init(if_ctx *ctx, struct snl_writer *nw, uint32_t flags) in geneve_nl_init() argument
203 snl_init_writer(ctx->io_ss, nw); in geneve_nl_init()
204 hdr = snl_create_msg_request(nw, NL_RTM_NEWLINK); in geneve_nl_init()
206 snl_reserve_msg_object(nw, struct ifinfomsg); in geneve_nl_init()
207 snl_add_msg_attr_string(nw, IFLA_IFNAME, ctx->ifname); in geneve_nl_init()
211 geneve_nl_fini(if_ctx *ctx, struct snl_writer *nw) in geneve_nl_fini() argument
216 hdr = snl_finalize_msg(nw); in geneve_nl_fini()
286 struct snl_writer nw; in geneve_status_nl() local
298 snl_init_writer(ctx->io_ss, &nw); in geneve_status_nl()
299 hdr = snl_create_msg_request(&nw, NL_RTM_GETLINK); in geneve_status_nl()
[all …]
H A Difgre.c73 gre_nl_init(if_ctx *ctx, struct snl_writer *nw, uint32_t flags) in gre_nl_init() argument
77 snl_init_writer(ctx->io_ss, nw); in gre_nl_init()
78 hdr = snl_create_msg_request(nw, NL_RTM_NEWLINK); in gre_nl_init()
80 snl_reserve_msg_object(nw, struct ifinfomsg); in gre_nl_init()
81 snl_add_msg_attr_string(nw, IFLA_IFNAME, ctx->ifname); in gre_nl_init()
85 gre_nl_fini(if_ctx *ctx, struct snl_writer *nw) in gre_nl_fini() argument
90 hdr = snl_finalize_msg(nw); in gre_nl_fini()
143 struct snl_writer nw = {}; in gre_status_nl() local
151 snl_init_writer(ctx->io_ss, &nw); in gre_status_nl()
152 hdr = snl_create_msg_request(&nw, NL_RTM_GETLINK); in gre_status_nl()
[all …]
H A Difgif.c78 gif_nl_init(if_ctx *ctx, struct snl_writer *nw, uint32_t flags) in gif_nl_init() argument
82 snl_init_writer(ctx->io_ss, nw); in gif_nl_init()
83 hdr = snl_create_msg_request(nw, NL_RTM_NEWLINK); in gif_nl_init()
85 snl_reserve_msg_object(nw, struct ifinfomsg); in gif_nl_init()
86 snl_add_msg_attr_string(nw, IFLA_IFNAME, ctx->ifname); in gif_nl_init()
90 gif_nl_fini(if_ctx *ctx, struct snl_writer *nw) in gif_nl_fini() argument
95 hdr = snl_finalize_msg(nw); in gif_nl_fini()
143 struct snl_writer nw; in gif_status_nl() local
151 snl_init_writer(ctx->io_ss, &nw); in gif_status_nl()
152 hdr = snl_create_msg_request(&nw, NL_RTM_GETLINK); in gif_status_nl()
[all …]
/freebsd/tests/sys/netlink/
H A Dtest_snl.c57 struct snl_writer nw; in ATF_TC_BODY() local
64 snl_init_writer(&ss, &nw); in ATF_TC_BODY()
65 hdr = snl_create_msg_request(&nw, RTM_NEWLINK); in ATF_TC_BODY()
67 ATF_REQUIRE(snl_reserve_msg_object(&nw, struct ifinfomsg) != NULL); in ATF_TC_BODY()
69 fbsd_off = snl_add_msg_attr_nested(&nw, IFLA_FREEBSD); in ATF_TC_BODY()
71 caps_off = snl_add_msg_attr_nested(&nw, IFLAF_CAPS); in ATF_TC_BODY()
73 ATF_REQUIRE(snl_add_msg_attr_u32(&nw, NLA_BITSET_SIZE, 32)); in ATF_TC_BODY()
76 ATF_REQUIRE(snl_add_msg_attr(&nw, NLA_BITSET_MASK, sizeof(mask), in ATF_TC_BODY()
78 ATF_REQUIRE(snl_add_msg_attr(&nw, NLA_BITSET_VALUE, sizeof(value), in ATF_TC_BODY()
80 bits_off = snl_add_msg_attr_nested(&nw, NLA_BITSET_BITS); in ATF_TC_BODY()
[all …]
H A Dtest_rtnl_route.c28 prepare_rtm_by_dst(struct snl_writer *nw, char *dst) in prepare_rtm_by_dst() argument
34 rtm = snl_reserve_msg_object(nw, struct rtmsg); in prepare_rtm_by_dst()
43 snl_add_msg_attr_ip4(nw, RTA_DST, &in_dst); in prepare_rtm_by_dst()
49 cleanup_route_by_dst(struct snl_state *ss, struct snl_writer *nw, char *dst) in cleanup_route_by_dst() argument
55 snl_init_writer(ss, nw); in cleanup_route_by_dst()
56 ATF_REQUIRE((hdr = snl_create_msg_request(nw, RTM_DELROUTE)) != NULL); in cleanup_route_by_dst()
57 ATF_REQUIRE(prepare_rtm_by_dst(nw, dst) != NULL); in cleanup_route_by_dst()
58 ATF_REQUIRE((hdr = snl_finalize_msg(nw)) != NULL); in cleanup_route_by_dst()
74 struct snl_writer nw; in ATF_TC_BODY() local
89 snl_init_writer(&ss, &nw); in ATF_TC_BODY()
[all …]
H A Dtest_rtnl_gre.c89 struct snl_writer nw; in ATF_TC_BODY() local
101 snl_init_writer(&ss, &nw); in ATF_TC_BODY()
102 ATF_REQUIRE((hdr = snl_create_msg_request(&nw, RTM_NEWLINK)) != NULL); in ATF_TC_BODY()
104 snl_reserve_msg_object(&nw, struct ifinfomsg); in ATF_TC_BODY()
107 snl_add_msg_attr_string(&nw, IFLA_IFNAME, "gre10"); in ATF_TC_BODY()
108 off = snl_add_msg_attr_nested(&nw, IFLA_LINKINFO); in ATF_TC_BODY()
109 snl_add_msg_attr_string(&nw, IFLA_INFO_KIND, "gre"); in ATF_TC_BODY()
110 off2 = snl_add_msg_attr_nested(&nw, IFLA_INFO_DATA); in ATF_TC_BODY()
114 snl_add_msg_attr_ip4(&nw, IFLA_GRE_LOCAL, &src); in ATF_TC_BODY()
115 snl_add_msg_attr_ip4(&nw, IFLA_GRE_REMOTE, &dst); in ATF_TC_BODY()
[all …]
H A Dtest_rtnl_gif.c83 struct snl_writer nw; in ATF_TC_BODY() local
95 snl_init_writer(&ss, &nw); in ATF_TC_BODY()
96 ATF_REQUIRE((hdr = snl_create_msg_request(&nw, RTM_NEWLINK)) != NULL); in ATF_TC_BODY()
98 snl_reserve_msg_object(&nw, struct ifinfomsg); in ATF_TC_BODY()
101 snl_add_msg_attr_string(&nw, IFLA_IFNAME, "gif10"); in ATF_TC_BODY()
102 off = snl_add_msg_attr_nested(&nw, IFLA_LINKINFO); in ATF_TC_BODY()
103 snl_add_msg_attr_string(&nw, IFLA_INFO_KIND, "gif"); in ATF_TC_BODY()
104 off2 = snl_add_msg_attr_nested(&nw, IFLA_INFO_DATA); in ATF_TC_BODY()
108 snl_add_msg_attr_ip4(&nw, IFLA_IPTUN_LOCAL, &src); in ATF_TC_BODY()
109 snl_add_msg_attr_ip4(&nw, IFLA_IPTUN_REMOTE, &dst); in ATF_TC_BODY()
[all …]
/freebsd/sys/netpfil/pf/
H A Dpf_nl.c54 static bool nlattr_add_labels(struct nl_writer *nw, int attrtype,
56 static bool nlattr_add_rule(struct nl_writer *nw, const struct pf_krule *rule);
92 dump_addr(struct nl_writer *nw, int attr, const struct pf_addr *addr, int af) in dump_addr() argument
96 nlattr_add(nw, attr, 4, &addr->v4); in dump_addr()
99 nlattr_add(nw, attr, 16, &addr->v6); in dump_addr()
105 dump_state_peer(struct nl_writer *nw, int attr, const struct pf_state_peer *peer) in dump_state_peer() argument
107 int off = nlattr_add_nested(nw, attr); in dump_state_peer()
112 nlattr_add_u32(nw, PF_STP_SEQLO, peer->seqlo); in dump_state_peer()
113 nlattr_add_u32(nw, PF_STP_SEQHI, peer->seqhi); in dump_state_peer()
114 nlattr_add_u32(nw, PF_STP_SEQDIFF, peer->seqdiff); in dump_state_peer()
[all …]
/freebsd/sys/compat/linux/
H A Dlinux_netlink.c202 handle_default_out(struct nlmsghdr *hdr, struct nl_writer *nw) in handle_default_out() argument
205 out_hdr = nlmsg_reserve_data(nw, NLMSG_ALIGN(hdr->nlmsg_len), char); in handle_default_out()
209 nw->num_messages++; in handle_default_out()
216 nlmsg_copy_header(struct nlmsghdr *hdr, struct nl_writer *nw) in nlmsg_copy_header() argument
218 return (nlmsg_add(nw, hdr->nlmsg_pid, hdr->nlmsg_seq, hdr->nlmsg_type, in nlmsg_copy_header()
223 _nlmsg_copy_next_header(struct nlmsghdr *hdr, struct nl_writer *nw, int sz) in _nlmsg_copy_next_header() argument
225 void *next_hdr = nlmsg_reserve_data(nw, sz, void); in _nlmsg_copy_next_header()
234 nlmsg_copy_nla(const struct nlattr *nla_orig, struct nl_writer *nw) in nlmsg_copy_nla() argument
236 struct nlattr *nla = nlmsg_reserve_data(nw, nla_orig->nla_len, struct nlattr); in nlmsg_copy_nla()
248 nlmsg_translate_ifname_nla(struct nlattr *nla, struct nl_writer *nw) in nlmsg_translate_ifname_nla() argument
[all …]
/freebsd/usr.sbin/arp/
H A Darp_netlink.c57 struct snl_writer nw; in get_link_info() local
59 snl_init_writer(ss, &nw); in get_link_info()
61 struct nlmsghdr *hdr = snl_create_msg_request(&nw, RTM_GETLINK); in get_link_info()
62 struct ifinfomsg *ifmsg = snl_reserve_msg_object(&nw, struct ifinfomsg); in get_link_info()
65 if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) in get_link_info()
108 struct snl_writer nw; in guess_ifindex() local
111 snl_init_writer(ss, &nw); in guess_ifindex()
113 struct nlmsghdr *hdr = snl_create_msg_request(&nw, RTM_GETROUTE); in guess_ifindex()
114 struct rtmsg *rtm = snl_reserve_msg_object(&nw, struct rtmsg); in guess_ifindex()
118 snl_add_msg_attr_ip(&nw, RTA_DST, (struct sockaddr *)&dst); in guess_ifindex()
[all …]
/freebsd/lib/libpfctl/
H A Dlibpfctl.c123 struct snl_writer nw; in pfctl_do_netlink_cmd() local
127 snl_init_writer(&h->ss, &nw); in pfctl_do_netlink_cmd()
128 hdr = snl_create_genl_msg_request(&nw, h->family_id, cmd); in pfctl_do_netlink_cmd()
130 hdr = snl_finalize_msg(&nw); in pfctl_do_netlink_cmd()
416 struct snl_writer nw; in pfctl_get_status_h() local
419 snl_init_writer(&h->ss, &nw); in pfctl_get_status_h()
420 hdr = snl_create_genl_msg_request(&nw, h->family_id, in pfctl_get_status_h()
424 hdr = snl_finalize_msg(&nw); in pfctl_get_status_h()
1103 snl_add_msg_attr_addr_wrap(struct snl_writer *nw, uint32_t type, const struct pf_addr_wrap *addr) in snl_add_msg_attr_addr_wrap() argument
1107 off = snl_add_msg_attr_nested(nw, type); in snl_add_msg_attr_addr_wrap()
[all …]
/freebsd/sys/netlink/route/
H A Diface.c64 struct nl_writer *nw; member
150 get_stats(struct nl_writer *nw, if_t ifp) in get_stats() argument
155 struct nlattr *nla = nlmsg_reserve_data(nw, nla_len, struct nlattr); in get_stats()
199 get_hwaddr(struct nl_writer *nw, if_t ifp) in get_hwaddr() argument
204 nlattr_add(nw, IFLAF_ORIG_HWADDR, if_getaddrlen(ifp), in get_hwaddr()
212 struct nl_writer *nw = (struct nl_writer *)_arg; in dump_group_cb() local
215 off = nlattr_add_nested(nw, IFLAF_GROUP); in dump_group_cb()
219 if (!nlattr_add_string(nw, IFLAF_GROUP, ifg->ifg_group)) in dump_group_cb()
222 nlattr_set_len(nw, off); in dump_group_cb()
227 dump_group(struct nl_writer *nw, if_t ifp) in dump_group() argument
[all …]
H A Drt.c124 dump_rc_nhop_gw(struct nl_writer *nw, const struct nhop_object *nh) in dump_rc_nhop_gw() argument
135 nlattr_add(nw, NL_RTA_GATEWAY, 4, &nh->gw4_sa.sin_addr); in dump_rc_nhop_gw()
144 nlattr_add(nw, NL_RTA_GATEWAY, 16, &gw6); in dump_rc_nhop_gw()
154 nlattr_add(nw, NL_RTA_VIA, 17, via); in dump_rc_nhop_gw()
162 dump_rc_nhop_prefsrc(struct nl_writer *nw, const struct nhop_object *nh) in dump_rc_nhop_prefsrc() argument
175 nlattr_add(nw, NL_RTA_PREFSRC, 4, in dump_rc_nhop_prefsrc()
183 nlattr_add(nw, NL_RTA_PREFSRC, 16, &in6); in dump_rc_nhop_prefsrc()
190 dump_rc_nhop_mtu(struct nl_writer *nw, const struct nhop_object *nh) in dump_rc_nhop_mtu() argument
193 struct nlattr *nla = nlmsg_reserve_data(nw, nla_len, struct nlattr); in dump_rc_nhop_mtu()
206 dump_rc_nhg(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtmsg *rtm) in dump_rc_nhg() argument
[all …]
/freebsd/usr.sbin/ndp/
H A Dndp_netlink.c69 struct snl_writer nw; in get_link_info() local
71 snl_init_writer(ss, &nw); in get_link_info()
73 struct nlmsghdr *hdr = snl_create_msg_request(&nw, RTM_GETLINK); in get_link_info()
74 struct ifinfomsg *ifmsg = snl_reserve_msg_object(&nw, struct ifinfomsg); in get_link_info()
77 if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) in get_link_info()
136 struct snl_writer nw; in guess_ifindex() local
144 snl_init_writer(ss, &nw); in guess_ifindex()
146 struct nlmsghdr *hdr = snl_create_msg_request(&nw, RTM_GETROUTE); in guess_ifindex()
147 struct rtmsg *rtm = snl_reserve_msg_object(&nw, struct rtmsg); in guess_ifindex()
150 snl_add_msg_attr_ip(&nw, RTA_DST, (struct sockaddr *)dst); in guess_ifindex()
[all …]
/freebsd/lib/libifconfig/
H A Dlibifconfig_carp.c73 struct snl_writer nw; in _ifconfig_carp_get() local
88 snl_init_writer(&ss, &nw); in _ifconfig_carp_get()
96 hdr = snl_create_genl_msg_request(&nw, family_id, CARP_NL_CMD_GET); in _ifconfig_carp_get()
99 snl_add_msg_attr_string(&nw, CARP_NL_IFNAME, name); in _ifconfig_carp_get()
102 snl_add_msg_attr_u32(&nw, CARP_NL_VHID, vhid); in _ifconfig_carp_get()
104 hdr = snl_finalize_msg(&nw); in _ifconfig_carp_get()
150 struct snl_writer nw; in ifconfig_carp_set_info() local
162 snl_init_writer(&ss, &nw); in ifconfig_carp_set_info()
169 hdr = snl_create_genl_msg_request(&nw, family_id, CARP_NL_CMD_SET); in ifconfig_carp_set_info()
171 snl_add_msg_attr_u32(&nw, CARP_NL_VHID, carpr->carpr_vhid); in ifconfig_carp_set_info()
[all …]
/freebsd/sbin/pflowctl/
H A Dpflowctl.c99 struct snl_writer nw; in list() local
109 snl_init_writer(&ss, &nw); in list()
110 hdr = snl_create_genl_msg_request(&nw, family_id, PFLOWNL_CMD_LIST); in list()
112 hdr = snl_finalize_msg(&nw); in list()
151 struct snl_writer nw; in create() local
161 snl_init_writer(&ss, &nw); in create()
162 hdr = snl_create_genl_msg_request(&nw, family_id, PFLOWNL_CMD_CREATE); in create()
164 hdr = snl_finalize_msg(&nw); in create()
189 struct snl_writer nw; in del() local
203 snl_init_writer(&ss, &nw); in del()
[all …]
/freebsd/sys/tests/
H A Dktest.c82 create_reply(struct nl_writer *nw, struct nlmsghdr *hdr, int cmd) in create_reply() argument
84 if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) in create_reply()
87 struct genlmsghdr *ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); in create_reply()
99 struct nl_writer *nw = npt->nw; in dump_mod_test() local
101 if (!create_reply(nw, hdr, KTEST_CMD_NEWTEST)) in dump_mod_test()
104 nlattr_add_string(nw, KTEST_ATTR_MOD_NAME, mod->info->name); in dump_mod_test()
105 nlattr_add_string(nw, KTEST_ATTR_TEST_NAME, test_info->name); in dump_mod_test()
106 nlattr_add_string(nw, KTEST_ATTR_TEST_DESCR, test_info->desc); in dump_mod_test()
108 if (nlmsg_end(nw)) in dump_mod_test()
111 nlmsg_abort(nw); in dump_mod_test()
[all …]
/freebsd/sbin/dhclient/
H A Dinet6.c32 struct snl_writer nw; in check_ipv6_address() local
38 snl_init_writer(ss, &nw); in check_ipv6_address()
39 hdr = snl_create_msg_request(&nw, RTM_GETADDR); in check_ipv6_address()
41 ifahdr = snl_reserve_msg_object(&nw, struct ifaddrmsg); in check_ipv6_address()
45 if ((hdr = snl_finalize_msg(&nw)) == NULL || !snl_send_message(ss, hdr)) in check_ipv6_address()
70 struct snl_writer nw; in check_ipv6_defaultroute() local
76 snl_init_writer(ss, &nw); in check_ipv6_defaultroute()
77 hdr = snl_create_msg_request(&nw, RTM_GETROUTE); in check_ipv6_defaultroute()
78 rtmsg = snl_reserve_msg_object(&nw, struct rtmsg); in check_ipv6_defaultroute()
83 snl_add_msg_attr_ip6(&nw, RTA_DST, &in6); in check_ipv6_defaultroute()
[all …]

12345