Lines Matching refs:param
29 #include <sys/param.h>
301 const nstat_route_add_param *param = (const nstat_route_add_param*)data;
304 if (length < sizeof(*param))
309 if (param->dst.v4.sin_family == 0 ||
310 param->dst.v4.sin_family > AF_MAX ||
311 (param->mask.v4.sin_family != 0 && param->mask.v4.sin_family != param->dst.v4.sin_family))
316 if (param->dst.v4.sin_len > sizeof(param->dst) ||
317 (param->mask.v4.sin_family && param->mask.v4.sin_len > sizeof(param->mask.v4.sin_len)))
323 dst.const_sa = (const struct sockaddr*)¶m->dst;
324 mask.const_sa = param->mask.v4.sin_family ? (const struct sockaddr*)¶m->mask : NULL;
330 struct rtentry *rt = rt_lookup(TRUE, dst.sa, mask.sa, rnh, param->ifindex);
744 const nstat_tcp_add_param *param = (const nstat_tcp_add_param*)data;
745 if (length < sizeof(*param))
751 if (param->remote.v4.sin_family != 0 &&
752 param->remote.v4.sin_family != param->local.v4.sin_family)
759 switch (param->local.v4.sin_family)
763 if (param->local.v4.sin_len != sizeof(param->local.v4) ||
764 (param->remote.v4.sin_family != 0 &&
765 param->remote.v4.sin_len != sizeof(param->remote.v4)))
770 inp = in_pcblookup_hash(inpinfo, param->remote.v4.sin_addr, param->remote.v4.sin_port,
771 param->local.v4.sin_addr, param->local.v4.sin_port, 1, NULL);
784 if (param->local.v6.sin6_len != sizeof(param->local.v6) ||
785 (param->remote.v6.sin6_family != 0 &&
786 param->remote.v6.sin6_len != sizeof(param->remote.v6)))
791 local.in6c = ¶m->local.v6.sin6_addr;
792 remote.in6c = ¶m->remote.v6.sin6_addr;
794 inp = in6_pcblookup_hash(inpinfo, remote.in6, param->remote.v6.sin6_port,
795 local.in6, param->local.v6.sin6_port, 1, NULL);
1595 if (mbuf_len(m) < offsetof(nstat_msg_add_src_req, param))
1601 int32_t paramlength = mbuf_pkthdr_len(m) - offsetof(nstat_msg_add_src_req, param);
1616 result = mbuf_copydata(m, offsetof(nstat_msg_add_src_req, param), paramlength, data);
1623 result = nstat_lookup_entry(req->provider, (void*)&req->param, paramlength, &provider, &cookie);