Source File ip/inet6def.h

    1    | /******************
    2    |   Copyright (c) 2002                                        RIPE NCC
    3    |
    4    |   All Rights Reserved
    5    |
    6    |   Permission to use, copy, modify, and distribute this software and its
    7    |   documentation for any purpose and without fee is hereby granted,
    8    |   provided that the above copyright notice appear in all copies and that
    9    |   both that copyright notice and this permission notice appear in
    10   |   supporting documentation, and that the name of the author not be
    11   |   used in advertising or publicity pertaining to distribution of the
    12   |   software without specific, written prior permission.
    13   |
    14   |   THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
    15   |   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
    16   |   AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
    17   |   DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
    18   |   AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    19   |   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   |   ***************************************/
    21   |
    22   | #ifndef INET6DEF_H
    23   | #define INET6DEF_H
    24   |
    25   | /* on some machines the AF_INET6 definition is needed, on most systems not */
    26   | #include <sys/socket.h>
    27   | #include <netinet/in.h>
    28   |
    29   | #ifndef INET_ADDRSTRLEN
    30   | #define INET_ADDRSTRLEN   16
    31   | #endif
    32   |
    33   | #ifndef INET6_ADDRSTRLEN
    34   | #define INET6_ADDRSTRLEN   46
    35   | #endif
    36   |
    37   | #ifndef AF_INET6
    38   | #define AF_INET6        24              /* Internet Protocol version 6 */
    39   | #endif
    40   |
    41   | int inet_pton(int af, const char *src, void *dst);
    42   | const char *inet_ntop(int af, const void *src, char *dst, size_t size);
    43   |
    44   |
    45   | #endif /* INET6DEF_H */