1/*- 2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/ppp/ncpaddr.c 146187 2005-05-13 16:31:11Z ume $ |
27 */ 28 29#include <sys/types.h> 30#include <sys/socket.h> 31#ifdef __OpenBSD__ 32#include <net/if_types.h> 33#include <net/route.h> 34#endif --- 348 unchanged lines hidden (view full) --- 383 case AF_INET6: 384 memset(&sin6, '\0', sizeof(sin6)); 385 sin6.sin6_len = sizeof(sin6); 386 sin6.sin6_family = AF_INET6; 387 sin6.sin6_addr = addr->ncpaddr_ip6addr; 388#if 0 389 adjust_linklocal(&sin6); 390#endif |
391 if (getnameinfo((struct sockaddr *)&sin6, sizeof sin6, res, sizeof(res), |
392 NULL, 0, NI_NUMERICHOST) != 0) |
393 break; 394 395 return res; 396#endif 397 } 398 399 snprintf(res, sizeof res, "<AF_UNSPEC>"); 400 return res; --- 610 unchanged lines hidden --- |