]> git.ipfire.org Git - thirdparty/bird.git/blob - lib/ip.c
06cc42cfcdf03ff4bf9b2ef3b7fdc810238aa8a8
[thirdparty/bird.git] / lib / ip.c
1 /*
2 * BIRD Library -- IP address routines common for IPv4 and IPv6
3 *
4 * (c) 1998--1999 Martin Mares <mj@ucw.cz>
5 *
6 * Can be freely distributed and used under the terms of the GNU GPL.
7 */
8
9 #include <string.h>
10 #include <stdlib.h>
11
12 #include "nest/bird.h"
13 #include "lib/ip.h"
14
15 char *
16 ip_scope_text(unsigned scope)
17 {
18 static char *scope_table[] = { "host", "link", "site", "org", "univ" };
19
20 if (scope > SCOPE_UNIVERSE)
21 return "?";
22 else
23 return scope_table[scope];
24 }