pfkey_dump.c (b42ac57f4f2c183fda94189f1516ae3c1eff851f) pfkey_dump.c (d24cb2490d10a6abfd24c7bba65db9a7dc011715)
1/* $KAME: pfkey_dump.c,v 1.28 2001/06/27 10:46:51 sakane Exp $ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 483 unchanged lines hidden (view full) ---

492/*
493 * set "ipaddress" to buffer.
494 */
495static char *
496str_ipaddr(sa)
497 struct sockaddr *sa;
498{
499 static char buf[NI_MAXHOST];
1/* $KAME: pfkey_dump.c,v 1.28 2001/06/27 10:46:51 sakane Exp $ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 483 unchanged lines hidden (view full) ---

492/*
493 * set "ipaddress" to buffer.
494 */
495static char *
496str_ipaddr(sa)
497 struct sockaddr *sa;
498{
499 static char buf[NI_MAXHOST];
500#ifdef NI_WITHSCOPEID
501 const int niflag = NI_NUMERICHOST | NI_WITHSCOPEID;
502#else
503 const int niflag = NI_NUMERICHOST;
500 const int niflag = NI_NUMERICHOST;
504#endif
505
506 if (sa == NULL)
507 return "";
508
509 if (getnameinfo(sa, sa->sa_len, buf, sizeof(buf), NULL, 0, niflag) == 0)
510 return buf;
511 return NULL;
512}

--- 97 unchanged lines hidden ---
501
502 if (sa == NULL)
503 return "";
504
505 if (getnameinfo(sa, sa->sa_len, buf, sizeof(buf), NULL, 0, niflag) == 0)
506 return buf;
507 return NULL;
508}

--- 97 unchanged lines hidden ---