missing/addrinfo.h
missing/addrsize.h
missing/bittypes.h
-missing/cdecl_ext.h
missing/getaddrinfo.c
missing/getnameinfo.c
missing/inet_aton.c
* make them to acconfig.h and rerun autoheader */
@TOP@
-/* Define __P() macro, if necessary */
-#ifndef __P
-#if __STDC__
-#define __P(protos) protos
-#else
-#define __P(protos) ()
-#endif
-#endif
-
/* Define if you have SSLeay 0.9.0b with the buggy cast128. */
#undef HAVE_BUGGY_CAST128
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
-/* Define __P() macro, if necessary */
-#ifndef __P
-#if __STDC__
-#define __P(protos) protos
-#else
-#define __P(protos) ()
-#endif
-#endif
-
/* Define if you have SSLeay 0.9.0b with the buggy cast128. */
#undef HAVE_BUGGY_CAST128
/* define if this is a development version, to use additional prototypes. */
#undef HAVE_OS_PROTO_H
-/* define if <unistd.h> defines __P() */
-#undef HAVE_PORTABLE_PROTOTYPE
-
/* define if RES_USE_INET6 is defined */
#undef HAVE_RES_USE_INET6
-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.128 2000-10-21 04:54:26 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.129 2000-10-24 00:56:49 fenner Exp $ (LBL)
dnl
dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_REVISION($Revision: 1.128 $)
+AC_REVISION($Revision: 1.129 $)
AC_PREREQ(2.13)
AC_INIT(tcpdump.c)
missing_includes=yes
fi
-dnl
-dnl check __P macro
-AC_CHECK_PORTABLE_PROTO(ac_cv_portable_proto)
-if test "$ac_cv_portable_proto" = no; then
- missing_includes=yes
-fi
-
dnl
dnl check sizeof basic types.
dnl They're very likely to be wrong for cross-compiling.
extern struct dhcp6_opt *dh6o_pad;
extern struct dhcp6_opt *dh6o_end;
extern int dhcp6_param[];
-extern void dhcp6opttab_init __P((void));
-extern struct dhcp6_opt *dhcp6opttab_byname __P((char *));
-extern struct dhcp6_opt *dhcp6opttab_bycode __P((u_int));
+extern void dhcp6opttab_init (void);
+extern struct dhcp6_opt *dhcp6opttab_byname (char *);
+extern struct dhcp6_opt *dhcp6opttab_bycode (u_int);
#endif
#endif /*__DHCP6OPT_H_DEFINED*/
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.140 2000-10-06 06:49:21 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.141 2000-10-24 00:56:49 fenner Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
#endif
#ifndef HAVE_STRLCAT
-extern size_t strlcat __P((char *, const char *, size_t));
+extern size_t strlcat (char *, const char *, size_t);
#endif
#ifndef HAVE_STRLCPY
-extern size_t strlcpy __P((char *, const char *, size_t));
+extern size_t strlcpy (char *, const char *, size_t);
#endif
struct tok {
typedef u_int n_time; /* ms since 00:00 GMT, byte rev */
#ifdef KERNEL
-n_time iptime __P((void));
+n_time iptime (void);
#endif
(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
#ifdef KERNEL
-void icmp_error __P((struct mbuf *, int, int, n_int, struct ifnet *));
-void icmp_input __P((struct mbuf *, int));
-void icmp_reflect __P((struct mbuf *));
-void icmp_send __P((struct mbuf *, struct mbuf *));
-int icmp_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
+void icmp_error (struct mbuf *, int, int, n_int, struct ifnet *);
+void icmp_input (struct mbuf *, int);
+void icmp_reflect (struct mbuf *);
+void icmp_send (struct mbuf *, struct mbuf *);
+int icmp_sysctl (int *, u_int, void *, size_t *, void *, size_t);
#endif
u_short ip_id; /* ip packet ctr, for ids */
int ip_defttl; /* default IP ttl */
-int in_control __P((struct socket *, n_long, caddr_t, struct ifnet *));
-int ip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-void ip_deq __P((struct ipasfrag *));
-int ip_dooptions __P((struct mbuf *));
-void ip_drain __P((void));
-void ip_enq __P((struct ipasfrag *, struct ipasfrag *));
-void ip_forward __P((struct mbuf *, int));
-void ip_freef __P((struct ipq *));
-void ip_freemoptions __P((struct ip_moptions *));
-int ip_getmoptions __P((int, struct ip_moptions *, struct mbuf **));
-void ip_init __P((void));
-int ip_mforward __P((struct mbuf *, struct ifnet *));
-int ip_optcopy __P((struct ip *, struct ip *));
-int ip_output __P((struct mbuf *,
- struct mbuf *, struct route *, int, struct ip_moptions *));
-int ip_pcbopts __P((struct mbuf **, struct mbuf *));
+int in_control (struct socket *, n_long, caddr_t, struct ifnet *);
+int ip_ctloutput (int, struct socket *, int, int, struct mbuf **);
+void ip_deq (struct ipasfrag *);
+int ip_dooptions (struct mbuf *);
+void ip_drain (void);
+void ip_enq (struct ipasfrag *, struct ipasfrag *);
+void ip_forward (struct mbuf *, int);
+void ip_freef (struct ipq *);
+void ip_freemoptions (struct ip_moptions *);
+int ip_getmoptions (int, struct ip_moptions *, struct mbuf **);
+void ip_init (void);
+int ip_mforward (struct mbuf *, struct ifnet *);
+int ip_optcopy (struct ip *, struct ip *);
+int ip_output (struct mbuf *,
+ struct mbuf *, struct route *, int, struct ip_moptions *);
+int ip_pcbopts (struct mbuf **, struct mbuf *);
struct ip *
- ip_reass __P((struct ipasfrag *, struct ipq *));
+ ip_reass (struct ipasfrag *, struct ipq *);
struct in_ifaddr *
- ip_rtaddr __P((struct in_addr));
-int ip_setmoptions __P((int, struct ip_moptions **, struct mbuf *));
-void ip_slowtimo __P((void));
+ ip_rtaddr (struct in_addr);
+int ip_setmoptions (int, struct ip_moptions **, struct mbuf *);
+void ip_slowtimo (void);
struct mbuf *
- ip_srcroute __P((void));
-void ip_stripoptions __P((struct mbuf *, struct mbuf *));
-int ip_sysctl __P((int *, n_long, void *, size_t *, void *, size_t));
-void ipintr __P((void));
-int rip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-void rip_init __P((void));
-void rip_input __P((struct mbuf *));
-int rip_output __P((struct mbuf *, struct socket *, n_long));
-int rip_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
+ ip_srcroute (void);
+void ip_stripoptions (struct mbuf *, struct mbuf *);
+int ip_sysctl (int *, n_long, void *, size_t *, void *, size_t);
+void ipintr (void);
+int rip_ctloutput (int, struct socket *, int, int, struct mbuf **);
+void rip_init (void);
+void rip_input (struct mbuf *);
+int rip_output (struct mbuf *, struct socket *, n_long);
+int rip_usrreq (struct socket *,
+ int, struct mbuf *, struct mbuf *, struct mbuf *);
#endif
struct tcpstat tcpstat; /* tcp statistics */
n_long tcp_now; /* for RFC 1323 timestamps */
-int tcp_attach __P((struct socket *));
-void tcp_canceltimers __P((struct tcpcb *));
+int tcp_attach (struct socket *);
+void tcp_canceltimers (struct tcpcb *);
struct tcpcb *
- tcp_close __P((struct tcpcb *));
-void tcp_ctlinput __P((int, struct sockaddr *, struct ip *));
-int tcp_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
+ tcp_close (struct tcpcb *);
+void tcp_ctlinput (int, struct sockaddr *, struct ip *);
+int tcp_ctloutput (int, struct socket *, int, int, struct mbuf **);
struct tcpcb *
- tcp_disconnect __P((struct tcpcb *));
+ tcp_disconnect (struct tcpcb *);
struct tcpcb *
- tcp_drop __P((struct tcpcb *, int));
-void tcp_dooptions __P((struct tcpcb *,
- u_char *, int, struct tcpiphdr *, int *, n_long *, n_long *));
-void tcp_drain __P((void));
-void tcp_fasttimo __P((void));
-void tcp_init __P((void));
-void tcp_input __P((struct mbuf *, int));
-int tcp_mss __P((struct tcpcb *, u_int));
+ tcp_drop (struct tcpcb *, int);
+void tcp_dooptions (struct tcpcb *,
+ u_char *, int, struct tcpiphdr *, int *, n_long *, n_long *);
+void tcp_drain (void);
+void tcp_fasttimo (void);
+void tcp_init (void);
+void tcp_input (struct mbuf *, int);
+int tcp_mss (struct tcpcb *, u_int);
struct tcpcb *
- tcp_newtcpcb __P((struct inpcb *));
-void tcp_notify __P((struct inpcb *, int));
-int tcp_output __P((struct tcpcb *));
-void tcp_pulloutofband __P((struct socket *,
- struct tcpiphdr *, struct mbuf *));
-void tcp_quench __P((struct inpcb *, int));
-int tcp_reass __P((struct tcpcb *, struct tcpiphdr *, struct mbuf *));
-void tcp_respond __P((struct tcpcb *,
- struct tcpiphdr *, struct mbuf *, n_long, n_long, int));
-void tcp_setpersist __P((struct tcpcb *));
-void tcp_slowtimo __P((void));
+ tcp_newtcpcb (struct inpcb *);
+void tcp_notify (struct inpcb *, int);
+int tcp_output (struct tcpcb *);
+void tcp_pulloutofband (struct socket *,
+ struct tcpiphdr *, struct mbuf *);
+void tcp_quench (struct inpcb *, int);
+int tcp_reass (struct tcpcb *, struct tcpiphdr *, struct mbuf *);
+void tcp_respond (struct tcpcb *,
+ struct tcpiphdr *, struct mbuf *, n_long, n_long, int);
+void tcp_setpersist (struct tcpcb *);
+void tcp_slowtimo (void);
struct tcpiphdr *
- tcp_template __P((struct tcpcb *));
+ tcp_template (struct tcpcb *);
struct tcpcb *
- tcp_timers __P((struct tcpcb *, int));
-void tcp_trace __P((int, int, struct tcpcb *, struct tcpiphdr *, int));
+ tcp_timers (struct tcpcb *, int);
+void tcp_trace (int, int, struct tcpcb *, struct tcpiphdr *, int);
struct tcpcb *
- tcp_usrclosed __P((struct tcpcb *));
-int tcp_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-void tcp_xmit_timer __P((struct tcpcb *, int));
+ tcp_usrclosed (struct tcpcb *);
+int tcp_usrreq (struct socket *,
+ int, struct mbuf *, struct mbuf *, struct mbuf *);
+void tcp_xmit_timer (struct tcpcb *, int);
#endif
struct inpcb udb;
struct udpstat udpstat;
-void udp_ctlinput __P((int, struct sockaddr *, struct ip *));
-void udp_init __P((void));
-void udp_input __P((struct mbuf *, int));
-int udp_output __P((struct inpcb *,
- struct mbuf *, struct mbuf *, struct mbuf *));
-int udp_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
-int udp_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
+void udp_ctlinput (int, struct sockaddr *, struct ip *);
+void udp_init (void);
+void udp_input (struct mbuf *, int);
+int udp_output (struct inpcb *,
+ struct mbuf *, struct mbuf *, struct mbuf *);
+int udp_sysctl (int *, u_int, void *, size_t *, void *, size_t);
+int udp_usrreq (struct socket *,
+ int, struct mbuf *, struct mbuf *, struct mbuf *);
#endif
* SUCH DAMAGE.
*/
-/* $Id: addrinfo.h,v 1.2 1999-11-21 01:35:41 assar Exp $ */
+/* $Id: addrinfo.h,v 1.3 2000-10-24 00:56:52 fenner Exp $ */
#ifndef HAVE_ADDRINFO
struct addrinfo *ai_next; /* next structure in linked list */
};
-extern void freeaddrinfo __P((struct addrinfo *));
-extern void freehostent __P((struct hostent *));
-extern char *gai_strerror __P((int));
-extern int getaddrinfo __P((const char *, const char *,
- const struct addrinfo *, struct addrinfo **));
-extern int getnameinfo __P((const struct sockaddr *, size_t, char *,
- size_t, char *, size_t, int));
-extern struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *));
-extern struct hostent *getipnodebyname __P((const char *, int, int, int *));
-extern int inet_pton __P((int, const char *, void *));
-extern const char *inet_ntop __P((int, const void *, char *, size_t));
+extern void freeaddrinfo (struct addrinfo *);
+extern void freehostent (struct hostent *);
+extern char *gai_strerror (int);
+extern int getaddrinfo (const char *, const char *,
+ const struct addrinfo *, struct addrinfo **);
+extern int getnameinfo (const struct sockaddr *, size_t, char *,
+ size_t, char *, size_t, int);
+extern struct hostent *getipnodebyaddr (const void *, size_t, int, int *);
+extern struct hostent *getipnodebyname (const char *, int, int, int *);
+extern int inet_pton (int, const char *, void *);
+extern const char *inet_ntop (int, const void *, char *, size_t);
#endif /* HAVE_ADDRINFO */
/*
+++ /dev/null
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef HAVE_PORTABLE_PROTOTYPE
-
-#if defined(__STDC__) || defined(__cplusplus)
-#define __P(protos) protos /* full-blown ANSI C */
-#else
-#define __P(protos) () /* traditional C preprocessor */
-#endif
-
-#endif /* !HAVE_PORTABLE_PROTOTYPE */
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.9 2000-01-21 04:06:18 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.10 2000-10-24 00:56:53 fenner Exp $";
#endif
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
-#ifndef HAVE_PORTABLE_PROTOTYPE
-#include "cdecl_ext.h"
-#endif
-
#ifndef HAVE_U_INT32_T
#include "bittypes.h"
#endif
#endif
-static int str_isnumber __P((const char *));
-static int explore_fqdn __P((const struct addrinfo *, const char *,
- const char *, struct addrinfo **));
-static int explore_null __P((const struct addrinfo *, const char *,
- const char *, struct addrinfo **));
-static int explore_numeric __P((const struct addrinfo *, const char *,
- const char *, struct addrinfo **));
-static int explore_numeric_scope __P((const struct addrinfo *, const char *,
- const char *, struct addrinfo **));
-static int get_name __P((const char *, const struct afd *, struct addrinfo **,
- char *, const struct addrinfo *, const char *));
-static int get_canonname __P((const struct addrinfo *,
- struct addrinfo *, const char *));
-static struct addrinfo *get_ai __P((const struct addrinfo *,
- const struct afd *, const char *));
-static int get_portmatch __P((const struct addrinfo *, const char *));
-static int get_port __P((struct addrinfo *, const char *, int));
-static const struct afd *find_afd __P((int));
+static int str_isnumber (const char *);
+static int explore_fqdn (const struct addrinfo *, const char *,
+ const char *, struct addrinfo **);
+static int explore_null (const struct addrinfo *, const char *,
+ const char *, struct addrinfo **);
+static int explore_numeric (const struct addrinfo *, const char *,
+ const char *, struct addrinfo **);
+static int explore_numeric_scope (const struct addrinfo *, const char *,
+ const char *, struct addrinfo **);
+static int get_name (const char *, const struct afd *, struct addrinfo **,
+ char *, const struct addrinfo *, const char *);
+static int get_canonname (const struct addrinfo *,
+ struct addrinfo *, const char *);
+static struct addrinfo *get_ai (const struct addrinfo *,
+ const struct afd *, const char *);
+static int get_portmatch (const struct addrinfo *, const char *);
+static int get_port (struct addrinfo *, const char *, int);
+static const struct afd *find_afd (int);
static char *ai_errlist[] = {
"Success",
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.7 2000-10-07 05:20:24 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.8 2000-10-24 00:56:53 fenner Exp $";
#endif
#include <sys/types.h>
#include <stddef.h>
#include <errno.h>
-#ifndef HAVE_PORTABLE_PROTOTYPE
-#include "cdecl_ext.h"
-#endif
-
#ifdef NEED_ADDRINFO_H
#include "addrinfo.h"
#endif
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.11 2000-09-28 06:42:57 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.12 2000-10-24 00:56:50 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
#include "dhcp6opt.h"
#if 0
-static void dhcp6opttab_init __P((void));
-static struct dhcp6_opt *dhcp6opttab_byname __P((char *));
+static void dhcp6opttab_init (void);
+static struct dhcp6_opt *dhcp6opttab_byname (char *);
#endif
-static struct dhcp6_opt *dhcp6opttab_bycode __P((u_int));
+static struct dhcp6_opt *dhcp6opttab_bycode (u_int);
static char tstr[] = " [|dhcp6]";
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.54 2000-10-09 01:53:20 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.55 2000-10-24 00:56:50 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#define BAP_CSIND 7
#define BAP_CSRES 8
-static const char *ppp_protoname __P((u_int proto));
-static void handle_ctrl_proto __P((u_int proto,const u_char *p, int length));
-static void handle_chap __P((const u_char *p, int length));
-static void handle_pap __P((const u_char *p, int length));
-static void handle_bap __P((const u_char *p, int length));
-static int print_lcp_config_options __P((const u_char *p, int));
-static int print_ipcp_config_options __P((const u_char *p, int));
-static int print_ccp_config_options __P((const u_char *p, int));
-static int print_bacp_config_options __P((const u_char *p, int));
-static void handle_ppp __P((u_int proto, const u_char *p, int length));
+static const char *ppp_protoname (u_int proto);
+static void handle_ctrl_proto (u_int proto,const u_char *p, int length);
+static void handle_chap (const u_char *p, int length);
+static void handle_pap (const u_char *p, int length);
+static void handle_bap (const u_char *p, int length);
+static int print_lcp_config_options (const u_char *p, int);
+static int print_ipcp_config_options (const u_char *p, int);
+static int print_ccp_config_options (const u_char *p, int);
+static int print_bacp_config_options (const u_char *p, int);
+static void handle_ppp (u_int proto, const u_char *p, int length);
static const char *
ppp_protoname(u_int proto)