1f08c3bdfSopenharmony_ci/*
2f08c3bdfSopenharmony_ci *   tcpcmds common definitions header (designed for to maximize modularity
3f08c3bdfSopenharmony_ci *   between IPv4 and IPv6 test code).
4f08c3bdfSopenharmony_ci *
5f08c3bdfSopenharmony_ci * Copyright (C) 2009, Cisco Systems Inc.
6f08c3bdfSopenharmony_ci *
7f08c3bdfSopenharmony_ci *   This program is free software; you can redistribute it and/or modify
8f08c3bdfSopenharmony_ci *   it under the terms of the GNU General Public License as published by
9f08c3bdfSopenharmony_ci *   the Free Software Foundation; either version 2 of the License, or
10f08c3bdfSopenharmony_ci *   (at your option) any later version.
11f08c3bdfSopenharmony_ci *
12f08c3bdfSopenharmony_ci *   This program is distributed in the hope that it will be useful,
13f08c3bdfSopenharmony_ci *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14f08c3bdfSopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15f08c3bdfSopenharmony_ci *   GNU General Public License for more details.
16f08c3bdfSopenharmony_ci *
17f08c3bdfSopenharmony_ci *   You should have received a copy of the GNU General Public License along
18f08c3bdfSopenharmony_ci *   with this program; if not, write to the Free Software Foundation, Inc.,
19f08c3bdfSopenharmony_ci *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20f08c3bdfSopenharmony_ci *
21f08c3bdfSopenharmony_ci */
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci#ifndef __NETDEFS_H
24f08c3bdfSopenharmony_ci#define __NETDEFS_H
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ci#include <netdb.h>
27f08c3bdfSopenharmony_ci
28f08c3bdfSopenharmony_ci#if INET6
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci#include <netinet/ip6.h>
31f08c3bdfSopenharmony_ci#include <netinet/icmp6.h>
32f08c3bdfSopenharmony_ci
33f08c3bdfSopenharmony_citypedef struct icmp6_hdr	icmp_t;
34f08c3bdfSopenharmony_citypedef struct sockaddr		sa_t;
35f08c3bdfSopenharmony_citypedef struct sockaddr_in6	sai_t;
36f08c3bdfSopenharmony_ci
37f08c3bdfSopenharmony_ci#define AFI			AF_INET6
38f08c3bdfSopenharmony_ci#define IERP			ICMP6_ECHO_REPLY
39f08c3bdfSopenharmony_ci#define IERQ			ICMP6_ECHO_REQUEST
40f08c3bdfSopenharmony_ci#define ICMP_PROTO		"ipv6-icmp"
41f08c3bdfSopenharmony_ci#define PFI			PF_INET6
42f08c3bdfSopenharmony_ci
43f08c3bdfSopenharmony_ci#else
44f08c3bdfSopenharmony_ci
45f08c3bdfSopenharmony_ci#include <netinet/ip.h>
46f08c3bdfSopenharmony_ci#include <netinet/ip_icmp.h>
47f08c3bdfSopenharmony_ci
48f08c3bdfSopenharmony_citypedef struct icmp		icmp_t;
49f08c3bdfSopenharmony_citypedef struct sockaddr		sa_t;
50f08c3bdfSopenharmony_citypedef struct sockaddr_in	sai_t;
51f08c3bdfSopenharmony_ci
52f08c3bdfSopenharmony_ci#define AFI			AF_INET
53f08c3bdfSopenharmony_ci#define IERP			ICMP_ECHOREPLY
54f08c3bdfSopenharmony_ci#define IERQ			ICMP_ECHO
55f08c3bdfSopenharmony_ci#define ICMP_PROTO		"icmp"
56f08c3bdfSopenharmony_ci#define PFI			PF_INET
57f08c3bdfSopenharmony_ci
58f08c3bdfSopenharmony_ci#endif
59f08c3bdfSopenharmony_ci
60f08c3bdfSopenharmony_ci#define LISTEN_BACKLOG	10
61f08c3bdfSopenharmony_ci
62f08c3bdfSopenharmony_ci#ifndef PATH_MAX
63f08c3bdfSopenharmony_ci#define PATH_MAX 4096
64f08c3bdfSopenharmony_ci#endif
65f08c3bdfSopenharmony_ci
66f08c3bdfSopenharmony_ci#ifndef TRUE
67f08c3bdfSopenharmony_ci#define TRUE 1
68f08c3bdfSopenharmony_ci#endif
69f08c3bdfSopenharmony_ci#ifndef FALSE
70f08c3bdfSopenharmony_ci#define FALSE 0
71f08c3bdfSopenharmony_ci#endif
72f08c3bdfSopenharmony_ci
73f08c3bdfSopenharmony_ci#endif
74