Cleanup of userland __P use

This commit is contained in:
kevlo 2007-11-07 10:53:41 +00:00
parent 350f518402
commit fa3791e1a7
111 changed files with 1214 additions and 1203 deletions

View File

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* $NetBSD: ealloc.c,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $ */
/*
@ -50,7 +51,7 @@ __RCSID("$NetBSD: ealloc.c,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $");
#include "ealloc.h"
static void enomem __P((void));
static void enomem(void);
/*
* enomem --

View File

@ -1,6 +1,7 @@
/* $FreeBSD$ */
/* $NetBSD: ealloc.h,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $ */
void *emalloc __P((size_t len));
char *estrdup __P((const char *str));
void *erealloc __P((void *ptr, size_t size));
void *ecalloc __P((size_t nmemb, size_t size));
void *emalloc(size_t len);
char *estrdup(const char *str);
void *erealloc(void *ptr, size_t size);
void *ecalloc(size_t nmemb, size_t size);

View File

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* $NetBSD: hash.c,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $ */
/*
@ -76,7 +77,7 @@ __RCSID("$NetBSD: hash.c,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $");
* defined:
*/
static void RebuildTable __P((Hash_Table *));
static void RebuildTable(Hash_Table *);
/*
* The following defines the ratio of # entries to # buckets

View File

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* $NetBSD: hash.h,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $ */
/*
@ -119,12 +120,12 @@ typedef struct Hash_Search {
#define Hash_Size(n) (((n) + sizeof (int) - 1) / sizeof (int))
void Hash_InitTable __P((Hash_Table *, int));
void Hash_DeleteTable __P((Hash_Table *));
Hash_Entry *Hash_FindEntry __P((Hash_Table *, char *));
Hash_Entry *Hash_CreateEntry __P((Hash_Table *, char *, Boolean *));
void Hash_DeleteEntry __P((Hash_Table *, Hash_Entry *));
Hash_Entry *Hash_EnumFirst __P((Hash_Table *, Hash_Search *));
Hash_Entry *Hash_EnumNext __P((Hash_Search *));
void Hash_InitTable(Hash_Table *, int);
void Hash_DeleteTable(Hash_Table *);
Hash_Entry *Hash_FindEntry(Hash_Table *, char *);
Hash_Entry *Hash_CreateEntry(Hash_Table *, char *, Boolean *);
void Hash_DeleteEntry(Hash_Table *, Hash_Entry *);
Hash_Entry *Hash_EnumFirst(Hash_Table *, Hash_Search *);
Hash_Entry *Hash_EnumNext(Hash_Search *);
#endif /* _HASH */

View File

@ -130,27 +130,27 @@ strnodelist *bl_list;
strnodelist *keep_list;
strnodelist *skip_list;
void do_file __P((filenode *fnode));
void strnode_add __P((strnodelist **, char *, filenode *));
int skip_ok __P((filenode *fnode));
int keep_ok __P((filenode *fnode));
void satisfy_req __P((f_reqnode *rnode, char *filename));
void crunch_file __P((char *));
void parse_require __P((filenode *, char *));
void parse_provide __P((filenode *, char *));
void parse_before __P((filenode *, char *));
void parse_keywords __P((filenode *, char *));
filenode *filenode_new __P((char *));
void add_require __P((filenode *, char *));
void add_provide __P((filenode *, char *));
void add_before __P((filenode *, char *));
void add_keyword __P((filenode *, char *));
void insert_before __P((void));
Hash_Entry *make_fake_provision __P((filenode *));
void crunch_all_files __P((void));
void initialize __P((void));
void generate_ordering __P((void));
int main __P((int, char *[]));
void do_file(filenode *fnode);
void strnode_add(strnodelist **, char *, filenode *);
int skip_ok(filenode *fnode);
int keep_ok(filenode *fnode);
void satisfy_req(f_reqnode *rnode, char *filename);
void crunch_file(char *);
void parse_require(filenode *, char *);
void parse_provide(filenode *, char *);
void parse_before(filenode *, char *);
void parse_keywords(filenode *, char *);
filenode *filenode_new(char *);
void add_require(filenode *, char *);
void add_provide(filenode *, char *);
void add_before(filenode *, char *);
void add_keyword(filenode *, char *);
void insert_before(void);
Hash_Entry *make_fake_provision(filenode *);
void crunch_all_files(void);
void initialize(void);
void generate_ordering(void);
int main(int, char *[]);
int
main(argc, argv)

View File

@ -64,25 +64,25 @@ time_t p_lt_hard, p_lt_soft;
static int p_aiflags = 0, p_aifamily = PF_UNSPEC;
static struct addrinfo *parse_addr __P((char *, char *));
static int fix_portstr __P((vchar_t *, vchar_t *, vchar_t *));
static int setvarbuf __P((char *, int *, struct sadb_ext *, int, caddr_t, int));
void parse_init __P((void));
void free_buffer __P((void));
static struct addrinfo *parse_addr(char *, char *);
static int fix_portstr(vchar_t *, vchar_t *, vchar_t *);
static int setvarbuf(char *, int *, struct sadb_ext *, int, caddr_t, int);
void parse_init(void);
void free_buffer(void);
int setkeymsg0 __P((struct sadb_msg *, unsigned int, unsigned int, size_t));
static int setkeymsg_spdaddr __P((unsigned int, unsigned int, vchar_t *,
struct addrinfo *, int, struct addrinfo *, int));
static int setkeymsg_addr __P((unsigned int, unsigned int,
struct addrinfo *, struct addrinfo *, int));
static int setkeymsg_add __P((unsigned int, unsigned int,
struct addrinfo *, struct addrinfo *));
extern int setkeymsg __P((char *, size_t *));
extern int sendkeymsg __P((char *, size_t));
int setkeymsg0(struct sadb_msg *, unsigned int, unsigned int, size_t);
static int setkeymsg_spdaddr(unsigned int, unsigned int, vchar_t *,
struct addrinfo *, int, struct addrinfo *, int);
static int setkeymsg_addr(unsigned int, unsigned int,
struct addrinfo *, struct addrinfo *, int);
static int setkeymsg_add(unsigned int, unsigned int,
struct addrinfo *, struct addrinfo *);
extern int setkeymsg(char *, size_t *);
extern int sendkeymsg(char *, size_t);
extern int yylex __P((void));
extern void yyfatal __P((const char *));
extern void yyerror __P((const char *));
extern int yylex(void);
extern void yyfatal(const char *);
extern void yyerror(const char *);
%}
%union {

View File

@ -53,18 +53,18 @@
#include "libpfkey.h"
void usage __P((void));
int main __P((int, char **));
int get_supported __P((void));
void sendkeyshort __P((u_int));
void promisc __P((void));
int sendkeymsg __P((char *, size_t));
int postproc __P((struct sadb_msg *, int));
const char *numstr __P((int));
void shortdump_hdr __P((void));
void shortdump __P((struct sadb_msg *));
static void printdate __P((void));
static int32_t gmt2local __P((time_t));
void usage(void);
int main(int, char **);
int get_supported(void);
void sendkeyshort(u_int);
void promisc(void);
int sendkeymsg(char *, size_t);
int postproc(struct sadb_msg *, int);
const char *numstr(int);
void shortdump_hdr(void);
void shortdump(struct sadb_msg *);
static void printdate(void);
static int32_t gmt2local(time_t);
#define MODE_SCRIPT 1
#define MODE_CMDDUMP 2
@ -85,7 +85,7 @@ static time_t thiszone;
extern int lineno;
extern int parse __P((FILE **));
extern int parse(FILE **);
void
usage()

View File

@ -53,18 +53,18 @@ u_char m_buf[BUFSIZ];
u_int m_len;
char *pname;
void Usage __P((void));
int sendkeymsg __P((void));
void key_setsadbmsg __P((u_int));
void key_setsadbsens __P((void));
void key_setsadbprop __P((void));
void key_setsadbid __P((u_int, caddr_t));
void key_setsadblft __P((u_int, u_int));
void key_setspirange __P((void));
void key_setsadbkey __P((u_int, caddr_t));
void key_setsadbsa __P((void));
void key_setsadbaddr __P((u_int, u_int, caddr_t));
void key_setsadbextbuf __P((caddr_t, int, caddr_t, int, caddr_t, int));
void Usage(void);
int sendkeymsg(void);
void key_setsadbmsg(u_int);
void key_setsadbsens(void);
void key_setsadbprop(void);
void key_setsadbid(u_int, caddr_t);
void key_setsadblft(u_int, u_int);
void key_setspirange(void);
void key_setsadbkey(u_int, caddr_t);
void key_setsadbsa(void);
void key_setsadbaddr(u_int, u_int, caddr_t);
void key_setsadbextbuf(caddr_t, int, caddr_t, int, caddr_t, int);
void
Usage()

View File

@ -57,12 +57,12 @@ extern u_char m_buf[BUFSIZ];
extern u_int m_len;
extern int f_debug;
int yylex __P((void));
void yyfatal __P((const char *s));
void yyerror __P((const char *s));
extern void parse_init __P((void));
int parse __P((FILE **));
int yyparse __P((void));
int yylex(void);
void yyfatal(const char *s);
void yyerror(const char *s);
extern void parse_init(void);
int parse(FILE **);
int yyparse(void);
%}
/* common section */

View File

@ -40,8 +40,8 @@ static char askname[MAX_MACHINE_NAME];
static char path[MAX_PATH_LEN];
static char domain_name[MAX_MACHINE_NAME];
int getthefile __P((char *, char *, char *, int));
int checkhost __P((char *, char *, int));
int getthefile(char *, char *, char *, int);
int checkhost(char *, char *, int);
bp_whoami_res *
bootparamproc_whoami_1_svc(whoami, req)

View File

@ -37,7 +37,7 @@ struct sockaddr_in my_addr;
char *bootpfile = "/etc/bootparams";
extern void bootparamprog_1();
static void usage __P((void));
static void usage(void);
int
main(argc, argv)

View File

@ -33,9 +33,9 @@ char cln[MAX_MACHINE_NAME+1];
char dmn[MAX_MACHINE_NAME+1];
char path[MAX_PATH_LEN+1];
extern char *inet_ntoa();
static void usage __P((void));
int printgetfile __P((bp_getfile_res *));
int printwhoami __P((bp_whoami_res *));
static void usage(void);
int printgetfile(bp_getfile_res *);
int printwhoami(bp_whoami_res *);
bool_t
eachres_whoami(resultp, raddr)

View File

@ -32,17 +32,17 @@ static const char rcsid[] =
#endif
static void usage __P((void)),
run_reboot_jobs __P((cron_db *)),
cron_tick __P((cron_db *)),
cron_sync __P((void)),
cron_sleep __P((cron_db *)),
cron_clean __P((cron_db *)),
static void usage(void),
run_reboot_jobs(cron_db *),
cron_tick(cron_db *),
cron_sync(void),
cron_sleep(cron_db *),
cron_clean(cron_db *),
#ifdef USE_SIGCHLD
sigchld_handler __P((int)),
sigchld_handler(int),
#endif
sighup_handler __P((int)),
parse_args __P((int c, char *v[]));
sighup_handler(int),
parse_args(int c, char *v[]);
static time_t last_time = 0;
static int dst_enabled = 0;

View File

@ -199,49 +199,49 @@ typedef struct _cron_db {
} cron_db;
void set_cron_uid __P((void)),
set_cron_cwd __P((void)),
load_database __P((cron_db *)),
open_logfile __P((void)),
sigpipe_func __P((void)),
job_add __P((entry *, user *)),
do_command __P((entry *, user *)),
link_user __P((cron_db *, user *)),
unlink_user __P((cron_db *, user *)),
free_user __P((user *)),
env_free __P((char **)),
unget_char __P((int, FILE *)),
free_entry __P((entry *)),
skip_comments __P((FILE *)),
log_it __P((char *, int, char *, char *)),
log_close __P((void));
void set_cron_uid(void),
set_cron_cwd(void),
load_database(cron_db *),
open_logfile(void),
sigpipe_func(void),
job_add(entry *, user *),
do_command(entry *, user *),
link_user(cron_db *, user *),
unlink_user(cron_db *, user *),
free_user(user *),
env_free(char **),
unget_char(int, FILE *),
free_entry(entry *),
skip_comments(FILE *),
log_it(char *, int, char *, char *),
log_close(void);
int job_runqueue __P((void)),
set_debug_flags __P((char *)),
get_char __P((FILE *)),
get_string __P((char *, int, FILE *, char *)),
swap_uids __P((void)),
load_env __P((char *, FILE *)),
cron_pclose __P((FILE *)),
strcmp_until __P((char *, char *, int)),
allowed __P((char *)),
strdtb __P((char *));
int job_runqueue(void),
set_debug_flags(char *),
get_char(FILE *),
get_string(char *, int, FILE *, char *),
swap_uids(void),
load_env(char *, FILE *),
cron_pclose(FILE *),
strcmp_until(char *, char *, int),
allowed(char *),
strdtb(char *);
char *env_get __P((char *, char **)),
*arpadate __P((time_t *)),
*mkprints __P((unsigned char *, unsigned int)),
*first_word __P((char *, char *)),
**env_init __P((void)),
**env_copy __P((char **)),
**env_set __P((char **, char *));
char *env_get(char *, char **),
*arpadate(time_t *),
*mkprints(unsigned char *, unsigned int),
*first_word(char *, char *),
**env_init(void),
**env_copy(char **),
**env_set(char **, char *);
user *load_user __P((int, struct passwd *, char *)),
*find_user __P((cron_db *, char *));
user *load_user(int, struct passwd *, char *),
*find_user(cron_db *, char *);
entry *load_entry __P((FILE *, void (*)(),
struct passwd *, char **));
entry *load_entry(FILE *, void (*)(),
struct passwd *, char **);
FILE *cron_popen __P((char *, char *, entry *));
FILE *cron_popen(char *, char *, entry *);
/* in the C tradition, we only create

View File

@ -33,9 +33,9 @@ static const char rcsid[] =
#define TMAX(a,b) ((a)>(b)?(a):(b))
static void process_crontab __P((char *, char *, char *,
static void process_crontab(char *, char *, char *,
struct stat *,
cron_db *, cron_db *));
cron_db *, cron_db *);
void

View File

@ -38,8 +38,8 @@ static const char rcsid[] =
#endif
static void child_process __P((entry *, user *)),
do_univ __P((user *));
static void child_process(entry *, user *),
do_univ(user *);
void

View File

@ -1,3 +1,5 @@
/* $FreeBSD$ */
/* Copyright 1993,1994 by Paul Vixie
* All rights reserved
*
@ -71,7 +73,7 @@ extern void *malloc(), *realloc();
* external variables needed for the interface.
*/
#if (!defined(BSD) || (BSD < 198911)) && !defined(ATT) && !defined(UNICOS)
int getopt __P((int, char * const *, const char *));
int getopt(int, char * const *, const char *);
#endif
#if (!defined(BSD) || (BSD < 199103))
@ -109,19 +111,19 @@ extern int optind, opterr, optopt;
#endif
#ifdef NEED_STRCASECMP
extern int strcasecmp __P((char *, char *));
extern int strcasecmp(char *, char *);
#endif
#ifdef NEED_STRDUP
extern char *strdup __P((char *));
extern char *strdup(char *);
#endif
#ifdef NEED_STRERROR
extern char *strerror __P((int));
extern char *strerror(int);
#endif
#ifdef NEED_FLOCK
extern int flock __P((int, int));
extern int flock(int, int);
# define LOCK_SH 1
# define LOCK_EX 2
# define LOCK_NB 4
@ -129,17 +131,17 @@ extern int flock __P((int, int));
#endif
#ifdef NEED_SETSID
extern int setsid __P((void));
extern int setsid(void);
#endif
#ifdef NEED_GETDTABLESIZE
extern int getdtablesize __P((void));
extern int getdtablesize(void);
#endif
#ifdef NEED_SETENV
extern int setenv __P((char *, char *, int));
extern int setenv(char *, char *, int);
#endif
#ifdef NEED_VFORK
extern PID_T vfork __P((void));
extern PID_T vfork(void);
#endif

