Lines Matching +full:software +full:- +full:dl
3 /*-
4 * SPDX-License-Identifier: BSD-3-Clause
18 * may be used to endorse or promote products derived from this software
21 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
127 fprintf(stderr, "usage: rrenumd [-c conf_file|-s] [-df" in show_usage()
130 "] [-P policy" in show_usage()
143 sin6->sin6_len = sizeof(*sin6); in init_sin6()
144 sin6->sin6_family = AF_INET6; in init_sin6()
145 if (inet_pton(AF_INET6, addr_ascii, &sin6->sin6_addr) != 1) in init_sin6()
235 for (pl = pl_head; pl; pl = pl->pl_next) { in config()
236 iov = (struct iovec *)&pl->pl_sndiov; in config()
237 irr = (struct icmp6_router_renum *)&pl->pl_irr; in config()
238 rpm = (struct rr_pco_match *)&pl->pl_rpm; in config()
240 irr->rr_type = ICMP6_ROUTER_RENUMBERING; in config()
241 irr->rr_code = 0; in config()
247 irr->rr_flags |= ICMP6_RR_FLAGS_SPECSITE; in config()
251 * means only 1 use_prefix is contained as router-renum-05.txt. in config()
255 rpm->rpm_len = 4*1 +3; in config()
256 rpm->rpm_ordinal = 0; in config()
257 iov->iov_base = (caddr_t)irr; in config()
258 iov->iov_len = sizeof(struct icmp6_router_renum) in config()
317 if (flags->policy) { in sock6_open()
329 if (flags->auth) { in sock6_open()
332 &optval, sizeof(optval)) == -1) { in sock6_open()
338 if (flags->encrypt) { in sock6_open()
341 &optval, sizeof(optval)) == -1) { in sock6_open()
381 if (flags->policy) { in sock4_open()
393 if (flags->auth) { in sock4_open()
396 &optval, sizeof(optval)) == -1) { in sock4_open()
402 if (flags->encrypt) { in sock4_open()
405 &optval, sizeof(optval)) == -1) { in sock4_open()
416 rrenum_output(struct payload_list *pl, struct dst_list *dl) in rrenum_output() argument
423 sndmhdr.msg_name = (caddr_t)dl->dl_dst; in rrenum_output()
424 if (dl->dl_dst->sa_family == AF_INET6) in rrenum_output()
425 sin6 = (struct sockaddr_in6 *)dl->dl_dst; in rrenum_output()
428 IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { in rrenum_output()
433 cm->cmsg_level = IPPROTO_IPV6; in rrenum_output()
434 cm->cmsg_type = IPV6_PKTINFO; in rrenum_output()
435 cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); in rrenum_output()
437 memset(&pi->ipi6_addr, 0, sizeof(pi->ipi6_addr)); /*XXX*/ in rrenum_output()
438 pi->ipi6_ifindex = sin6->sin6_scope_id; in rrenum_output()
442 /* not defined by router-renum-05.txt, but maybe its OK */ in rrenum_output()
444 cm->cmsg_level = IPPROTO_IPV6; in rrenum_output()
445 cm->cmsg_type = IPV6_HOPLIMIT; in rrenum_output()
446 cm->cmsg_len = CMSG_LEN(sizeof(int)); in rrenum_output()
454 sndmhdr.msg_iov = &pl->pl_sndiov; in rrenum_output()
455 i = sendmsg(dl->dl_dst->sa_family == AF_INET ? s4 : s6, &sndmhdr, 0); in rrenum_output()
457 if (i < 0 || i != sndmhdr.msg_iov->iov_len) in rrenum_output()
465 struct dst_list *dl; in rrenum_snd_eachdst() local
467 for (dl = dl_head; dl; dl = dl->dl_next) { in rrenum_snd_eachdst()
468 rrenum_output(pl, dl); in rrenum_snd_eachdst()
478 for (pl = pl_head; pl; pl = pl->pl_next) {
497 i -= sizeof(struct ip); in rrenum_input()
504 struct ip *ip = (struct ip *)rcvmhdr.msg_iov->iov_base; in rrenum_input()
508 rr = (struct icmp6_router_renum *)rcvmhdr.msg_iov->iov_base; in rrenum_input()
510 switch(rr->rr_code) { in rrenum_input()
519 __func__, rr->rr_code); in rrenum_input()
549 )) != -1){ in main()
587 argc -= optind; in main()
646 send_counter--; in main()
650 pl = pl->pl_next; in main()