2 * convert binary form of subnet description to text
3 * Copyright (C) 2000 Henry Spencer.
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Library General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 * License for more details.
15 * RCSID $Id: subnettot.c,v 1.2 2000/09/08 18:03:45 henry Exp $
21 - subnettot - convert subnet to text "addr/bitcount"
23 size_t /* space needed for full conversion */
24 subnettot(sub, format, dst, dstlen)
26 int format; /* character */
27 char *dst; /* need not be valid if dstlen is 0 */
42 len = addrtot(&sub->addr, format, dst, dstlen);
53 len += ultoa((unsigned long)sub->maskbits, 10, p, rest);