/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1999-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* *18***********************************************************************/19#pragma prototyped2021#if _PACKAGE_ast22#include <ast.h>23#else24#include <string.h>25#endif2627#include <stdio.h>28#include <ip6.h>2930int31main(int argc, char** argv)32{33char* s;34char* e;35char* f;36unsigned char b;37unsigned char a[IP6ADDR];38int c;39int r;40int all = 1;4142while (s = *++argv)43{44if (*s == '-' && !*(s + 1))45{46all = !all;47continue;48}49r = strtoip6(s, &e, a, &b);50f = fmtip6(a, b);51c = *e;52*e = 0;53if (r || all || strcmp(s, f))54{55*e = c;56printf("%d %32s %32s %s\n", r, s, e, f);57}58}59return 0;60}616263