View File

@ -63,13 +63,13 @@ static FILE *NewCrontab;
static int CheckErrorCount;
static enum opt_t Option;
static struct passwd *pw;
static void list_cmd __P((void)),
delete_cmd __P((void)),
edit_cmd __P((void)),
poke_daemon __P((void)),
check_error __P((char *)),
parse_args __P((int c, char *v[]));
static int replace_cmd __P((void));
static void list_cmd(void),
delete_cmd(void),
edit_cmd(void),
poke_daemon(void),
check_error(char *),
parse_args(int c, char *v[]);
static int replace_cmd(void);
static void

View File

@ -41,10 +41,10 @@ typedef enum ecode {
#endif
} ecode_e;
static char get_list __P((bitstr_t *, int, int, char *[], int, FILE *)),
get_range __P((bitstr_t *, int, int, char *[], int, FILE *)),
get_number __P((int *, int, char *[], int, FILE *));
static int set_element __P((bitstr_t *, int, int, int));
static char get_list(bitstr_t *, int, int, char *[], int, FILE *),
get_range(bitstr_t *, int, int, char *[], int, FILE *),
get_number(int *, int, char *[], int, FILE *);
static int set_element(bitstr_t *, int, int, int);
static char *ecodes[] =
{

View File

@ -87,7 +87,7 @@ int hide_syms(const char *filename);
int verbose;
int main __P((int, char *[]));
int main(int, char *[]);
int main(argc, argv)
int argc;

View File

@ -100,22 +100,22 @@ static int pflag = 0;
static int inetd = 0;
static char *configfile = NULL;
int main __P((int, char **));
static int inetd_main __P((int, char **));
static int daemon_main __P((int, char **));
static void play_service __P((int));
static void play_child __P((int, struct sockaddr *));
static int faith_prefix __P((struct sockaddr *));
static int map6to4 __P((struct sockaddr_in6 *, struct sockaddr_in *));
static void sig_child __P((int));
static void sig_terminate __P((int));
static void start_daemon __P((void));
static void exit_stderr __P((const char *, ...))
int main(int, char **);
static int inetd_main(int, char **);
static int daemon_main(int, char **);
static void play_service(int);
static void play_child(int, struct sockaddr *);
static int faith_prefix(struct sockaddr *);
static int map6to4(struct sockaddr_in6 *, struct sockaddr_in *);
static void sig_child(int);
static void sig_terminate(int);
static void start_daemon(void);
static void exit_stderr(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
static void grab_myaddrs __P((void));
static void free_myaddrs __P((void));
static void update_myaddrs __P((void));
static void usage __P((void));
static void grab_myaddrs(void);
static void free_myaddrs(void);
static void update_myaddrs(void);
static void usage(void);
int
main(int argc, char **argv)

View File

@ -34,13 +34,13 @@
extern char logname[];
extern int dflag;
extern void tcp_relay __P((int, int, const char *));
extern void ftp_relay __P((int, int));
extern int ftp_active __P((int, int, int *, int *));
extern int ftp_passive __P((int, int, int *, int *));
extern void exit_success __P((const char *, ...))
extern void tcp_relay(int, int, const char *);
extern void ftp_relay(int, int);
extern int ftp_active(int, int, int *, int *);
extern int ftp_passive(int, int, int *, int *);
extern void exit_success(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern void exit_failure __P((const char *, ...))
extern void exit_failure(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
#define DEFAULT_PORT_NAME "telnet"

View File

@ -67,11 +67,11 @@ static int epsvall = 0;
enum state { NONE, LPRT, EPRT, LPSV, EPSV };
static int ftp_activeconn __P((void));
static int ftp_passiveconn __P((void));
static int ftp_copy __P((int, int));
static int ftp_copyresult __P((int, int, enum state));
static int ftp_copycommand __P((int, int, enum state *));
static int ftp_activeconn(void);
static int ftp_passiveconn(void);
static int ftp_copy(int, int);
static int ftp_copyresult(int, int, enum state);
static int ftp_copycommand(int, int, enum state *);
void
ftp_relay(int ctl6, int ctl4)

View File

@ -47,11 +47,11 @@
#include "faithd.h"
#include "prefix.h"
static int prefix_set __P((const char *, struct prefix *, int));
static struct config *config_load1 __P((const char *));
static int prefix_set(const char *, struct prefix *, int);
static struct config *config_load1(const char *);
#if 0
static void config_show1 __P((const struct config *));
static void config_show __P((void));
static void config_show1(const struct config *);
static void config_show(void);
#endif
struct config *config_list = NULL;

View File

@ -46,7 +46,7 @@ struct config {
#define _PATH_PREFIX_CONF "/etc/faithd.conf"
extern const char *prefix_string __P((const struct prefix *));
extern int prefix_match __P((const struct prefix *, const struct sockaddr *));
extern int config_load __P((const char *));
extern const struct config *config_match __P((struct sockaddr *, struct sockaddr *));
extern const char *prefix_string(const struct prefix *);
extern int prefix_match(const struct prefix *, const struct sockaddr *);
extern int config_load(const char *);
extern const struct config *config_match(struct sockaddr *, struct sockaddr *);

View File

@ -64,12 +64,12 @@ static pid_t ppid = (pid_t)0;
volatile time_t child_lastactive = (time_t)0;
static time_t parent_lastactive = (time_t)0;
static void sig_ctimeout __P((int));
static void sig_child __P((int));
static void notify_inactive __P((void));
static void notify_active __P((void));
static void send_data __P((int, int, const char *, int));
static void relay __P((int, int, const char *, int));
static void sig_ctimeout(int);
static void sig_child(int);
static void notify_inactive(void);
static void notify_active(void);
static void send_data(int, int, const char *, int);
static void relay(int, int, const char *, int);
/*
* Inactivity timer:

View File

@ -61,17 +61,17 @@ struct policyqueue {
TAILQ_HEAD(policyhead, policyqueue);
struct policyhead policyhead;
static void usage __P((void));
static void get_policy __P((void));
static void dump_policy __P((void));
static int mask2plen __P((struct sockaddr_in6 *));
static int parse_prefix __P((const char *, struct in6_addrpolicy *));
static void make_policy_fromfile __P((char *));
static void plen2mask __P((struct sockaddr_in6 *, int));
static void set_policy __P((void));
static void add_policy __P((char *, char *, char *));
static void delete_policy __P((char *));
static void flush_policy __P(());
static void usage(void);
static void get_policy(void);
static void dump_policy(void);
static int mask2plen(struct sockaddr_in6 *);
static int parse_prefix(const char *, struct in6_addrpolicy *);
static void make_policy_fromfile(char *);
static void plen2mask(struct sockaddr_in6 *, int);
static void set_policy(void);
static void add_policy(char *, char *, char *);
static void delete_policy(char *);
static void flush_policy();
int
main(argc, argv)

View File

@ -72,10 +72,10 @@ static const char rcsid[] =
#define KEYSERVSOCK "/var/run/keyservsock"
#endif
static void randomize __P(( des_block * ));
static void usage __P(( void ));
static int getrootkey __P(( des_block *, int ));
static int root_auth __P(( SVCXPRT *, struct svc_req * ));
static void randomize( des_block * );
static void usage( void );
static int getrootkey( des_block *, int );
static int root_auth( SVCXPRT *, struct svc_req * );
#ifdef DEBUG
static int debugging = 1;
@ -102,9 +102,9 @@ extern cryptkeyres *(*__key_decryptsession_pk_LOCAL)();
extern des_block *(*__key_gendes_LOCAL)();
extern int (*__des_crypt_LOCAL)();
cryptkeyres *key_encrypt_pk_2_svc_prog __P(( uid_t, cryptkeyarg2 * ));
cryptkeyres *key_decrypt_pk_2_svc_prog __P(( uid_t, cryptkeyarg2 * ));
des_block *key_gen_1_svc_prog __P(( void *, struct svc_req * ));
cryptkeyres *key_encrypt_pk_2_svc_prog( uid_t, cryptkeyarg2 * );
cryptkeyres *key_decrypt_pk_2_svc_prog( uid_t, cryptkeyarg2 * );
des_block *key_gen_1_svc_prog( void *, struct svc_req * );
int
main(argc, argv)

View File

@ -1,17 +1,17 @@
/*
* $FreeBSD$
*/
extern void setmodulus __P((char *modx));
extern void setmodulus(char *modx);
extern keystatus pk_setkey __P(( uid_t, keybuf ));
extern keystatus pk_encrypt __P(( uid_t, char *, netobj *, des_block * ));
extern keystatus pk_decrypt __P(( uid_t, char *, netobj *, des_block * ));
extern keystatus pk_netput __P(( uid_t, key_netstarg * ));
extern keystatus pk_netget __P(( uid_t, key_netstarg * ));
extern keystatus pk_get_conv_key __P(( uid_t, keybuf, cryptkeyres * ));
extern void pk_nodefaultkeys __P(( void ));
extern keystatus pk_setkey( uid_t, keybuf );
extern keystatus pk_encrypt( uid_t, char *, netobj *, des_block * );
extern keystatus pk_decrypt( uid_t, char *, netobj *, des_block * );
extern keystatus pk_netput( uid_t, key_netstarg * );
extern keystatus pk_netget( uid_t, key_netstarg * );
extern keystatus pk_get_conv_key( uid_t, keybuf, cryptkeyres * );
extern void pk_nodefaultkeys( void );
extern void crypt_prog_1 __P(( struct svc_req *, register SVCXPRT * ));
extern void load_des __P(( int, char * ));
extern void crypt_prog_1( struct svc_req *, register SVCXPRT * );
extern void load_des( int, char * );
extern int (*_my_crypt)__P(( char *, int, struct desparams * ));
extern int (*_my_crypt)( char *, int, struct desparams * );

View File

@ -59,12 +59,12 @@ static const char rcsid[] =
#include "keyserv.h"
static MINT *MODULUS;
static char *fetchsecretkey __P(( uid_t ));
static void writecache __P(( char *, char *, des_block * ));
static int readcache __P(( char *, char *, des_block * ));
static void extractdeskey __P (( MINT *, des_block * ));
static int storesecretkey __P(( uid_t, keybuf ));
static keystatus pk_crypt __P(( uid_t, char *, netobj *, des_block *, int));
static char *fetchsecretkey( uid_t );
static void writecache( char *, char *, des_block * );
static int readcache( char *, char *, des_block * );
static void extractdeskey( MINT *, des_block * );
static int storesecretkey( uid_t, keybuf );
static keystatus pk_crypt( uid_t, char *, netobj *, des_block *, int);
static int nodefaultkeys = 0;
@ -129,8 +129,8 @@ pk_decrypt(uid, remote_name, remote_key, key)
return (pk_crypt(uid, remote_name, remote_key, key, DES_DECRYPT));
}
static int store_netname __P(( uid_t, key_netstarg * ));
static int fetch_netname __P(( uid_t, key_netstarg * ));
static int store_netname( uid_t, key_netstarg * );
static int fetch_netname( uid_t, key_netstarg * );
keystatus
pk_netput(uid, netstore)

View File

@ -120,8 +120,8 @@ static int *socksetup(int _af, int _debuglvl);
static void usage(void);
/* XXX from libc/net/rcmd.c */
extern int __ivaliduser_sa __P((FILE *, struct sockaddr *, socklen_t,
const char *, const char *));
extern int __ivaliduser_sa(FILE *, struct sockaddr *, socklen_t,
const char *, const char *);
uid_t uid, euid;

View File

@ -125,31 +125,31 @@ char ntop_buf[INET6_ADDRSTRLEN]; /* inet_ntop() */
char host_buf[NI_MAXHOST]; /* getnameinfo() */
char ifix_buf[IFNAMSIZ]; /* if_indextoname() */
int main __P((int, char **));
int file __P((char *));
void getsocket __P((void));
int set __P((int, char **));
void get __P((char *));
int delete __P((char *));
void dump __P((struct in6_addr *, int));
static struct in6_nbrinfo *getnbrinfo __P((struct in6_addr *, int, int));
static char *ether_str __P((struct sockaddr_dl *));
int ndp_ether_aton __P((char *, u_char *));
void usage __P((void));
int rtmsg __P((int));
void ifinfo __P((char *, int, char **));
void rtrlist __P((void));
void plist __P((void));
void pfx_flush __P((void));
void rtr_flush __P((void));
void harmonize_rtr __P((void));
int main(int, char **);
int file(char *);
void getsocket(void);
int set(int, char **);
void get(char *);
int delete(char *);
void dump(struct in6_addr *, int);
static struct in6_nbrinfo *getnbrinfo(struct in6_addr *, int, int);
static char *ether_str(struct sockaddr_dl *);
int ndp_ether_aton(char *, u_char *);
void usage(void);
int rtmsg(int);
void ifinfo(char *, int, char **);
void rtrlist(void);
void plist(void);
void pfx_flush(void);
void rtr_flush(void);
void harmonize_rtr(void);
#ifdef SIOCSDEFIFACE_IN6 /* XXX: check SIOCGDEFIFACE_IN6 as well? */
static void getdefif __P((void));
static void setdefif __P((char *));
static void getdefif(void);
static void setdefif(char *);
#endif
static char *sec2str __P((time_t));
static char *ether_str __P((struct sockaddr_dl *));
static void ts_print __P((const struct timeval *));
static char *sec2str(time_t);
static char *ether_str(struct sockaddr_dl *);
static void ts_print(const struct timeval *);
#ifdef ICMPV6CTL_ND6_DRLIST
static char *rtpref_str[] = {

View File

@ -40,7 +40,7 @@ static const char rcsid[] =
#include <pccard/cardinfo.h>
#include <pccard/cis.h>
static void usage __P((char *));
static void usage(char *);
int
enabler_main(argc, argv)

View File

@ -90,7 +90,7 @@ struct {
static char *getpackagesite(void);
int getosreldate(void);
static void usage __P((void));
static void usage(void);
int
main(int argc, char **argv)

View File

@ -48,7 +48,7 @@ enum zipper Zipper = GZIP;
#endif
static void usage __P((void));
static void usage(void);
int
main(int argc, char **argv)

View File

@ -37,7 +37,7 @@ Boolean NoDeInstall = FALSE;
Boolean Recursive = FALSE;
match_t MatchType = MATCH_GLOB;
static void usage __P((void));
static void usage(void);
int
main(int argc, char **argv)

View File

@ -39,7 +39,7 @@ char *LookUpOrigin = NULL;
Boolean KeepPackage = FALSE;
struct which_head *whead;
static void usage __P((void));
static void usage(void);
int
main(int argc, char **argv)

View File

@ -45,19 +45,19 @@ extern int quiet;
extern char *userkey;
/* common.c */
extern int read_header_and_diagnose __P((FILE *file, \
extern int read_header_and_diagnose(FILE *file, \
/*@out@*/struct mygzip_header *h, /*@null@*/struct signature **sign, \
const char *filename));
extern int reap __P((pid_t pid));
const char *filename);
extern int reap(pid_t pid);
/* sign.c */
extern int sign __P((/*@observer@*/const char *filename, int type, \
/*@null@*/const char *userid, char *envp[]));
extern int sign(/*@observer@*/const char *filename, int type, \
/*@null@*/const char *userid, char *envp[]);
/* check.c */
extern int check_signature __P((/*@dependent@*/FILE *file, \
extern int check_signature(/*@dependent@*/FILE *file, \
/*@null@*/const char *userid, char *envp[], \
/*@observer@*/const char *filename));
/*@observer@*/const char *filename);
#define PKG_BADSIG 0
#define PKG_GOODSIG 1
@ -72,29 +72,29 @@ typedef /*@observer@*/char *pchar;
/* sha1.c */
#define SHA1_DB_NAME "/var/db/pkg/SHA1"
extern void *new_sha1_checker __P((struct mygzip_header *h, \
extern void *new_sha1_checker(struct mygzip_header *h, \
struct signature *sign, const char *userid, char *envp[], \
const char *filename));
const char *filename);
extern void sha1_add __P((void *arg, const char *buffer, \
size_t length));
extern void sha1_add(void *arg, const char *buffer, \
size_t length);
extern int sha1_sign_ok __P((void *arg));
extern int sha1_sign_ok(void *arg);
extern int retrieve_sha1_marker __P((const char *filename, \
struct signature **sign, const char *userid));
extern int retrieve_sha1_marker(const char *filename, \
struct signature **sign, const char *userid);
/* x509.c */
#define X509_DB_NAME "/var/db/pkg/X509"
extern void *new_x509_checker __P((struct mygzip_header *h, \
extern void *new_x509_checker(struct mygzip_header *h, \
struct signature *sign, const char *userid, char *envp[], \
const char *filename));
const char *filename);
extern void x509_add __P((void *arg, const char *buffer, \
size_t length));
extern void x509_add(void *arg, const char *buffer, \
size_t length);
extern int x509_sign_ok __P((void *arg));
extern int x509_sign_ok(void *arg);
extern int retrieve_x509_marker __P((const char *filename, \
struct signature **sign, const char *userid));
extern int retrieve_x509_marker(const char *filename, \
struct signature **sign, const char *userid);

View File

@ -68,21 +68,21 @@ struct signature {
#define GZIP_SIGNED 1 /* gzip file, signature parsed ok */
#define GZIP_NOT_GZIP 2 /* not a proper gzip file */
#define GZIP_NOT_PGPSIGNED 3 /* gzip file, unknown extension */
extern int gzip_read_header __P((FILE *f, /*@out@*/struct mygzip_header *h, \
/*@null@*/struct signature **sign));
extern int gzip_read_header(FILE *f, /*@out@*/struct mygzip_header *h, \
/*@null@*/struct signature **sign);
/* gzip_write_header returns 1 for success */
extern int gzip_write_header __P((FILE *f, const struct mygzip_header *h, \
/*@null@*/struct signature *sign));
extern int gzip_write_header(FILE *f, const struct mygzip_header *h, \
/*@null@*/struct signature *sign);
/*
* Writing header to memory. Returns size needed, or 0 if buffer too small
* buffer must be at least 14 characters
*/
extern int gzip_copy_header __P((const struct mygzip_header *h, \
extern int gzip_copy_header(const struct mygzip_header *h, \
/*@null@*/struct signature *sign, \
void (*add)(void *, const char *, size_t), void *data));
void (*add)(void *, const char *, size_t), void *data);
extern void free_signature __P((/*@null@*/struct signature *sign));
extern void sign_fill_tag __P((struct signature *sign));
extern void free_signature(/*@null@*/struct signature *sign);
extern void sign_fill_tag(struct signature *sign);
#define KNOWN_TAGS 4
#define TAG_PGP 0
#define TAG_SHA1 1

View File

@ -10,16 +10,16 @@
struct mygzip_header;
struct signature;
extern void *new_pgp_checker __P((struct mygzip_header *h, \
extern void *new_pgp_checker(struct mygzip_header *h, \
struct signature *sign, const char *userid, char *envp[], \
const char *filename));
const char *filename);
extern void pgp_add __P((void *arg, const char *buffer, \
size_t length));
extern void pgp_add(void *arg, const char *buffer, \
size_t length);
extern int pgp_sign_ok __P((void *arg));
extern int pgp_sign_ok(void *arg);
extern void handle_pgp_passphrase __P((void));
extern void handle_pgp_passphrase(void);
extern int retrieve_pgp_signature __P((const char *filename, \
struct signature **sign, const char *userid, char *envp[]));
extern int retrieve_pgp_signature(const char *filename, \
struct signature **sign, const char *userid, char *envp[]);

View File

@ -18,10 +18,10 @@
#if defined(BSD4_4)
#include <err.h>
#else
extern void warn __P((const char *fmt, ...));
extern void warnx __P((const char *fmt, ...));
extern void warn(const char *fmt, ...);
extern void warnx(const char *fmt, ...);
#endif
extern void set_program_name __P((const char * name));
extern void set_program_name(const char * name);
#ifndef __GNUC__
#define __attribute__(x)

View File

@ -35,7 +35,7 @@ Boolean RegexExtended = FALSE;
Boolean UseINDEXOnly = FALSE;
Boolean ShowOrigin = FALSE;
static void usage __P((void));
static void usage(void);
int
main(int argc, char **argv)

View File

@ -129,26 +129,26 @@ static int passwd_from_file;
#define CHAP_WITHPEER 4
#define CHAP_PEER 8
extern char *crypt __P((const char *, const char *));
extern char *crypt(const char *, const char *);
/* Prototypes for procedures local to this file. */
static void network_phase __P((int));
static void check_idle __P((void *));
static void connect_time_expired __P((void *));
static int plogin __P((char *, char *, char **, int *));
static void plogout __P((void));
static int null_login __P((int));
static int get_pap_passwd __P((char *));
static int have_pap_secret __P((void));
static int have_chap_secret __P((char *, char *, u_int32_t));
static int ip_addr_check __P((u_int32_t, struct wordlist *));
static int scan_authfile __P((FILE *, char *, char *, u_int32_t, char *,
struct wordlist **, char *));
static void free_wordlist __P((struct wordlist *));
static void auth_set_ip_addr __P((int));
static void auth_script __P((char *));
static void set_allowed_addrs __P((int, struct wordlist *));
static void network_phase(int);
static void check_idle(void *);
static void connect_time_expired(void *);
static int plogin(char *, char *, char **, int *);
static void plogout(void);
static int null_login(int);
static int get_pap_passwd(char *);
static int have_pap_secret(void);
static int have_chap_secret(char *, char *, u_int32_t);
static int ip_addr_check(u_int32_t, struct wordlist *);
static int scan_authfile(FILE *, char *, char *, u_int32_t, char *,
struct wordlist **, char *);
static void free_wordlist(struct wordlist *);
static void auth_set_ip_addr(int);
static void auth_script(char *);
static void set_allowed_addrs(int, struct wordlist *);
/*
* An Open on LCP has requested a change from Dead to Establish phase.

View File

@ -37,14 +37,14 @@ static char rcsid[] = "$FreeBSD$";
/*
* Protocol entry points.
*/
static void cbcp_init __P((int unit));
static void cbcp_open __P((int unit));
static void cbcp_lowerup __P((int unit));
static void cbcp_input __P((int unit, u_char *pkt, int len));
static void cbcp_protrej __P((int unit));
static int cbcp_printpkt __P((u_char *pkt, int len,
void (*printer) __P((void *, char *, ...)),
void *arg));
static void cbcp_init(int unit);
static void cbcp_open(int unit);
static void cbcp_lowerup(int unit);
static void cbcp_input(int unit, u_char *pkt, int len);
static void cbcp_protrej(int unit);
static int cbcp_printpkt(u_char *pkt, int len,
void (*printer)(void *, char *, ...),
void *arg);
struct protent cbcp_protent = {
PPP_CBCP,
@ -68,11 +68,11 @@ cbcp_state cbcp[NUM_PPP];
/* internal prototypes */
static void cbcp_recvreq __P((cbcp_state *us, char *pckt, int len));
static void cbcp_resp __P((cbcp_state *us));
static void cbcp_up __P((cbcp_state *us));
static void cbcp_recvack __P((cbcp_state *us, char *pckt, int len));
static void cbcp_send __P((cbcp_state *us, u_char code, u_char *buf, int len));
static void cbcp_recvreq(cbcp_state *us, char *pckt, int len);
static void cbcp_resp(cbcp_state *us);
static void cbcp_up(cbcp_state *us);
static void cbcp_recvack(cbcp_state *us, char *pckt, int len);
static void cbcp_send(cbcp_state *us, u_char code, u_char *buf, int len);
/* init state */
static void
@ -183,7 +183,7 @@ static int
cbcp_printpkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int code, opt, id, len, olen, delay;

View File

@ -42,17 +42,17 @@ static char rcsid[] = "$FreeBSD$";
/*
* Protocol entry points from main code.
*/
static void ccp_init __P((int unit));
static void ccp_open __P((int unit));
static void ccp_close __P((int unit, char *));
static void ccp_lowerup __P((int unit));
static void ccp_lowerdown __P((int));
static void ccp_input __P((int unit, u_char *pkt, int len));
static void ccp_protrej __P((int unit));
static int ccp_printpkt __P((u_char *pkt, int len,
void (*printer) __P((void *, char *, ...)),
void *arg));
static void ccp_datainput __P((int unit, u_char *pkt, int len));
static void ccp_init(int unit);
static void ccp_open(int unit);
static void ccp_close(int unit, char *);
static void ccp_lowerup(int unit);
static void ccp_lowerdown(int);
static void ccp_input(int unit, u_char *pkt, int len);
static void ccp_protrej(int unit);
static int ccp_printpkt(u_char *pkt, int len,
void (*printer)(void *, char *, ...),
void *arg);
static void ccp_datainput(int unit, u_char *pkt, int len);
struct protent ccp_protent = {
PPP_CCP,
@ -81,18 +81,18 @@ ccp_options ccp_hisoptions[NUM_PPP]; /* what we agreed to do */
/*
* Callbacks for fsm code.
*/
static void ccp_resetci __P((fsm *));
static int ccp_cilen __P((fsm *));
static void ccp_addci __P((fsm *, u_char *, int *));
static int ccp_ackci __P((fsm *, u_char *, int));
static int ccp_nakci __P((fsm *, u_char *, int));
static int ccp_rejci __P((fsm *, u_char *, int));
static int ccp_reqci __P((fsm *, u_char *, int *, int));
static void ccp_up __P((fsm *));
static void ccp_down __P((fsm *));
static int ccp_extcode __P((fsm *, int, int, u_char *, int));
static void ccp_rack_timeout __P((void *));
static char *method_name __P((ccp_options *, ccp_options *));
static void ccp_resetci(fsm *);
static int ccp_cilen(fsm *);
static void ccp_addci(fsm *, u_char *, int *);
static int ccp_ackci(fsm *, u_char *, int);
static int ccp_nakci(fsm *, u_char *, int);
static int ccp_rejci(fsm *, u_char *, int);
static int ccp_reqci(fsm *, u_char *, int *, int);
static void ccp_up(fsm *);
static void ccp_down(fsm *);
static int ccp_extcode(fsm *, int, int, u_char *, int);
static void ccp_rack_timeout(void *);
static char *method_name(ccp_options *, ccp_options *);
static fsm_callbacks ccp_callbacks = {
ccp_resetci,
@ -954,7 +954,7 @@ static int
ccp_printpkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
u_char *p0, *optend;

View File

@ -58,13 +58,13 @@ static char rcsid[] = "$FreeBSD$";
/*
* Protocol entry points.
*/
static void ChapInit __P((int));
static void ChapLowerUp __P((int));
static void ChapLowerDown __P((int));
static void ChapInput __P((int, u_char *, int));
static void ChapProtocolReject __P((int));
static int ChapPrintPkt __P((u_char *, int,
void (*) __P((void *, char *, ...)), void *));
static void ChapInit(int);
static void ChapLowerUp(int);
static void ChapLowerDown(int);
static void ChapInput(int, u_char *, int);
static void ChapProtocolReject(int);
static int ChapPrintPkt(u_char *, int,
void (*)(void *, char *, ...), void *);
struct protent chap_protent = {
PPP_CHAP,
@ -86,20 +86,20 @@ struct protent chap_protent = {
chap_state chap[NUM_PPP]; /* CHAP state; one for each unit */
static void ChapChallengeTimeout __P((void *));
static void ChapResponseTimeout __P((void *));
static void ChapReceiveChallenge __P((chap_state *, u_char *, int, int));
static void ChapRechallenge __P((void *));
static void ChapReceiveResponse __P((chap_state *, u_char *, int, int));
static void ChapReceiveSuccess __P((chap_state *, u_char *, int, int));
static void ChapReceiveFailure __P((chap_state *, u_char *, int, int));
static void ChapSendStatus __P((chap_state *, int));
static void ChapSendChallenge __P((chap_state *));
static void ChapSendResponse __P((chap_state *));
static void ChapGenChallenge __P((chap_state *));
static void ChapChallengeTimeout(void *);
static void ChapResponseTimeout(void *);
static void ChapReceiveChallenge(chap_state *, u_char *, int, int);
static void ChapRechallenge(void *);
static void ChapReceiveResponse(chap_state *, u_char *, int, int);
static void ChapReceiveSuccess(chap_state *, u_char *, int, int);
static void ChapReceiveFailure(chap_state *, u_char *, int, int);
static void ChapSendStatus(chap_state *, int);
static void ChapSendChallenge(chap_state *);
static void ChapSendResponse(chap_state *);
static void ChapGenChallenge(chap_state *);
extern double drand48 __P((void));
extern void srand48 __P((long));
extern double drand48(void);
extern void srand48(long);
/*
* ChapInit - Initialize a CHAP unit.
@ -815,7 +815,7 @@ static int
ChapPrintPkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int code, id, len;

View File

@ -115,8 +115,8 @@ typedef struct chap_state {
extern chap_state chap[];
void ChapAuthWithPeer __P((int, char *, int));
void ChapAuthPeer __P((int, char *, int));
void ChapAuthWithPeer(int, char *, int);
void ChapAuthPeer(int, char *, int);
extern struct protent chap_protent;

View File

@ -66,18 +66,18 @@ typedef struct {
in case this struct gets padded. */
static void ChallengeResponse __P((u_char *, u_char *, u_char *));
static void DesEncrypt __P((u_char *, u_char *, u_char *));
static void MakeKey __P((u_char *, u_char *));
static u_char Get7Bits __P((u_char *, int));
static void ChapMS_NT __P((char *, int, char *, int, MS_ChapResponse *));
static void ChallengeResponse(u_char *, u_char *, u_char *);
static void DesEncrypt(u_char *, u_char *, u_char *);
static void MakeKey(u_char *, u_char *);
static u_char Get7Bits(u_char *, int);
static void ChapMS_NT(char *, int, char *, int, MS_ChapResponse *);
#ifdef MSLANMAN
static void ChapMS_LANMan __P((char *, int, char *, int, MS_ChapResponse *));
static void ChapMS_LANMan(char *, int, char *, int, MS_ChapResponse *);
#endif
#ifdef USE_CRYPT
static void Expand __P((u_char *, u_char *));
static void Collapse __P((u_char *, u_char *));
static void Expand(u_char *, u_char *);
static void Collapse(u_char *, u_char *);
#endif
static void

View File

@ -27,7 +27,7 @@
#define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */
#define MAX_NT_PASSWORD 256 /* Maximum number of (Unicode) chars in an NT password */
void ChapMS __P((chap_state *, char *, int, char *, int));
void ChapMS(chap_state *, char *, int, char *, int);
#define __CHAPMS_INCLUDE__
#endif /* __CHAPMS_INCLUDE__ */

View File

@ -62,7 +62,7 @@ struct packet {
struct packet *pend_q;
struct packet *pend_qtail;
static int active_packet __P((unsigned char *, int));
static int active_packet(unsigned char *, int);
/*
* demand_conf - configure the interface for doing dial-on-demand.

View File

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/*
eui64.h - EUI64 routines for IPv6CP.
Copyright (C) 1999 Tommi Komulainen <Tommi.Komulainen@iki.fi>
@ -91,7 +92,7 @@ typedef union
} while (0)
#define eui64_setlo32(e, l) eui64_set32(e, l)
char *eui64_ntoa __P((eui64_t)); /* Returns ascii representation of id */
char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */
#endif /* __EUI64_H__ */

View File

@ -35,14 +35,14 @@ static char rcsid[] = "$FreeBSD$";
#include "pppd.h"
#include "fsm.h"
static void fsm_timeout __P((void *));
static void fsm_rconfreq __P((fsm *, int, u_char *, int));
static void fsm_rconfack __P((fsm *, int, u_char *, int));
static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int));
static void fsm_rtermreq __P((fsm *, int, u_char *, int));
static void fsm_rtermack __P((fsm *));
static void fsm_rcoderej __P((fsm *, u_char *, int));
static void fsm_sconfreq __P((fsm *, int));
static void fsm_timeout(void *);
static void fsm_rconfreq(fsm *, int, u_char *, int);
static void fsm_rconfack(fsm *, int, u_char *, int);
static void fsm_rconfnakrej(fsm *, int, int, u_char *, int);
static void fsm_rtermreq(fsm *, int, u_char *, int);
static void fsm_rtermack(fsm *);
static void fsm_rcoderej(fsm *, u_char *, int);
static void fsm_sconfreq(fsm *, int);
#define PROTO_NAME(f) ((f)->callbacks->proto_name)
@ -508,7 +508,7 @@ fsm_rconfnakrej(f, code, id, inp, len)
u_char *inp;
int len;
{
int (*proc) __P((fsm *, u_char *, int));
int (*proc)(fsm *, u_char *, int);
int ret;
FSMDEBUG((LOG_INFO, "fsm_rconfnakrej(%s): Rcvd id %d.",

View File

@ -62,33 +62,33 @@ typedef struct fsm {
typedef struct fsm_callbacks {
void (*resetci) /* Reset our Configuration Information */
__P((fsm *));
(fsm *);
int (*cilen) /* Length of our Configuration Information */
__P((fsm *));
(fsm *);
void (*addci) /* Add our Configuration Information */
__P((fsm *, u_char *, int *));
(fsm *, u_char *, int *);
int (*ackci) /* ACK our Configuration Information */
__P((fsm *, u_char *, int));
(fsm *, u_char *, int);
int (*nakci) /* NAK our Configuration Information */
__P((fsm *, u_char *, int));
(fsm *, u_char *, int);
int (*rejci) /* Reject our Configuration Information */
__P((fsm *, u_char *, int));
(fsm *, u_char *, int);
int (*reqci) /* Request peer's Configuration Information */
__P((fsm *, u_char *, int *, int));
(fsm *, u_char *, int *, int);
void (*up) /* Called when fsm reaches OPENED state */
__P((fsm *));
(fsm *);
void (*down) /* Called when fsm leaves OPENED state */
__P((fsm *));
(fsm *);
void (*starting) /* Called when we want the lower layer */
__P((fsm *));
(fsm *);
void (*finished) /* Called when we don't want the lower layer */
__P((fsm *));
(fsm *);
void (*protreject) /* Called when Protocol-Reject received */
__P((int));
(int);
void (*retransmit) /* Retransmission is necessary */
__P((fsm *));
(fsm *);
int (*extcode) /* Called when unknown code received */
__P((fsm *, int, int, u_char *, int));
(fsm *, int, int, u_char *, int);
char *proto_name; /* String name for protocol (for messages) */
} fsm_callbacks;
@ -128,14 +128,14 @@ typedef struct fsm_callbacks {
/*
* Prototypes
*/
void fsm_init __P((fsm *));
void fsm_lowerup __P((fsm *));
void fsm_lowerdown __P((fsm *));
void fsm_open __P((fsm *));
void fsm_close __P((fsm *, char *));
void fsm_input __P((fsm *, u_char *, int));
void fsm_protreject __P((fsm *));
void fsm_sdata __P((fsm *, int, int, u_char *, int));
void fsm_init(fsm *);
void fsm_lowerup(fsm *);
void fsm_lowerdown(fsm *);
void fsm_open(fsm *);
void fsm_close(fsm *, char *);
void fsm_input(fsm *, u_char *, int);
void fsm_protreject(fsm *);
void fsm_sdata(fsm *, int, int, u_char *, int);
/*

View File

@ -53,17 +53,17 @@ static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */
/*
* Callbacks for fsm code. (CI = Configuration Information)
*/
static void ipcp_resetci __P((fsm *)); /* Reset our CI */
static int ipcp_cilen __P((fsm *)); /* Return length of our CI */
static void ipcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
static int ipcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
static int ipcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
static int ipcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
static int ipcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
static void ipcp_up __P((fsm *)); /* We're UP */
static void ipcp_down __P((fsm *)); /* We're DOWN */
static void ipcp_script __P((fsm *, char *)); /* Run an up/down script */
static void ipcp_finished __P((fsm *)); /* Don't need lower layer */
static void ipcp_resetci(fsm *); /* Reset our CI */
static int ipcp_cilen(fsm *); /* Return length of our CI */
static void ipcp_addci(fsm *, u_char *, int *); /* Add our CI */
static int ipcp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */
static int ipcp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */
static int ipcp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */
static int ipcp_reqci(fsm *, u_char *, int *, int); /* Rcv CI */
static void ipcp_up(fsm *); /* We're UP */
static void ipcp_down(fsm *); /* We're DOWN */
static void ipcp_script(fsm *, char *); /* Run an up/down script */
static void ipcp_finished(fsm *); /* Don't need lower layer */
fsm ipcp_fsm[NUM_PPP]; /* IPCP fsm structure */
@ -88,18 +88,18 @@ static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
/*
* Protocol entry points from main code.
*/
static void ipcp_init __P((int));
static void ipcp_open __P((int));
static void ipcp_close __P((int, char *));
static void ipcp_lowerup __P((int));
static void ipcp_lowerdown __P((int));
static void ipcp_input __P((int, u_char *, int));
static void ipcp_protrej __P((int));
static int ipcp_printpkt __P((u_char *, int,
void (*) __P((void *, char *, ...)), void *));
static void ip_check_options __P((void));
static int ip_demand_conf __P((int));
static int ip_active_pkt __P((u_char *, int));
static void ipcp_init(int);
static void ipcp_open(int);
static void ipcp_close(int, char *);
static void ipcp_lowerup(int);
static void ipcp_lowerdown(int);
static void ipcp_input(int, u_char *, int);
static void ipcp_protrej(int);
static int ipcp_printpkt(u_char *, int,
void (*) (void *, char *, ...), void *);
static void ip_check_options(void);
static int ip_demand_conf(int);
static int ip_active_pkt(u_char *, int);
struct protent ipcp_protent = {
PPP_IPCP,
@ -119,7 +119,7 @@ struct protent ipcp_protent = {
ip_active_pkt
};
static void ipcp_clear_addrs __P((int));
static void ipcp_clear_addrs(int);
/*
* Lengths of configuration options.
@ -1367,7 +1367,7 @@ static int
ipcp_printpkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int code, id, len, olen;

View File

@ -65,6 +65,6 @@ extern ipcp_options ipcp_gotoptions[];
extern ipcp_options ipcp_allowoptions[];
extern ipcp_options ipcp_hisoptions[];
char *ip_ntoa __P((u_int32_t));
char *ip_ntoa(u_int32_t);
extern struct protent ipcp_protent;

View File

@ -146,16 +146,16 @@ static int ipv6cp_is_up;
/*
* Callbacks for fsm code. (CI = Configuration Information)
*/
static void ipv6cp_resetci __P((fsm *)); /* Reset our CI */
static int ipv6cp_cilen __P((fsm *)); /* Return length of our CI */
static void ipv6cp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
static int ipv6cp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
static int ipv6cp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
static int ipv6cp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
static int ipv6cp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
static void ipv6cp_up __P((fsm *)); /* We're UP */
static void ipv6cp_down __P((fsm *)); /* We're DOWN */
static void ipv6cp_finished __P((fsm *)); /* Don't need lower layer */
static void ipv6cp_resetci(fsm *); /* Reset our CI */
static int ipv6cp_cilen(fsm *); /* Return length of our CI */
static void ipv6cp_addci(fsm *, u_char *, int *); /* Add our CI */
static int ipv6cp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */
static int ipv6cp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */
static int ipv6cp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */
static int ipv6cp_reqci(fsm *, u_char *, int *, int); /* Rcv CI */
static void ipv6cp_up(fsm *); /* We're UP */
static void ipv6cp_down(fsm *); /* We're DOWN */
static void ipv6cp_finished(fsm *); /* Don't need lower layer */
fsm ipv6cp_fsm[NUM_PPP]; /* IPV6CP fsm structure */
@ -181,18 +181,18 @@ static fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */
/*
* Protocol entry points from main code.
*/
static void ipv6cp_init __P((int));
static void ipv6cp_open __P((int));
static void ipv6cp_close __P((int, char *));
static void ipv6cp_lowerup __P((int));
static void ipv6cp_lowerdown __P((int));
static void ipv6cp_input __P((int, u_char *, int));
static void ipv6cp_protrej __P((int));
static int ipv6cp_printpkt __P((u_char *, int,
void (*) __P((void *, char *, ...)), void *));
static void ipv6_check_options __P((void));
static int ipv6_demand_conf __P((int));
static int ipv6_active_pkt __P((u_char *, int));
static void ipv6cp_init(int);
static void ipv6cp_open(int);
static void ipv6cp_close(int, char *);
static void ipv6cp_lowerup(int);
static void ipv6cp_lowerdown(int);
static void ipv6cp_input(int, u_char *, int);
static void ipv6cp_protrej(int);
static int ipv6cp_printpkt(u_char *, int,
void (*)(void *, char *, ...), void *);
static void ipv6_check_options(void);
static int ipv6_demand_conf(int);
static int ipv6_active_pkt(u_char *, int);
struct protent ipv6cp_protent = {
PPP_IPV6CP,
@ -212,8 +212,8 @@ struct protent ipv6cp_protent = {
ipv6_active_pkt
};
static void ipv6cp_clear_addrs __P((int, eui64_t, eui64_t));
static void ipv6cp_script __P((char *));
static void ipv6cp_clear_addrs(int, eui64_t, eui64_t);
static void ipv6cp_script(char *);
/*
* Lengths of configuration options.
@ -1293,7 +1293,7 @@ static int
ipv6cp_printpkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int code, id, len, olen;

View File

@ -126,4 +126,4 @@ extern ipv6cp_options ipv6cp_hisoptions[];
extern struct protent ipv6cp_protent;
extern int setifaceid __P((char **arg));
extern int setifaceid(char **arg);

View File

@ -52,16 +52,16 @@ ipxcp_options ipxcp_hisoptions[NUM_PPP]; /* Options that we ack'd */
/*
* Callbacks for fsm code. (CI = Configuration Information)
*/
static void ipxcp_resetci __P((fsm *)); /* Reset our CI */
static int ipxcp_cilen __P((fsm *)); /* Return length of our CI */
static void ipxcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
static int ipxcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
static int ipxcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
static int ipxcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
static int ipxcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
static void ipxcp_up __P((fsm *)); /* We're UP */
static void ipxcp_down __P((fsm *)); /* We're DOWN */
static void ipxcp_script __P((fsm *, char *)); /* Run an up/down script */
static void ipxcp_resetci(fsm *); /* Reset our CI */
static int ipxcp_cilen(fsm *); /* Return length of our CI */
static void ipxcp_addci(fsm *, u_char *, int *); /* Add our CI */
static int ipxcp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */
static int ipxcp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */
static int ipxcp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */
static int ipxcp_reqci(fsm *, u_char *, int *, int); /* Rcv CI */
static void ipxcp_up(fsm *); /* We're UP */
static void ipxcp_down(fsm *); /* We're DOWN */
static void ipxcp_script(fsm *, char *); /* Run an up/down script */
fsm ipxcp_fsm[NUM_PPP]; /* IPXCP fsm structure */
@ -87,15 +87,15 @@ static fsm_callbacks ipxcp_callbacks = { /* IPXCP callback routines */
* Protocol entry points.
*/
static void ipxcp_init __P((int));
static void ipxcp_open __P((int));
static void ipxcp_close __P((int, char *));
static void ipxcp_lowerup __P((int));
static void ipxcp_lowerdown __P((int));
static void ipxcp_input __P((int, u_char *, int));
static void ipxcp_protrej __P((int));
static int ipxcp_printpkt __P((u_char *, int,
void (*) __P((void *, char *, ...)), void *));
static void ipxcp_init(int);
static void ipxcp_open(int);
static void ipxcp_close(int, char *);
static void ipxcp_lowerup(int);
static void ipxcp_lowerdown(int);
static void ipxcp_input(int, u_char *, int);
static void ipxcp_protrej(int);
static int ipxcp_printpkt(u_char *, int,
void (*)(void *, char *, ...), void *);
struct protent ipxcp_protent = {
PPP_IPXCP,
@ -1274,7 +1274,7 @@ static int
ipxcp_printpkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int code, id, len, olen;

View File

@ -58,31 +58,31 @@ static u_char nak_buffer[PPP_MRU]; /* where we construct a nak packet */
/*
* Callbacks for fsm code. (CI = Configuration Information)
*/
static void lcp_resetci __P((fsm *)); /* Reset our CI */
static int lcp_cilen __P((fsm *)); /* Return length of our CI */
static void lcp_addci __P((fsm *, u_char *, int *)); /* Add our CI to pkt */
static int lcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
static int lcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
static int lcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
static int lcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv peer CI */
static void lcp_up __P((fsm *)); /* We're UP */
static void lcp_down __P((fsm *)); /* We're DOWN */
static void lcp_starting __P((fsm *)); /* We need lower layer up */
static void lcp_finished __P((fsm *)); /* We need lower layer down */
static int lcp_extcode __P((fsm *, int, int, u_char *, int));
static void lcp_rprotrej __P((fsm *, u_char *, int));
static void lcp_resetci(fsm *); /* Reset our CI */
static int lcp_cilen(fsm *); /* Return length of our CI */
static void lcp_addci(fsm *, u_char *, int *); /* Add our CI to pkt */
static int lcp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */
static int lcp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */
static int lcp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */
static int lcp_reqci(fsm *, u_char *, int *, int); /* Rcv peer CI */
static void lcp_up(fsm *); /* We're UP */
static void lcp_down(fsm *); /* We're DOWN */
static void lcp_starting(fsm *); /* We need lower layer up */
static void lcp_finished(fsm *); /* We need lower layer down */
static int lcp_extcode(fsm *, int, int, u_char *, int);
static void lcp_rprotrej(fsm *, u_char *, int);
/*
* routines to send LCP echos to peer
*/
static void lcp_echo_lowerup __P((int));
static void lcp_echo_lowerdown __P((int));
static void LcpEchoTimeout __P((void *));
static void lcp_received_echo_reply __P((fsm *, int, u_char *, int));
static void LcpSendEchoRequest __P((fsm *));
static void LcpLinkFailure __P((fsm *));
static void LcpEchoCheck __P((fsm *));
static void lcp_echo_lowerup(int);
static void lcp_echo_lowerdown(int);
static void LcpEchoTimeout(void *);
static void lcp_received_echo_reply(fsm *, int, u_char *, int);
static void LcpSendEchoRequest(fsm *);
static void LcpLinkFailure(fsm *);
static void LcpEchoCheck(fsm *);
static fsm_callbacks lcp_callbacks = { /* LCP callback routines */
lcp_resetci, /* Reset our Configuration Information */
@ -107,11 +107,11 @@ static fsm_callbacks lcp_callbacks = { /* LCP callback routines */
* Some of these are called directly.
*/
static void lcp_init __P((int));
static void lcp_input __P((int, u_char *, int));
static void lcp_protrej __P((int));
static int lcp_printpkt __P((u_char *, int,
void (*) __P((void *, char *, ...)), void *));
static void lcp_init(int);
static void lcp_input(int, u_char *, int);
static void lcp_protrej(int);
static int lcp_printpkt(u_char *, int,
void (*)(void *, char *, ...), void *);
struct protent lcp_protent = {
PPP_LCP,
@ -1555,7 +1555,7 @@ static int
lcp_printpkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int code, id, len, olen;

View File

@ -75,11 +75,11 @@ extern u_int32_t xmit_accm[][8];
#define MINMRU 128 /* No MRUs below this */
#define MAXMRU 16384 /* Normally limit MRU to this */
void lcp_open __P((int));
void lcp_close __P((int, char *));
void lcp_lowerup __P((int));
void lcp_lowerdown __P((int));
void lcp_sprotrej __P((int, u_char *, int)); /* send protocol reject */
void lcp_open(int);
void lcp_close(int, char *);
void lcp_lowerup(int);
void lcp_lowerdown(int);
void lcp_sprotrej(int, u_char *, int); /* send protocol reject */
extern struct protent lcp_protent;

View File

@ -29,8 +29,8 @@ static char rcsid[] = "$FreeBSD$";
#include "pppd.h"
#include "magic.h"
extern long mrand48 __P((void));
extern void srand48 __P((long));
extern long mrand48(void);
extern void srand48(long);
/*
* magic_init - Initialize the magic number generator.

View File

@ -19,5 +19,5 @@
* $FreeBSD$
*/
void magic_init __P((void)); /* Initialize the magic number generator */
u_int32_t magic __P((void)); /* Returns the next magic number */
void magic_init(void); /* Initialize the magic number generator */
u_int32_t magic(void); /* Returns the next magic number */

View File

@ -111,27 +111,27 @@ char *no_ppp_msg = "Sorry - this system lacks PPP kernel support\n";
/* Prototypes for procedures local to this file. */
static void create_pidfile __P((void));
static void cleanup __P((void));
static void close_tty __P((void));
static void get_input __P((void));
static void calltimeout __P((void));
static struct timeval *timeleft __P((struct timeval *));
static void kill_my_pg __P((int));
static void hup __P((int));
static void term __P((int));
static void chld __P((int));
static void toggle_debug __P((int));
static void open_ccp __P((int));
static void bad_signal __P((int));
static void holdoff_end __P((void *));
static int device_script __P((char *, int, int));
static void reap_kids __P((void));
static void pr_log __P((void *, char *, ...));
static void create_pidfile(void);
static void cleanup(void);
static void close_tty(void);
static void get_input(void);
static void calltimeout(void);
static struct timeval *timeleft(struct timeval *);
static void kill_my_pg(int);
static void hup(int);
static void term(int);
static void chld(int);
static void toggle_debug(int);
static void open_ccp(int);
static void bad_signal(int);
static void holdoff_end(void *);
static int device_script(char *, int, int);
static void reap_kids(void);
static void pr_log(void *, char *, ...);
extern char *ttyname __P((int));
extern char *getlogin __P((void));
int main __P((int, char *[]));
extern char *ttyname(int);
extern char *getlogin(void);
int main(int, char *[]);
#ifdef ultrix
#undef O_NONBLOCK
@ -849,7 +849,7 @@ close_tty()
struct callout {
struct timeval c_time; /* time at which to call routine */
void *c_arg; /* argument to routine */
void (*c_func) __P((void *)); /* routine */
void (*c_func)(void *); /* routine */
struct callout *c_next;
};
@ -864,7 +864,7 @@ static struct timeval timenow; /* Current time */
*/
void
timeout(func, arg, time)
void (*func) __P((void *));
void (*func)(void *);
void *arg;
int time;
{
@ -904,7 +904,7 @@ timeout(func, arg, time)
*/
void
untimeout(func, arg)
void (*func) __P((void *));
void (*func)(void *);
void *arg;
{
struct callout **copp, *freep;
@ -1288,7 +1288,7 @@ void
format_packet(p, len, printer, arg)
u_char *p;
int len;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int i, n;
@ -1356,7 +1356,7 @@ void
print_string(p, len, printer, arg)
char *p;
int len;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int c;

View File

@ -69,7 +69,7 @@ static char rcsid[] = "$FreeBSD$";
#define TRUE 1
#if defined(ultrix) || defined(NeXT)
char *strdup __P((char *));
char *strdup(char *);
#endif
#ifndef GIDSET_TYPE
@ -138,146 +138,146 @@ pcap_t pc; /* Fake struct pcap so we can compile expr */
/*
* Prototypes
*/
static int setdevname __P((char *, int));
static int setspeed __P((char *));
static int setdebug __P((char **));
static int setkdebug __P((char **));
static int setpassive __P((char **));
static int setsilent __P((char **));
static int noopt __P((char **));
static int setnovj __P((char **));
static int setnovjccomp __P((char **));
static int setvjslots __P((char **));
static int reqpap __P((char **));
static int nopap __P((char **));
static int setdevname(char *, int);
static int setspeed(char *);
static int setdebug(char **);
static int setkdebug(char **);
static int setpassive(char **);
static int setsilent(char **);
static int noopt(char **);
static int setnovj(char **);
static int setnovjccomp(char **);
static int setvjslots(char **);
static int reqpap(char **);
static int nopap(char **);
#ifdef OLD_OPTIONS
static int setupapfile __P((char **));
static int setupapfile(char **);
#endif
static int nochap __P((char **));
static int reqchap __P((char **));
static int noaccomp __P((char **));
static int noasyncmap __P((char **));
static int noip __P((char **));
static int nomagicnumber __P((char **));
static int setasyncmap __P((char **));
static int setescape __P((char **));
static int setmru __P((char **));
static int setmtu __P((char **));
static int nochap(char **);
static int reqchap(char **);
static int noaccomp(char **);
static int noasyncmap(char **);
static int noip(char **);
static int nomagicnumber(char **);
static int setasyncmap(char **);
static int setescape(char **);
static int setmru(char **);
static int setmtu(char **);
#ifdef CBCP_SUPPORT
static int setcbcp __P((char **));
static int setcbcp(char **);
#endif
static int nomru __P((char **));
static int nopcomp __P((char **));
static int setconnector __P((char **));
static int setdisconnector __P((char **));
static int setwelcomer __P((char **));
static int setmaxcon __P((char **));
static int setmaxconnect __P((char **));
static int setdomain __P((char **));
static int setnetmask __P((char **));
static int setcrtscts __P((char **));
static int setnocrtscts __P((char **));
static int setxonxoff __P((char **));
static int setnodetach __P((char **));
static int setupdetach __P((char **));
static int setmodem __P((char **));
static int setlocal __P((char **));
static int setlock __P((char **));
static int setname __P((char **));
static int setuser __P((char **));
static int setremote __P((char **));
static int setauth __P((char **));
static int setnoauth __P((char **));
static int readfile __P((char **));
static int callfile __P((char **));
static int setdefaultroute __P((char **));
static int setnodefaultroute __P((char **));
static int setproxyarp __P((char **));
static int setnoproxyarp __P((char **));
static int setpersist __P((char **));
static int setnopersist __P((char **));
static int setdologin __P((char **));
static int setusehostname __P((char **));
static int setnoipdflt __P((char **));
static int setlcptimeout __P((char **));
static int setlcpterm __P((char **));
static int setlcpconf __P((char **));
static int setlcpfails __P((char **));
static int setipcptimeout __P((char **));
static int setipcpterm __P((char **));
static int setipcpconf __P((char **));
static int setipcpfails __P((char **));
static int setpaptimeout __P((char **));
static int setpapreqs __P((char **));
static int setpapreqtime __P((char **));
static int setchaptimeout __P((char **));
static int setchapchal __P((char **));
static int setchapintv __P((char **));
static int setipcpaccl __P((char **));
static int setipcpaccr __P((char **));
static int setlcpechointv __P((char **));
static int setlcpechofails __P((char **));
static int noccp __P((char **));
static int setbsdcomp __P((char **));
static int setnobsdcomp __P((char **));
static int setdeflate __P((char **));
static int setnodeflate __P((char **));
static int setnodeflatedraft __P((char **));
static int setdemand __P((char **));
static int setpred1comp __P((char **));
static int setnopred1comp __P((char **));
static int setipparam __P((char **));
static int setpapcrypt __P((char **));
static int setidle __P((char **));
static int setholdoff __P((char **));
static int setdnsaddr __P((char **));
static int resetipv6proto __P((char **));
static int resetipxproto __P((char **));
static int setwinsaddr __P((char **));
static int showversion __P((char **));
static int showhelp __P((char **));
static int nomru(char **);
static int nopcomp(char **);
static int setconnector(char **);
static int setdisconnector(char **);
static int setwelcomer(char **);
static int setmaxcon(char **);
static int setmaxconnect(char **);
static int setdomain(char **);
static int setnetmask(char **);
static int setcrtscts(char **);
static int setnocrtscts(char **);
static int setxonxoff(char **);
static int setnodetach(char **);
static int setupdetach(char **);
static int setmodem(char **);
static int setlocal(char **);
static int setlock(char **);
static int setname(char **);
static int setuser(char **);
static int setremote(char **);
static int setauth(char **);
static int setnoauth(char **);
static int readfile(char **);
static int callfile(char **);
static int setdefaultroute(char **);
static int setnodefaultroute(char **);
static int setproxyarp(char **);
static int setnoproxyarp(char **);
static int setpersist(char **);
static int setnopersist(char **);
static int setdologin(char **);
static int setusehostname(char **);
static int setnoipdflt(char **);
static int setlcptimeout(char **);
static int setlcpterm(char **);
static int setlcpconf(char **);
static int setlcpfails(char **);
static int setipcptimeout(char **);
static int setipcpterm(char **);
static int setipcpconf(char **);
static int setipcpfails(char **);
static int setpaptimeout(char **);
static int setpapreqs(char **);
static int setpapreqtime(char **);
static int setchaptimeout(char **);
static int setchapchal(char **);
static int setchapintv(char **);
static int setipcpaccl(char **);
static int setipcpaccr(char **);
static int setlcpechointv(char **);
static int setlcpechofails(char **);
static int noccp(char **);
static int setbsdcomp(char **);
static int setnobsdcomp(char **);
static int setdeflate(char **);
static int setnodeflate(char **);
static int setnodeflatedraft(char **);
static int setdemand(char **);
static int setpred1comp(char **);
static int setnopred1comp(char **);
static int setipparam(char **);
static int setpapcrypt(char **);
static int setidle(char **);
static int setholdoff(char **);
static int setdnsaddr(char **);
static int resetipv6proto(char **);
static int resetipxproto(char **);
static int setwinsaddr(char **);
static int showversion(char **);
static int showhelp(char **);
#ifdef PPP_FILTER
static int setpdebug __P((char **));
static int setpassfilter __P((char **));
static int setactivefilter __P((char **));
static int setpdebug(char **);
static int setpassfilter(char **);
static int setactivefilter(char **);
#endif
#ifdef INET6
static int setipv6cp_accept_local __P((char **));
static int setipv6cp_use_ip __P((char **));
static int setipv6cp_accept_local(char **);
static int setipv6cp_use_ip(char **);
#if defined(SOL2)
static int setipv6cp_use_persistent __P((char **));
static int setipv6cp_use_persistent(char **);
#endif
static int setipv6cptimeout __P((char **));
static int setipv6cpterm __P((char **));
static int setipv6cpconf __P((char **));
static int setipv6cpfails __P((char **));
static int setipv6proto __P((char **));
static int setipv6cptimeout(char **);
static int setipv6cpterm(char **);
static int setipv6cpconf(char **);
static int setipv6cpfails(char **);
static int setipv6proto(char **);
#endif /* INET6 */
#ifdef IPX_CHANGE
static int setipxproto __P((char **));
static int setipxanet __P((char **));
static int setipxalcl __P((char **));
static int setipxarmt __P((char **));
static int setipxnetwork __P((char **));
static int setipxnode __P((char **));
static int setipxrouter __P((char **));
static int setipxname __P((char **));
static int setipxcptimeout __P((char **));
static int setipxcpterm __P((char **));
static int setipxcpconf __P((char **));
static int setipxcpfails __P((char **));
static int setipxproto(char **);
static int setipxanet(char **);
static int setipxalcl(char **);
static int setipxarmt(char **);
static int setipxnetwork(char **);
static int setipxnode(char **);
static int setipxrouter(char **);
static int setipxname(char **);
static int setipxcptimeout(char **);
static int setipxcpterm(char **);
static int setipxcpconf(char **);
static int setipxcpfails(char **);
#endif /* IPX_CHANGE */
#ifdef MSLANMAN
static int setmslanman __P((char **));
static int setmslanman(char **);
#endif
static int number_option __P((char *, u_int32_t *, int));
static int int_option __P((char *, int *));
static int readable __P((int fd));
static int number_option(char *, u_int32_t *, int);
static int int_option(char *, int *);
static int readable(int fd);
/*
* Valid arguments.
@ -285,7 +285,7 @@ static int readable __P((int fd));
static struct cmd {
char *cmd_name;
int num_args;
int (*cmd_func) __P((char **));
int (*cmd_func)(char **);
} cmds[] = {
{"-all", 0, noopt}, /* Don't request/allow any options (useless) */
{"noaccomp", 0, noaccomp}, /* Disable Address/Control compression */

View File

@ -145,33 +145,33 @@ extern int ms_lanman; /* Nonzero if use LanMan password instead of NT */
struct protent {
u_short protocol; /* PPP protocol number */
/* Initialization procedure */
void (*init) __P((int unit));
void (*init)(int unit);
/* Process a received packet */
void (*input) __P((int unit, u_char *pkt, int len));
void (*input)(int unit, u_char *pkt, int len);
/* Process a received protocol-reject */
void (*protrej) __P((int unit));
void (*protrej)(int unit);
/* Lower layer has come up */
void (*lowerup) __P((int unit));
void (*lowerup)(int unit);
/* Lower layer has gone down */
void (*lowerdown) __P((int unit));
void (*lowerdown)(int unit);
/* Open the protocol */
void (*open) __P((int unit));
void (*open)(int unit);
/* Close the protocol */
void (*close) __P((int unit, char *reason));
void (*close)(int unit, char *reason);
/* Print a packet in readable form */
int (*printpkt) __P((u_char *pkt, int len,
void (*printer) __P((void *, char *, ...)),
void *arg));
int (*printpkt)(u_char *pkt, int len,
void (*printer)(void *, char *, ...),
void *arg);
/* Process a received data packet */
void (*datainput) __P((int unit, u_char *pkt, int len));
void (*datainput)(int unit, u_char *pkt, int len);
int enabled_flag; /* 0 iff protocol is disabled */
char *name; /* Text name of protocol */
/* Check requested options, assign defaults */
void (*check_options) __P((void));
void (*check_options)(void);
/* Configure interface for demand-dial */
int (*demand_conf) __P((int unit));
int (*demand_conf)(int unit);
/* Say whether to bring up link for this pkt */
int (*active_pkt) __P((u_char *pkt, int len));
int (*active_pkt)(u_char *pkt, int len);
};
/* Table of pointers to supported protocols */
@ -182,155 +182,155 @@ extern struct protent *protocols[];
*/
/* Procedures exported from main.c. */
void detach __P((void)); /* Detach from controlling tty */
void die __P((int)); /* Cleanup and exit */
void quit __P((void)); /* like die(1) */
void novm __P((char *)); /* Say we ran out of memory, and die */
void timeout __P((void (*func)(void *), void *arg, int t));
void detach(void); /* Detach from controlling tty */
void die(int); /* Cleanup and exit */
void quit(void); /* like die(1) */
void novm(char *); /* Say we ran out of memory, and die */
void timeout(void (*func)(void *), void *arg, int t);
/* Call func(arg) after t seconds */
void untimeout __P((void (*func)(void *), void *arg));
void untimeout(void (*func)(void *), void *arg);
/* Cancel call to func(arg) */
int run_program __P((char *prog, char **args, int must_exist));
int run_program(char *prog, char **args, int must_exist);
/* Run program prog with args in child */
void demuxprotrej __P((int, int));
void demuxprotrej(int, int);
/* Demultiplex a Protocol-Reject */
void format_packet __P((u_char *, int, void (*) (void *, char *, ...),
void *)); /* Format a packet in human-readable form */
void log_packet __P((u_char *, int, char *, int));
void format_packet(u_char *, int, void (*) (void *, char *, ...),
void *); /* Format a packet in human-readable form */
void log_packet(u_char *, int, char *, int);
/* Format a packet and log it with syslog */
void print_string __P((char *, int, void (*) (void *, char *, ...),
void *)); /* Format a string for output */
int fmtmsg __P((char *, int, char *, ...)); /* sprintf++ */
int vfmtmsg __P((char *, int, char *, va_list)); /* vsprintf++ */
void script_setenv __P((char *, char *)); /* set script env var */
void script_unsetenv __P((char *)); /* unset script env var */
void print_string(char *, int, void (*) (void *, char *, ...),
void *); /* Format a string for output */
int fmtmsg(char *, int, char *, ...); /* sprintf++ */
int vfmtmsg(char *, int, char *, va_list); /* vsprintf++ */
void script_setenv(char *, char *); /* set script env var */
void script_unsetenv(char *); /* unset script env var */
/* Procedures exported from auth.c */
void link_required __P((int)); /* we are starting to use the link */
void link_terminated __P((int)); /* we are finished with the link */
void link_down __P((int)); /* the LCP layer has left the Opened state */
void link_established __P((int)); /* the link is up; authenticate now */
void np_up __P((int, int)); /* a network protocol has come up */
void np_down __P((int, int)); /* a network protocol has gone down */
void np_finished __P((int, int)); /* a network protocol no longer needs link */
void auth_peer_fail __P((int, int));
void link_required(int); /* we are starting to use the link */
void link_terminated(int); /* we are finished with the link */
void link_down(int); /* the LCP layer has left the Opened state */
void link_established(int); /* the link is up; authenticate now */
void np_up(int, int); /* a network protocol has come up */
void np_down(int, int); /* a network protocol has gone down */
void np_finished(int, int); /* a network protocol no longer needs link */
void auth_peer_fail(int, int);
/* peer failed to authenticate itself */
void auth_peer_success __P((int, int, char *, int));
void auth_peer_success(int, int, char *, int);
/* peer successfully authenticated itself */
void auth_withpeer_fail __P((int, int));
void auth_withpeer_fail(int, int);
/* we failed to authenticate ourselves */
void auth_withpeer_success __P((int, int));
void auth_withpeer_success(int, int);
/* we successfully authenticated ourselves */
void auth_check_options __P((void));
void auth_check_options(void);
/* check authentication options supplied */
void auth_reset __P((int)); /* check what secrets we have */
int check_passwd __P((int, char *, int, char *, int, char **, int *));
void auth_reset(int); /* check what secrets we have */
int check_passwd(int, char *, int, char *, int, char **, int *);
/* Check peer-supplied username/password */
int get_secret __P((int, char *, char *, char *, int *, int));
int get_secret(int, char *, char *, char *, int *, int);
/* get "secret" for chap */
int auth_ip_addr __P((int, u_int32_t));
int auth_ip_addr(int, u_int32_t);
/* check if IP address is authorized */
int bad_ip_adrs __P((u_int32_t));
int bad_ip_adrs(u_int32_t);
/* check if IP address is unreasonable */
void check_access __P((FILE *, char *));
void check_access(FILE *, char *);
/* check permissions on secrets file */
/* Procedures exported from demand.c */
void demand_conf __P((void)); /* config interface(s) for demand-dial */
void demand_block __P((void)); /* set all NPs to queue up packets */
void demand_unblock __P((void)); /* set all NPs to pass packets */
void demand_discard __P((void)); /* set all NPs to discard packets */
void demand_rexmit __P((int)); /* retransmit saved frames for an NP */
int loop_chars __P((unsigned char *, int)); /* process chars from loopback */
int loop_frame __P((unsigned char *, int)); /* process frame from loopback */
void demand_conf(void); /* config interface(s) for demand-dial */
void demand_block(void); /* set all NPs to queue up packets */
void demand_unblock(void); /* set all NPs to pass packets */
void demand_discard(void); /* set all NPs to discard packets */
void demand_rexmit(int); /* retransmit saved frames for an NP */
int loop_chars(unsigned char *, int); /* process chars from loopback */
int loop_frame(unsigned char *, int); /* process frame from loopback */
/* Procedures exported from sys-*.c */
void sys_init __P((void)); /* Do system-dependent initialization */
void sys_cleanup __P((void)); /* Restore system state before exiting */
void sys_check_options __P((void)); /* Check options specified */
void sys_close __P((void)); /* Clean up in a child before execing */
int ppp_available __P((void)); /* Test whether ppp kernel support exists */
void open_ppp_loopback __P((void)); /* Open loopback for demand-dialling */
void establish_ppp __P((int)); /* Turn serial port into a ppp interface */
void restore_loop __P((void)); /* Transfer ppp unit back to loopback */
void disestablish_ppp __P((int)); /* Restore port to normal operation */
void clean_check __P((void)); /* Check if line was 8-bit clean */
void set_up_tty __P((int, int)); /* Set up port's speed, parameters, etc. */
void restore_tty __P((int)); /* Restore port's original parameters */
void setdtr __P((int, int)); /* Raise or lower port's DTR line */
void output __P((int, u_char *, int)); /* Output a PPP packet */
void wait_input __P((struct timeval *));
void sys_init(void); /* Do system-dependent initialization */
void sys_cleanup(void); /* Restore system state before exiting */
void sys_check_options(void); /* Check options specified */
void sys_close(void); /* Clean up in a child before execing */
int ppp_available(void); /* Test whether ppp kernel support exists */
void open_ppp_loopback(void); /* Open loopback for demand-dialling */
void establish_ppp(int); /* Turn serial port into a ppp interface */
void restore_loop(void); /* Transfer ppp unit back to loopback */
void disestablish_ppp(int); /* Restore port to normal operation */
void clean_check(void); /* Check if line was 8-bit clean */
void set_up_tty(int, int); /* Set up port's speed, parameters, etc. */
void restore_tty(int); /* Restore port's original parameters */
void setdtr(int, int); /* Raise or lower port's DTR line */
void output(int, u_char *, int); /* Output a PPP packet */
void wait_input(struct timeval *);
/* Wait for input, with timeout */
void wait_loop_output __P((struct timeval *));
void wait_loop_output(struct timeval *);
/* Wait for pkt from loopback, with timeout */
void wait_time __P((struct timeval *)); /* Wait for given length of time */
int read_packet __P((u_char *)); /* Read PPP packet */
int get_loop_output __P((void)); /* Read pkts from loopback */
void ppp_send_config __P((int, int, u_int32_t, int, int));
void wait_time(struct timeval *); /* Wait for given length of time */
int read_packet(u_char *); /* Read PPP packet */
int get_loop_output(void); /* Read pkts from loopback */
void ppp_send_config(int, int, u_int32_t, int, int);
/* Configure i/f transmit parameters */
void ppp_set_xaccm __P((int, ext_accm));
void ppp_set_xaccm(int, ext_accm);
/* Set extended transmit ACCM */
void ppp_recv_config __P((int, int, u_int32_t, int, int));
void ppp_recv_config(int, int, u_int32_t, int, int);
/* Configure i/f receive parameters */
int ccp_test __P((int, u_char *, int, int));
int ccp_test(int, u_char *, int, int);
/* Test support for compression scheme */
void ccp_flags_set __P((int, int, int));
void ccp_flags_set(int, int, int);
/* Set kernel CCP state */
int ccp_fatal_error __P((int)); /* Test for fatal decomp error in kernel */
int get_idle_time __P((int, struct ppp_idle *));
int ccp_fatal_error(int); /* Test for fatal decomp error in kernel */
int get_idle_time(int, struct ppp_idle *);
/* Find out how long link has been idle */
int sifvjcomp __P((int, int, int, int));
int sifvjcomp(int, int, int, int);
/* Configure VJ TCP header compression */
int sifup __P((int)); /* Configure i/f up (for IP) */
int sifnpmode __P((int u, int proto, enum NPmode mode));
int sifup(int); /* Configure i/f up (for IP) */
int sifnpmode(int u, int proto, enum NPmode mode);
/* Set mode for handling packets for proto */
int sifdown __P((int)); /* Configure i/f down (for IP) */
int sifaddr __P((int, u_int32_t, u_int32_t, u_int32_t));
int sifdown(int); /* Configure i/f down (for IP) */
int sifaddr(int, u_int32_t, u_int32_t, u_int32_t);
/* Configure IP addresses for i/f */
int cifaddr __P((int, u_int32_t, u_int32_t));
int cifaddr(int, u_int32_t, u_int32_t);
/* Reset i/f IP addresses */
#ifdef INET6
int sif6addr __P((int, eui64_t, eui64_t));
int sif6addr(int, eui64_t, eui64_t);
/* Configure IPv6 addresses for i/f */
int cif6addr __P((int, eui64_t, eui64_t));
int cif6addr(int, eui64_t, eui64_t);
/* Remove an IPv6 address from i/f */
#endif
int sifdefaultroute __P((int, u_int32_t, u_int32_t));
int sifdefaultroute(int, u_int32_t, u_int32_t);
/* Create default route through i/f */
int cifdefaultroute __P((int, u_int32_t, u_int32_t));
int cifdefaultroute(int, u_int32_t, u_int32_t);
/* Delete default route through i/f */
int sifproxyarp __P((int, u_int32_t));
int sifproxyarp(int, u_int32_t);
/* Add proxy ARP entry for peer */
int cifproxyarp __P((int, u_int32_t));
int cifproxyarp(int, u_int32_t);
/* Delete proxy ARP entry for peer */
u_int32_t GetMask __P((u_int32_t)); /* Get appropriate netmask for address */
int lock __P((char *)); /* Create lock file for device */
void unlock __P((void)); /* Delete previously-created lock file */
int daemon __P((int, int)); /* Detach us from terminal session */
void logwtmp __P((const char *, const char *, const char *));
u_int32_t GetMask(u_int32_t); /* Get appropriate netmask for address */
int lock(char *); /* Create lock file for device */
void unlock(void); /* Delete previously-created lock file */
int daemon(int, int); /* Detach us from terminal session */
void logwtmp(const char *, const char *, const char *);
/* Write entry to wtmp file */
int get_host_seed __P((void)); /* Get host-dependent random number seed */
int get_host_seed(void); /* Get host-dependent random number seed */
#ifdef PPP_FILTER
int set_filters __P((struct bpf_program *pass, struct bpf_program *active));
int set_filters(struct bpf_program *pass, struct bpf_program *active);
/* Set filter programs in kernel */
#endif
/* Procedures exported from options.c */
int parse_args __P((int argc, char **argv));
int parse_args(int argc, char **argv);
/* Parse options from arguments given */
void usage __P((void)); /* Print a usage message */
int options_from_file __P((char *filename, int must_exist, int check_prot,
int privileged));
void usage(void); /* Print a usage message */
int options_from_file(char *filename, int must_exist, int check_prot,
int privileged);
/* Parse options from an options file */
int options_from_user __P((void)); /* Parse options from user's .ppprc */
int options_for_tty __P((void)); /* Parse options from /etc/ppp/options.tty */
void scan_args __P((int argc, char **argv));
int options_from_user(void); /* Parse options from user's .ppprc */
int options_for_tty(void); /* Parse options from /etc/ppp/options.tty */
void scan_args(int argc, char **argv);
/* Look for tty name in command-line args */
int getword __P((FILE *f, char *word, int *newlinep, char *filename));
int getword(FILE *f, char *word, int *newlinep, char *filename);
/* Read a word from a file */
void option_error __P((char *fmt, ...));
void option_error(char *fmt, ...);
/* Print an error message about an option */
int setipaddr __P((char *)); /* set IP addresses */
int setipaddr(char *); /* set IP addresses */
/*

View File

@ -114,8 +114,8 @@ static u_int32_t default_route_gateway; /* gateway addr for default route */
static u_int32_t proxy_arp_addr; /* remote addr for proxy arp */
/* Prototypes for procedures local to this file. */
static int dodefaultroute __P((u_int32_t, int));
static int get_ether_addr __P((u_int32_t, struct sockaddr_dl *));
static int dodefaultroute(u_int32_t, int);
static int get_ether_addr(u_int32_t, struct sockaddr_dl *);
/*

View File

@ -37,13 +37,13 @@ static char rcsid[] = "$FreeBSD$";
/*
* Protocol entry points.
*/
static void upap_init __P((int));
static void upap_lowerup __P((int));
static void upap_lowerdown __P((int));
static void upap_input __P((int, u_char *, int));
static void upap_protrej __P((int));
static int upap_printpkt __P((u_char *, int,
void (*) __P((void *, char *, ...)), void *));
static void upap_init(int);
static void upap_lowerup(int);
static void upap_lowerdown(int);
static void upap_input(int, u_char *, int);
static void upap_protrej(int);
static int upap_printpkt(u_char *, int,
void (*)(void *, char *, ...), void *);
struct protent pap_protent = {
PPP_PAP,
@ -65,13 +65,13 @@ struct protent pap_protent = {
upap_state upap[NUM_PPP]; /* UPAP state; one for each unit */
static void upap_timeout __P((void *));
static void upap_reqtimeout __P((void *));
static void upap_rauthreq __P((upap_state *, u_char *, int, int));
static void upap_rauthack __P((upap_state *, u_char *, int, int));
static void upap_rauthnak __P((upap_state *, u_char *, int, int));
static void upap_sauthreq __P((upap_state *));
static void upap_sresp __P((upap_state *, int, int, char *, int));
static void upap_timeout(void *);
static void upap_reqtimeout(void *);
static void upap_rauthreq(upap_state *, u_char *, int, int);
static void upap_rauthack(upap_state *, u_char *, int, int);
static void upap_rauthnak(upap_state *, u_char *, int, int);
static void upap_sauthreq(upap_state *);
static void upap_sresp(upap_state *, int, int, char *, int);
/*
@ -551,7 +551,7 @@ static int
upap_printpkt(p, plen, printer, arg)
u_char *p;
int plen;
void (*printer) __P((void *, char *, ...));
void (*printer)(void *, char *, ...);
void *arg;
{
int code, id, len;

View File

@ -81,7 +81,7 @@ typedef struct upap_state {
extern upap_state upap[];
void upap_authwithpeer __P((int, char *, char *));
void upap_authpeer __P((int));
void upap_authwithpeer(int, char *, char *);
void upap_authpeer(int);
extern struct protent pap_protent;

View File

@ -77,13 +77,13 @@ extern int optind;
extern char *optarg;
#endif
static void usage __P((void));
static void catchalarm __P((int));
static void get_ppp_stats __P((struct ppp_stats *));
static void get_ppp_cstats __P((struct ppp_comp_stats *));
static void intpr __P((void));
static void usage(void);
static void catchalarm(int);
static void get_ppp_stats(struct ppp_stats *);
static void get_ppp_cstats(struct ppp_comp_stats *);
static void intpr(void);
int main __P((int, char *argv[]));
int main(int, char *argv[]);
static void
usage()

View File

@ -62,10 +62,10 @@ struct rip6 *ripbuf;
#define RIPSIZE(n) (sizeof(struct rip6) + (n-1) * sizeof(struct netinfo6))
int main __P((int, char **));
static void usage __P((void));
static const char *sa_n2a __P((struct sockaddr *));
static const char *inet6_n2a __P((struct in6_addr *));
int main(int, char **);
static void usage(void);
static const char *sa_n2a(struct sockaddr *);
static const char *inet6_n2a(struct in6_addr *);
int
main(argc, argv)

View File

@ -213,66 +213,66 @@ volatile sig_atomic_t seenusr1;
#define RRTF_SENDANYWAY 0x40000000
#define RRTF_CHANGED 0x80000000
int main __P((int, char **));
void sighandler __P((int));
void ripalarm __P((void));
void riprecv __P((void));
void ripsend __P((struct ifc *, struct sockaddr_in6 *, int));
int out_filter __P((struct riprt *, struct ifc *));
void init __P((void));
void sockopt __P((struct ifc *));
void ifconfig __P((void));
void ifconfig1 __P((const char *, const struct sockaddr *, struct ifc *, int));
void rtrecv __P((void));
int rt_del __P((const struct sockaddr_in6 *, const struct sockaddr_in6 *,
const struct sockaddr_in6 *));
int rt_deladdr __P((struct ifc *, const struct sockaddr_in6 *,
const struct sockaddr_in6 *));
void filterconfig __P((void));
int getifmtu __P((int));
const char *rttypes __P((struct rt_msghdr *));
const char *rtflags __P((struct rt_msghdr *));
const char *ifflags __P((int));
int ifrt __P((struct ifc *, int));
void ifrt_p2p __P((struct ifc *, int));
void applymask __P((struct in6_addr *, struct in6_addr *));
void applyplen __P((struct in6_addr *, int));
void ifrtdump __P((int));
void ifdump __P((int));
void ifdump0 __P((FILE *, const struct ifc *));
void rtdump __P((int));
void rt_entry __P((struct rt_msghdr *, int));
void rtdexit __P((void));
void riprequest __P((struct ifc *, struct netinfo6 *, int,
struct sockaddr_in6 *));
void ripflush __P((struct ifc *, struct sockaddr_in6 *));
void sendrequest __P((struct ifc *));
int sin6mask2len __P((const struct sockaddr_in6 *));
int mask2len __P((const struct in6_addr *, int));
int sendpacket __P((struct sockaddr_in6 *, int));
int addroute __P((struct riprt *, const struct in6_addr *, struct ifc *));
int delroute __P((struct netinfo6 *, struct in6_addr *));
struct in6_addr *getroute __P((struct netinfo6 *, struct in6_addr *));
void krtread __P((int));
int tobeadv __P((struct riprt *, struct ifc *));
char *allocopy __P((char *));
char *hms __P((void));
const char *inet6_n2p __P((const struct in6_addr *));
struct ifac *ifa_match __P((const struct ifc *, const struct in6_addr *, int));
struct in6_addr *plen2mask __P((int));
struct riprt *rtsearch __P((struct netinfo6 *, struct riprt **));
int ripinterval __P((int));
time_t ripsuptrig __P((void));
void fatal __P((const char *, ...))
int main(int, char **);
void sighandler(int);
void ripalarm(void);
void riprecv(void);
void ripsend(struct ifc *, struct sockaddr_in6 *, int);
int out_filter(struct riprt *, struct ifc *);
void init(void);
void sockopt(struct ifc *);
void ifconfig(void);
void ifconfig1(const char *, const struct sockaddr *, struct ifc *, int);
void rtrecv(void);
int rt_del(const struct sockaddr_in6 *, const struct sockaddr_in6 *,
const struct sockaddr_in6 *);
int rt_deladdr(struct ifc *, const struct sockaddr_in6 *,
const struct sockaddr_in6 *);
void filterconfig(void);
int getifmtu(int);
const char *rttypes(struct rt_msghdr *);
const char *rtflags(struct rt_msghdr *);
const char *ifflags(int);
int ifrt(struct ifc *, int);
void ifrt_p2p(struct ifc *, int);
void applymask(struct in6_addr *, struct in6_addr *);
void applyplen(struct in6_addr *, int);
void ifrtdump(int);
void ifdump(int);
void ifdump0(FILE *, const struct ifc *);
void rtdump(int);
void rt_entry(struct rt_msghdr *, int);
void rtdexit(void);
void riprequest(struct ifc *, struct netinfo6 *, int,
struct sockaddr_in6 *);
void ripflush(struct ifc *, struct sockaddr_in6 *);
void sendrequest(struct ifc *);
int sin6mask2len(const struct sockaddr_in6 *);
int mask2len(const struct in6_addr *, int);
int sendpacket(struct sockaddr_in6 *, int);
int addroute(struct riprt *, const struct in6_addr *, struct ifc *);
int delroute(struct netinfo6 *, struct in6_addr *);
struct in6_addr *getroute(struct netinfo6 *, struct in6_addr *);
void krtread(int);
int tobeadv(struct riprt *, struct ifc *);
char *allocopy(char *);
char *hms(void);
const char *inet6_n2p(const struct in6_addr *);
struct ifac *ifa_match(const struct ifc *, const struct in6_addr *, int);
struct in6_addr *plen2mask(int);
struct riprt *rtsearch(struct netinfo6 *, struct riprt **);
int ripinterval(int);
time_t ripsuptrig(void);
void fatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
void trace __P((int, const char *, ...))
void trace(int, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
void tracet __P((int, const char *, ...))
void tracet(int, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
unsigned int if_maxindex __P((void));
struct ifc *ifc_find __P((char *));
struct iff *iff_find __P((struct ifc *, int));
void setindex2ifc __P((int, struct ifc *));
unsigned int if_maxindex(void);
struct ifc *ifc_find(char *);
struct iff *iff_find(struct ifc *, int);
void setindex2ifc(int, struct ifc *);
#define MALLOC(type) ((type *)malloc(sizeof(type)))

View File

@ -71,7 +71,7 @@ static struct fdlist *fdhead; /* Link list of the check fd's */
static struct fdlist *fdtail;
static char *nullstring = "";
static bool_t check_bound __P((struct fdlist *, char *uaddr));
static bool_t check_bound(struct fdlist *, char *uaddr);
/*
* Returns 1 if the given address is bound for the given addr & transport

View File

@ -59,11 +59,11 @@ static char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro";
#endif
#include "rpcbind.h"
static struct pmaplist *find_service_pmap __P((rpcprog_t, rpcvers_t,
rpcprot_t));
static bool_t pmapproc_change __P((struct svc_req *, SVCXPRT *, u_long));
static bool_t pmapproc_getport __P((struct svc_req *, SVCXPRT *));
static bool_t pmapproc_dump __P((struct svc_req *, SVCXPRT *));
static struct pmaplist *find_service_pmap(rpcprog_t, rpcvers_t,
rpcprot_t);
static bool_t pmapproc_change(struct svc_req *, SVCXPRT *, u_long);
static bool_t pmapproc_getport(struct svc_req *, SVCXPRT *);
static bool_t pmapproc_dump(struct svc_req *, SVCXPRT *);
/*
* Called for all the version 2 inquiries.

View File

@ -53,10 +53,10 @@
#include "rpcbind.h"
static void *rpcbproc_getaddr_3_local __P((void *, struct svc_req *, SVCXPRT *,
rpcvers_t));
static void *rpcbproc_dump_3_local __P((void *, struct svc_req *, SVCXPRT *,
rpcvers_t));
static void *rpcbproc_getaddr_3_local(void *, struct svc_req *, SVCXPRT *,
rpcvers_t);
static void *rpcbproc_dump_3_local(void *, struct svc_req *, SVCXPRT *,
rpcvers_t);
/*
* Called by svc_getreqset. There is a separate server handle for
@ -75,7 +75,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
} argument;
char *result;
xdrproc_t xdr_argument, xdr_result;
void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc);

View File

@ -54,13 +54,13 @@
#include <stdlib.h>
#include "rpcbind.h"
static void *rpcbproc_getaddr_4_local __P((void *, struct svc_req *, SVCXPRT *,
rpcvers_t));
static void *rpcbproc_getversaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
static void *rpcbproc_getaddr_4_local(void *, struct svc_req *, SVCXPRT *,
rpcvers_t);
static void *rpcbproc_getversaddr_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
static void *rpcbproc_getaddrlist_4_local
__P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
static void free_rpcb_entry_list __P((rpcb_entry_list_ptr *));
static void *rpcbproc_dump_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
static void free_rpcb_entry_list(rpcb_entry_list_ptr *);
static void *rpcbproc_dump_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
/*
* Called by svc_getreqset. There is a separate server handle for
@ -78,7 +78,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
} argument;
char *result;
xdrproc_t xdr_argument, xdr_result;
void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc);

View File

@ -92,29 +92,29 @@ struct finfo {
static struct finfo FINFO[NFORWARD];
static bool_t xdr_encap_parms __P((XDR *, struct encap_parms *));
static bool_t xdr_rmtcall_args __P((XDR *, struct r_rmtcall_args *));
static bool_t xdr_rmtcall_result __P((XDR *, struct r_rmtcall_args *));
static bool_t xdr_opaque_parms __P((XDR *, struct r_rmtcall_args *));
static int find_rmtcallfd_by_netid __P((char *));
static SVCXPRT *find_rmtcallxprt_by_fd __P((int));
static int forward_register __P((u_int32_t, struct netbuf *, int, char *,
rpcproc_t, rpcvers_t, u_int32_t *));
static struct finfo *forward_find __P((u_int32_t));
static int free_slot_by_xid __P((u_int32_t));
static int free_slot_by_index __P((int));
static int netbufcmp __P((struct netbuf *, struct netbuf *));
static struct netbuf *netbufdup __P((struct netbuf *));
static void netbuffree __P((struct netbuf *));
static int check_rmtcalls __P((struct pollfd *, int));
static void xprt_set_caller __P((SVCXPRT *, struct finfo *));
static void send_svcsyserr __P((SVCXPRT *, struct finfo *));
static void handle_reply __P((int, SVCXPRT *));
static void find_versions __P((rpcprog_t, char *, rpcvers_t *, rpcvers_t *));
static rpcblist_ptr find_service __P((rpcprog_t, rpcvers_t, char *));
static char *getowner __P((SVCXPRT *, char *, size_t));
static int add_pmaplist __P((RPCB *));
static int del_pmaplist __P((RPCB *));
static bool_t xdr_encap_parms(XDR *, struct encap_parms *);
static bool_t xdr_rmtcall_args(XDR *, struct r_rmtcall_args *);
static bool_t xdr_rmtcall_result(XDR *, struct r_rmtcall_args *);
static bool_t xdr_opaque_parms(XDR *, struct r_rmtcall_args *);
static int find_rmtcallfd_by_netid(char *);
static SVCXPRT *find_rmtcallxprt_by_fd(int);
static int forward_register(u_int32_t, struct netbuf *, int, char *,
rpcproc_t, rpcvers_t, u_int32_t *);
static struct finfo *forward_find(u_int32_t);
static int free_slot_by_xid(u_int32_t);
static int free_slot_by_index(int);
static int netbufcmp(struct netbuf *, struct netbuf *);
static struct netbuf *netbufdup(struct netbuf *);
static void netbuffree(struct netbuf *);
static int check_rmtcalls(struct pollfd *, int);
static void xprt_set_caller(SVCXPRT *, struct finfo *);
static void send_svcsyserr(SVCXPRT *, struct finfo *);
static void handle_reply(int, SVCXPRT *);
static void find_versions(rpcprog_t, char *, rpcvers_t *, rpcvers_t *);
static rpcblist_ptr find_service(rpcprog_t, rpcvers_t, char *);
static char *getowner(SVCXPRT *, char *, size_t);
static int add_pmaplist(RPCB *);
static int del_pmaplist(RPCB *);
/*
* Set a mapping of program, version, netid

View File

@ -112,13 +112,13 @@ char *tcp_uaddr; /* Universal TCP address */
static char servname[] = "rpcbind";
static char superuser[] = "superuser";
int main __P((int, char *[]));
int main(int, char *[]);
static int init_transport __P((struct netconfig *));
static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *,
struct netbuf *));
static void terminate __P((int));
static void parseargs __P((int, char *[]));
static int init_transport(struct netconfig *);
static void rbllist_add(rpcprog_t, rpcvers_t, struct netconfig *,
struct netbuf *);
static void terminate(int);
static void parseargs(int, char *[]);
int
main(int argc, char *argv[])

View File

@ -80,62 +80,62 @@ extern char *udp_uaddr; /* Universal UDP address */
extern char *tcp_uaddr; /* Universal TCP address */
#endif
int add_bndlist __P((struct netconfig *, struct netbuf *));
bool_t is_bound __P((char *, char *));
char *mergeaddr __P((SVCXPRT *, char *, char *, char *));
struct netconfig *rpcbind_get_conf __P((char *));
int add_bndlist(struct netconfig *, struct netbuf *);
bool_t is_bound(char *, char *);
char *mergeaddr(SVCXPRT *, char *, char *, char *);
struct netconfig *rpcbind_get_conf(char *);
void rpcbs_init __P((void));
void rpcbs_procinfo __P((rpcvers_t, rpcproc_t));
void rpcbs_set __P((rpcvers_t, bool_t));
void rpcbs_unset __P((rpcvers_t, bool_t));
void rpcbs_getaddr __P((rpcvers_t, rpcprog_t, rpcvers_t, char *, char *));
void rpcbs_rmtcall __P((rpcvers_t, rpcproc_t, rpcprog_t, rpcvers_t, rpcproc_t,
char *, rpcblist_ptr));
void *rpcbproc_getstat __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
void rpcbs_init(void);
void rpcbs_procinfo(rpcvers_t, rpcproc_t);
void rpcbs_set(rpcvers_t, bool_t);
void rpcbs_unset(rpcvers_t, bool_t);
void rpcbs_getaddr(rpcvers_t, rpcprog_t, rpcvers_t, char *, char *);
void rpcbs_rmtcall(rpcvers_t, rpcproc_t, rpcprog_t, rpcvers_t, rpcproc_t,
char *, rpcblist_ptr);
void *rpcbproc_getstat(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
void rpcb_service_3 __P((struct svc_req *, SVCXPRT *));
void rpcb_service_4 __P((struct svc_req *, SVCXPRT *));
void rpcb_service_3(struct svc_req *, SVCXPRT *);
void rpcb_service_4(struct svc_req *, SVCXPRT *);
/* Common functions shared between versions */
void *rpcbproc_set_com __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
void *rpcbproc_unset_com __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
bool_t map_set __P((RPCB *, char *));
bool_t map_unset __P((RPCB *, char *));
void delete_prog __P((unsigned int));
void *rpcbproc_getaddr_com __P((RPCB *, struct svc_req *, SVCXPRT *, rpcvers_t,
rpcvers_t));
void *rpcbproc_gettime_com __P((void *, struct svc_req *, SVCXPRT *,
rpcvers_t));
void *rpcbproc_uaddr2taddr_com __P((void *, struct svc_req *,
SVCXPRT *, rpcvers_t));
void *rpcbproc_taddr2uaddr_com __P((void *, struct svc_req *, SVCXPRT *,
rpcvers_t));
int create_rmtcall_fd __P((struct netconfig *));
void rpcbproc_callit_com __P((struct svc_req *, SVCXPRT *, rpcvers_t,
rpcvers_t));
void my_svc_run __P((void));
void *rpcbproc_set_com(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
void *rpcbproc_unset_com(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
bool_t map_set(RPCB *, char *);
bool_t map_unset(RPCB *, char *);
void delete_prog(unsigned int);
void *rpcbproc_getaddr_com(RPCB *, struct svc_req *, SVCXPRT *, rpcvers_t,
rpcvers_t);
void *rpcbproc_gettime_com(void *, struct svc_req *, SVCXPRT *,
rpcvers_t);
void *rpcbproc_uaddr2taddr_com(void *, struct svc_req *,
SVCXPRT *, rpcvers_t);
void *rpcbproc_taddr2uaddr_com(void *, struct svc_req *, SVCXPRT *,
rpcvers_t);
int create_rmtcall_fd(struct netconfig *);
void rpcbproc_callit_com(struct svc_req *, SVCXPRT *, rpcvers_t,
rpcvers_t);
void my_svc_run(void);
void rpcbind_abort __P((void));
void reap __P((int));
void toggle_verboselog __P((int));
void rpcbind_abort(void);
void reap(int);
void toggle_verboselog(int);
int check_access __P((SVCXPRT *, rpcproc_t, void *, unsigned int));
int check_callit __P((SVCXPRT *, struct r_rmtcall_args *, int));
void logit __P((int, struct sockaddr *, rpcproc_t, rpcprog_t, const char *));
int is_loopback __P((struct netbuf *));
int check_access(SVCXPRT *, rpcproc_t, void *, unsigned int);
int check_callit(SVCXPRT *, struct r_rmtcall_args *, int);
void logit(int, struct sockaddr *, rpcproc_t, rpcprog_t, const char *);
int is_loopback(struct netbuf *);
#ifdef PORTMAP
extern void pmap_service __P((struct svc_req *, SVCXPRT *));
extern void pmap_service(struct svc_req *, SVCXPRT *);
#endif
void write_warmstart __P((void));
void read_warmstart __P((void));
void write_warmstart(void);
void read_warmstart(void);
char *addrmerge __P((struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr,
char *netid));
void network_init __P((void));
struct sockaddr *local_sa __P((int));
char *addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr,
char *netid);
void network_init(void);
struct sockaddr *local_sa(int);
/* For different getaddr semantics */
#define RPCB_ALLVERS 0

View File

@ -70,9 +70,9 @@ static struct sockaddr_in *local_in4;
static struct sockaddr_in6 *local_in6;
#endif
static int bitmaskcmp __P((void *, void *, void *, int));
static int bitmaskcmp(void *, void *, void *, int);
#ifdef INET6
static void in6_fillscopeid __P((struct sockaddr_in6 *));
static void in6_fillscopeid(struct sockaddr_in6 *);
#endif
/*

View File

@ -63,8 +63,8 @@
#define PMAPFILE "/tmp/portmap.file"
#endif
static bool_t write_struct __P((char *, xdrproc_t, void *));
static bool_t read_struct __P((char *, xdrproc_t, void *));
static bool_t write_struct(char *, xdrproc_t, void *);
static bool_t read_struct(char *, xdrproc_t, void *);
static bool_t
write_struct(char *filename, xdrproc_t structproc, void *list)

View File

@ -59,9 +59,9 @@ int lineno = 1;
#define LINEBUF_SIZE 1000
char linebuf[LINEBUF_SIZE];
int parse __P((FILE **));
void yyerror __P((const char *));
int yylex __P((void));
int parse(FILE **);
void yyerror(const char *);
int yylex(void);
%}
/* common section */
@ -255,7 +255,7 @@ off {
int parse(FILE **fp)
{
extern int yyparse __P((void));
extern int yyparse(void);
yyin = *fp;

View File

@ -64,10 +64,10 @@ u_int retry;
char errbuf[LINE_MAX];
extern int lineno;
extern void yyerror __P((const char *s));
extern int yylex __P((void));
static struct payload_list * pllist_lookup __P((int seqnum));
static void pllist_enqueue __P((struct payload_list *pl_entry));
extern void yyerror(const char *s);
extern int yylex(void);
static struct payload_list * pllist_lookup(int seqnum);
static void pllist_enqueue(struct payload_list *pl_entry);
#define MAX_RETRYNUM 10 /* upper limit of retry in this rrenumd program */
#define MAX_SEQNUM 256 /* upper limit of seqnum in this rrenumd program */

View File

@ -95,29 +95,29 @@ int with_v4dest, with_v6dest;
struct in6_addr prefix; /* ADHOC */
int prefixlen = 64; /* ADHOC */
extern int parse __P((FILE **));
extern int parse(FILE **);
static void show_usage __P((void));
static void init_sin6 __P((struct sockaddr_in6 *, const char *));
static void show_usage(void);
static void init_sin6(struct sockaddr_in6 *, const char *);
#if 0
static void join_multi __P((const char *));
static void join_multi(const char *);
#endif
static void init_globals __P((void));
static void config __P((FILE **));
static void init_globals(void);
static void config(FILE **);
#ifdef IPSEC_POLICY_IPSEC
static void sock6_open __P((struct flags *, char *));
static void sock4_open __P((struct flags *, char *));
static void sock6_open(struct flags *, char *);
static void sock4_open(struct flags *, char *);
#else
static void sock6_open __P((struct flags *));
static void sock4_open __P((struct flags *));
static void sock6_open(struct flags *);
static void sock4_open(struct flags *);
#endif
static void rrenum_output __P((struct payload_list *, struct dst_list *));
static void rrenum_snd_eachdst __P((struct payload_list *));
static void rrenum_output(struct payload_list *, struct dst_list *);
static void rrenum_snd_eachdst(struct payload_list *);
#if 0
static void rrenum_snd_fullsequence __P((void));
static void rrenum_snd_fullsequence(void);
#endif
static void rrenum_input __P((int));
int main __P((int, char *[]));
static void rrenum_input(int);
int main(int, char *[]);
/* Print usage. Don't call this after daemonized. */

View File

@ -87,15 +87,15 @@ static char *remotefile;
extern char *conffile;
int tgetent __P((char *, char *));
int getent __P((char *, char *, char *));
int tnchktc __P((void));
int tnamatch __P((char *));
static char *tskip __P((char *));
int64_t tgetnum __P((char *));
int tgetflag __P((char *));
char *tgetstr __P((char *, char **));
static char *tdecode __P((char *, char **));
int tgetent(char *, char *);
int getent(char *, char *, char *);
int tnchktc(void);
int tnamatch(char *);
static char *tskip(char *);
int64_t tgetnum(char *);
int tgetflag(char *);
char *tgetstr(char *, char **);
static char *tdecode(char *, char **);
/*
* Get an entry for terminal name in buffer bp,

View File

@ -36,10 +36,10 @@
__BEGIN_DECLS
extern int agetent __P((char *, const char *));
extern int agetflag __P((const char *));
extern int64_t agetnum __P((const char *));
extern char *agetstr __P((const char *, char **));
extern int agetent(char *, const char *);
extern int agetflag(const char *);
extern int64_t agetnum(const char *);
extern char *agetstr(const char *, char **);
__END_DECLS

View File

@ -69,9 +69,9 @@ static time_t prefix_timo = (60 * 120); /* 2 hours.
* XXX: should be configurable. */
extern struct rainfo *ralist;
static struct rtadvd_timer *prefix_timeout __P((void *));
static void makeentry __P((char *, size_t, int, char *));
static int getinet6sysctl __P((int));
static struct rtadvd_timer *prefix_timeout(void *);
static void makeentry(char *, size_t, int, char *);
static int getinet6sysctl(int);
void
getconfig(intface)

View File

@ -30,13 +30,13 @@
* SUCH DAMAGE.
*/
extern void getconfig __P((char *));
extern void delete_prefix __P((struct prefix *));
extern void invalidate_prefix __P((struct prefix *));
extern void update_prefix __P((struct prefix *));
extern void make_prefix __P((struct rainfo *, int, struct in6_addr *, int));
extern void make_packet __P((struct rainfo *));
extern void get_prefix __P((struct rainfo *));
extern void getconfig(char *);
extern void delete_prefix(struct prefix *);
extern void invalidate_prefix(struct prefix *);
extern void update_prefix(struct prefix *);
extern void make_prefix(struct rainfo *, int, struct in6_addr *, int);
extern void make_packet(struct rainfo *);
extern void get_prefix(struct rainfo *);
/*

View File

@ -61,8 +61,8 @@ static FILE *fp;
extern struct rainfo *ralist;
static char *ether_str __P((struct sockaddr_dl *));
static void if_dump __P((void));
static char *ether_str(struct sockaddr_dl *);
static void if_dump(void);
static char *rtpref_str[] = {
"medium", /* 00 */

View File

@ -30,4 +30,4 @@
* SUCH DAMAGE.
*/
extern void rtadvd_dump_file __P((char *));
extern void rtadvd_dump_file(char *);

View File

@ -63,9 +63,9 @@ int iflist_init_ok;
size_t ifblock_size;
char *ifblock;
static void get_iflist __P((char **buf, size_t *size));
static void parse_iflist __P((struct if_msghdr ***ifmlist_p, char *buf,
size_t bufsize));
static void get_iflist(char **buf, size_t *size);
static void parse_iflist(struct if_msghdr ***ifmlist_p, char *buf,
size_t bufsize);
static void
get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)

View File

@ -37,22 +37,22 @@ extern size_t ifblock_size;
extern char *ifblock;
struct nd_opt_hdr;
struct sockaddr_dl *if_nametosdl __P((char *));
int if_getmtu __P((char *));
int if_getflags __P((int, int));
int lladdropt_length __P((struct sockaddr_dl *));
void lladdropt_fill __P((struct sockaddr_dl *, struct nd_opt_hdr *));
int rtbuf_len __P((void));
char *get_next_msg __P((char *, char *, int, size_t *, int));
struct in6_addr *get_addr __P((char *));
int get_rtm_ifindex __P((char *));
int get_ifm_ifindex __P((char *));
int get_ifam_ifindex __P((char *));
int get_ifm_flags __P((char *));
int get_prefixlen __P((char *));
int prefixlen __P((u_char *, u_char *));
int rtmsg_type __P((char *));
int ifmsg_type __P((char *));
int rtmsg_len __P((char *));
int ifmsg_len __P((char *));
void init_iflist __P((void));
struct sockaddr_dl *if_nametosdl(char *);
int if_getmtu(char *);
int if_getflags(int, int);
int lladdropt_length(struct sockaddr_dl *);
void lladdropt_fill(struct sockaddr_dl *, struct nd_opt_hdr *);
int rtbuf_len(void);
char *get_next_msg(char *, char *, int, size_t *, int);
struct in6_addr *get_addr(char *);
int get_rtm_ifindex(char *);
int get_ifm_ifindex(char *);
int get_ifam_ifindex(char *);
int get_ifm_flags(char *);
int get_prefixlen(char *);
int prefixlen(u_char *, u_char *);
int rtmsg_type(char *);
int ifmsg_type(char *);
int rtmsg_len(char *);
int ifmsg_len(char *);
void init_iflist(void);

View File

@ -30,5 +30,5 @@
* SUCH DAMAGE.
*/
void rr_input __P((int, struct icmp6_router_renum *, struct in6_pktinfo *,
struct sockaddr_in6 *, struct in6_addr *));
void rr_input(int, struct icmp6_router_renum *, struct in6_pktinfo *,
struct sockaddr_in6 *, struct in6_addr *);

View File

@ -124,25 +124,25 @@ u_int32_t ndopt_flags[] = {
NDOPT_FLAG_PREFIXINFO, NDOPT_FLAG_RDHDR, NDOPT_FLAG_MTU,
};
int main __P((int, char *[]));
static void set_die __P((int));
static void die __P((void));
static void sock_open __P((void));
static void rtsock_open __P((void));
static void rtadvd_input __P((void));
static void rs_input __P((int, struct nd_router_solicit *,
struct in6_pktinfo *, struct sockaddr_in6 *));
static void ra_input __P((int, struct nd_router_advert *,
struct in6_pktinfo *, struct sockaddr_in6 *));
static int prefix_check __P((struct nd_opt_prefix_info *, struct rainfo *,
struct sockaddr_in6 *));
static int nd6_options __P((struct nd_opt_hdr *, int,
union nd_opts *, u_int32_t));
static void free_ndopts __P((union nd_opts *));
static void ra_output __P((struct rainfo *));
static void rtmsg_input __P((void));
static void rtadvd_set_dump_file __P((int));
static void set_short_delay __P((struct rainfo *));
int main(int, char *[]);
static void set_die(int);
static void die(void);
static void sock_open(void);
static void rtsock_open(void);
static void rtadvd_input(void);
static void rs_input(int, struct nd_router_solicit *,
struct in6_pktinfo *, struct sockaddr_in6 *);
static void ra_input(int, struct nd_router_advert *,
struct in6_pktinfo *, struct sockaddr_in6 *);
static int prefix_check(struct nd_opt_prefix_info *, struct rainfo *,
struct sockaddr_in6 *);
static int nd6_options(struct nd_opt_hdr *, int,
union nd_opts *, u_int32_t);
static void free_ndopts(union nd_opts *);
static void ra_output(struct rainfo *);
static void rtmsg_input(void);
static void rtadvd_set_dump_file(int);
static void set_short_delay(struct rainfo *);
int
main(argc, argv)

View File

@ -151,11 +151,11 @@ struct rainfo {
struct soliciter *soliciter; /* recent solication source */
};
struct rtadvd_timer *ra_timeout __P((void *));
void ra_timer_update __P((void *, struct timeval *));
struct rtadvd_timer *ra_timeout(void *);
void ra_timer_update(void *, struct timeval *);
int prefix_match __P((struct in6_addr *, int, struct in6_addr *, int));
struct rainfo *if_indextorainfo __P((int));
struct prefix *find_prefix __P((struct rainfo *, struct in6_addr *, int));
int prefix_match(struct in6_addr *, int, struct in6_addr *, int);
struct rainfo *if_indextorainfo(int);
struct prefix *find_prefix(struct rainfo *, struct in6_addr *, int);
extern struct in6_addr in6a_site_allrouters;

View File

@ -57,8 +57,8 @@ rtadvd_timer_init()
}
struct rtadvd_timer *
rtadvd_add_timer(struct rtadvd_timer *(*timeout) __P((void *)),
void (*update) __P((void *, struct timeval *)),
rtadvd_add_timer(struct rtadvd_timer *(*timeout)(void *),
void (*update)(void *, struct timeval *),
void *timeodata, void *updatedata)
{
struct rtadvd_timer *newtimer;

View File

@ -46,20 +46,20 @@ struct rtadvd_timer {
struct rainfo *rai;
struct timeval tm;
struct rtadvd_timer *(*expire) __P((void *)); /* expiration function */
struct rtadvd_timer *(*expire)(void *); /* expiration function */
void *expire_data;
void (*update) __P((void *, struct timeval *)); /* update function */
void (*update)(void *, struct timeval *); /* update function */
void *update_data;
};
void rtadvd_timer_init __P((void));
struct rtadvd_timer *rtadvd_add_timer __P((struct rtadvd_timer *(*) __P((void *)),
void (*) __P((void *, struct timeval *)), void *, void *));
void rtadvd_set_timer __P((struct timeval *, struct rtadvd_timer *));
void rtadvd_remove_timer __P((struct rtadvd_timer **));
struct timeval * rtadvd_check_timer __P((void));
struct timeval * rtadvd_timer_rest __P((struct rtadvd_timer *));
void TIMEVAL_ADD __P((struct timeval *, struct timeval *,
struct timeval *));
void TIMEVAL_SUB __P((struct timeval *, struct timeval *,
struct timeval *));
void rtadvd_timer_init(void);
struct rtadvd_timer *rtadvd_add_timer(struct rtadvd_timer *(*)(void *),
void (*)(void *, struct timeval *), void *, void *);
void rtadvd_set_timer(struct timeval *, struct rtadvd_timer *);
void rtadvd_remove_timer(struct rtadvd_timer **);
struct timeval * rtadvd_check_timer(void);
struct timeval * rtadvd_timer_rest(struct rtadvd_timer *);
void TIMEVAL_ADD(struct timeval *, struct timeval *,
struct timeval *);
void TIMEVAL_SUB(struct timeval *, struct timeval *,
struct timeval *);

View File

@ -51,8 +51,8 @@ static FILE *fp;
extern struct ifinfo *iflist;
static void dump_interface_status __P((void));
static char *sec2str __P((time_t));
static void dump_interface_status(void);
static char *sec2str(time_t);
char *ifstatstr[] = {"IDLE", "DELAY", "PROBE", "DOWN", "TENTATIVE"};
static void

View File

@ -63,8 +63,8 @@
extern int rssock;
static int ifsock;
static int get_llflag __P((const char *));
static void get_rtaddrs __P((int, struct sockaddr *, struct sockaddr **));
static int get_llflag(const char *);
static void get_rtaddrs(int, struct sockaddr *, struct sockaddr **);
int
ifinit(void)

View File

@ -60,7 +60,7 @@
static struct msghdr sndmhdr;
static struct iovec sndiov[2];
static int probesock;
static void sendprobe __P((struct in6_addr *, struct ifinfo *));
static void sendprobe(struct in6_addr *, struct ifinfo *);
int
probe_init(void)

View File

@ -64,13 +64,13 @@
: sizeof(u_long)))
#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
static int rtsock_input_ifannounce __P((int, struct rt_msghdr *, char *));
static int rtsock_input_ifannounce(int, struct rt_msghdr *, char *);
#endif
static struct {
u_char type;
size_t minlen;
int (*func) __P((int, struct rt_msghdr *, char *));
int (*func)(int, struct rt_msghdr *, char *);
} rtsock_dispatch[] = {
#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
{ RTM_IFANNOUNCE, sizeof(struct if_announcemsghdr),

Some files were not shown because too many files have changed in this diff Show More