Home | History | Annotate | Line # | Download | only in route
rtutil.h revision 1.3.2.2
      1  1.3.2.2  martin /*-
      2  1.3.2.2  martin  * Copyright (c) 2013 The NetBSD Foundation, Inc.
      3  1.3.2.2  martin  * All rights reserved.
      4  1.3.2.2  martin  *
      5  1.3.2.2  martin  * This code is derived from software contributed to The NetBSD Foundation
      6  1.3.2.2  martin  * by Christos Zoulas.
      7  1.3.2.2  martin  *
      8  1.3.2.2  martin  * Redistribution and use in source and binary forms, with or without
      9  1.3.2.2  martin  * modification, are permitted provided that the following conditions
     10  1.3.2.2  martin  * are met:
     11  1.3.2.2  martin  * 1. Redistributions of source code must retain the above copyright
     12  1.3.2.2  martin  *    notice, this list of conditions and the following disclaimer.
     13  1.3.2.2  martin  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.3.2.2  martin  *    notice, this list of conditions and the following disclaimer in the
     15  1.3.2.2  martin  *    documentation and/or other materials provided with the distribution.
     16  1.3.2.2  martin  * 3. Neither the name of The NetBSD Foundation nor the names of its
     17  1.3.2.2  martin  *    contributors may be used to endorse or promote products derived
     18  1.3.2.2  martin  *    from this software without specific prior written permission.
     19  1.3.2.2  martin  *
     20  1.3.2.2  martin  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     21  1.3.2.2  martin  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     22  1.3.2.2  martin  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     23  1.3.2.2  martin  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     24  1.3.2.2  martin  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     25  1.3.2.2  martin  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     26  1.3.2.2  martin  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     27  1.3.2.2  martin  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     28  1.3.2.2  martin  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     29  1.3.2.2  martin  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     30  1.3.2.2  martin  * POSSIBILITY OF SUCH DAMAGE.
     31  1.3.2.2  martin  */
     32  1.3.2.2  martin 
     33  1.3.2.2  martin #define RT_AFLAG	1
     34  1.3.2.2  martin #define RT_TFLAG	2
     35  1.3.2.2  martin #define RT_VFLAG	4
     36  1.3.2.2  martin #define RT_NFLAG	8
     37  1.3.2.2  martin 
     38  1.3.2.2  martin void p_rttables(int, int, int, int);
     39  1.3.2.2  martin void p_rthdr(int, int);
     40  1.3.2.2  martin void p_family(int);
     41  1.3.2.2  martin void p_sockaddr(const struct sockaddr *, const struct sockaddr *, int, int, int);
     42  1.3.2.2  martin void p_flags(int);
     43  1.3.2.2  martin struct rt_metrics;
     44  1.3.2.2  martin void p_rtrmx(const struct rt_metrics *);
     45  1.3.2.2  martin void p_addr(const struct sockaddr *sa, const struct sockaddr *mask, int, int);
     46  1.3.2.2  martin void p_gwaddr(const struct sockaddr *sa, int, int);
     47  1.3.2.2  martin 
     48  1.3.2.2  martin char *routename(const struct sockaddr *sa, int);
     49  1.3.2.2  martin char *routename4(in_addr_t, int);
     50  1.3.2.2  martin #ifdef INET6
     51  1.3.2.2  martin char *routename6(const struct sockaddr_in6 *, int);
     52  1.3.2.2  martin char *netname6(const struct sockaddr_in6 *, const struct sockaddr_in6 *, int);
     53  1.3.2.2  martin #endif
     54  1.3.2.2  martin char *netname(const struct sockaddr *, const struct sockaddr *, int);
     55  1.3.2.2  martin char *netname4(in_addr_t, in_addr_t, int);
     56  1.3.2.2  martin 
     57  1.3.2.2  martin char *mpls_ntoa(const struct sockaddr *);
     58  1.3.2.2  martin char *any_ntoa(const struct sockaddr *);
     59