diff options
-rw-r--r-- | ax25ipd/ax25ipd.c | 4 | ||||
-rw-r--r-- | ax25ipd/config.c | 17 | ||||
-rw-r--r-- | ax25ipd/crc.c | 15 | ||||
-rw-r--r-- | ax25ipd/io.c | 29 | ||||
-rw-r--r-- | ax25ipd/kiss.c | 19 | ||||
-rw-r--r-- | ax25ipd/process.c | 27 | ||||
-rw-r--r-- | ax25ipd/routing.c | 24 | ||||
-rw-r--r-- | ax25mond/ax25mond.c | 2 | ||||
-rw-r--r-- | ax25rtd/config.c | 4 |
9 files changed, 49 insertions, 92 deletions
diff --git a/ax25ipd/ax25ipd.c b/ax25ipd/ax25ipd.c index 0b94b7a..461147d 100644 --- a/ax25ipd/ax25ipd.c +++ b/ax25ipd/ax25ipd.c @@ -170,7 +170,7 @@ int main(int argc, char **argv) } -void greet_world() +void greet_world(void) { printf("\nax25ipd %s / %s\n", VERS2, VERSION); printf @@ -180,7 +180,7 @@ void greet_world() fflush(stdout); } -void do_stats() +void do_stats(void) { int save_loglevel; diff --git a/ax25ipd/config.c b/ax25ipd/config.c index e6ae790..f1f4be5 100644 --- a/ax25ipd/config.c +++ b/ax25ipd/config.c @@ -24,7 +24,7 @@ #include "ax25ipd.h" /* Initialize the config table */ -void config_init() +void config_init(void) { int i; @@ -69,8 +69,7 @@ void config_init() /* Open and read the config file */ -void config_read(f) -char *f; +void config_read(char *f) { FILE *cf; char buf[256], cbuf[256]; @@ -152,8 +151,7 @@ char *f; } /* Process each line from the config file. The return value is encoded. */ -int parse_line(buf) -char *buf; +int parse_line(char *buf) { char *p, *q; unsigned char tcall[7], tip[4]; @@ -366,9 +364,7 @@ char *buf; } /* Convert ascii callsign to internal format */ -int a_to_call(text, tcall) -char *text; -unsigned char *tcall; +int a_to_call(char *text, unsigned char *tcall) { int i; int ssid; @@ -402,8 +398,7 @@ unsigned char *tcall; } /* Convert internal callsign to printable format */ -char *call_to_a(tcall) -unsigned char *tcall; +char *call_to_a(unsigned char *tcall) { int i; int ssid; @@ -435,7 +430,7 @@ unsigned char *tcall; } /* print the configuration data out */ -void dump_config() +void dump_config(void) { LOGL1("\nCurrent configuration:\n"); if (ip_mode) diff --git a/ax25ipd/crc.c b/ax25ipd/crc.c index f6fc565..b90bde0 100644 --- a/ax25ipd/crc.c +++ b/ax25ipd/crc.c @@ -70,10 +70,7 @@ static u16 fcstab[256] = { /* * Calculate a new fcs given the current fcs and the new data. */ -u16 pppfcs(fcs, cp, len) -register u16 fcs; -register unsigned char *cp; -register int len; +u16 pppfcs(register u16 fcs, register unsigned char *cp, register int len) { /* ASSERT(sizeof (u16) == 2); */ /* ASSERT(((u16) -1) > 0); */ @@ -94,9 +91,7 @@ register int len; */ /* Return the computed CRC */ -unsigned short int compute_crc(buf, l) -unsigned char *buf; -int l; +unsigned short int compute_crc(unsigned char *buf, int l) { int fcs; @@ -107,9 +102,7 @@ int l; } /* Return true if the CRC is correct */ -int ok_crc(buf, l) -unsigned char *buf; -int l; +int ok_crc(unsigned char *buf, int l) { int fcs; @@ -125,7 +118,7 @@ int l; */ #ifdef TEST -void main() +void main(int argc, char *argv[]) { unsigned char buf[258]; int l, i; diff --git a/ax25ipd/io.c b/ax25ipd/io.c index 92217fc..0c0f2d5 100644 --- a/ax25ipd/io.c +++ b/ax25ipd/io.c @@ -92,7 +92,7 @@ int ttyfd_bpq = 0; * Initialize the io variables */ -void io_init() +void io_init(void) { /* @@ -140,7 +140,7 @@ void io_init() * open and initialize the IO interfaces */ -void io_open() +void io_open(void) { int baudrate; int i_am_unix98_pty_master = 0; /* unix98 ptmx support */ @@ -329,7 +329,7 @@ behind_normal_tty: * run in a loop, using the select call to handle input. */ -void io_start() { +void io_start(void) { int n, nb, hdr_len; fd_set readfds; unsigned char buf[MAX_FRAME]; @@ -455,10 +455,7 @@ out_ttyfd: /* Send an IP frame */ -void send_ip(buf, l, targetip) -unsigned char *buf; -int l; -unsigned char *targetip; +void send_ip(unsigned char *buf, int l, unsigned char *targetip) { int n; @@ -490,9 +487,7 @@ unsigned char *targetip; /* Send a kiss frame */ -void send_tty(buf, l) -unsigned char *buf; -int l; +void send_tty(unsigned char *buf, int l) { int n; unsigned char *p; @@ -535,13 +530,13 @@ int l; } /* process an I/O error; return true if a retry is needed */ -int io_error(oops, buf, bufsize, dir, mode, where) -int oops; /* the error flag; < 0 indicates a problem */ -unsigned char *buf; /* the data in question */ -int bufsize; /* the size of the data buffer */ -int dir; /* the direction; input or output */ -int mode; /* the fd on which we got the error */ -int where; /* line in the code where this function was called */ +int io_error( + int oops, /* the error flag; < 0 indicates a problem */ + unsigned char *buf, /* the data in question */ + int bufsize, /* the size of the data buffer */ + int dir, /* the direction; input or output */ + int mode, /* the fd on which we got the error */ + int where) /* line in the code where this function was called */ { /* if (oops >= 0) diff --git a/ax25ipd/kiss.c b/ax25ipd/kiss.c index a93b63e..ae580ce 100644 --- a/ax25ipd/kiss.c +++ b/ax25ipd/kiss.c @@ -44,7 +44,7 @@ int param_tbl_top; * Initialize the KISS variables */ -void kiss_init() +void kiss_init(void) { ifptr = iframe; ifcount = 0; @@ -60,9 +60,7 @@ void kiss_init() * frame has been assembled. */ -void assemble_kiss(buf, l) -unsigned char *buf; -int l; +void assemble_kiss(unsigned char *buf, int l) { int i; unsigned char c; @@ -114,10 +112,7 @@ int l; } /* convert a standard AX25 frame into a kiss frame */ -void send_kiss(type, buf, l) -unsigned char type; -unsigned char *buf; -int l; +void send_kiss(unsigned char type, unsigned char *buf, int l) { #define KISSEMIT(x) if(ofcount<MAX_FRAME){*ofptr=(x);ofptr++;ofcount++;} @@ -156,9 +151,7 @@ int l; } /* Add an entry to the parameter table */ -void param_add(p, v) -int p; -int v; +void param_add(int p, int v) { if (param_tbl_top >= PTABLE_SIZE) { fprintf(stderr, "param table is full; entry ignored.\n"); @@ -173,7 +166,7 @@ int v; } /* dump the contents of the parameter table */ -void dump_params() +void dump_params(void) { int i; @@ -186,7 +179,7 @@ void dump_params() } /* send the parameters to the TNC */ -void send_params() +void send_params(void) { int i; unsigned char p, v; diff --git a/ax25ipd/process.c b/ax25ipd/process.c index da5ed42..9508f0e 100644 --- a/ax25ipd/process.c +++ b/ax25ipd/process.c @@ -37,7 +37,7 @@ int bclen; /* The size of bcbuf */ * Initialize the process variables */ -void process_init() +void process_init(void) { bclen = -1; /* flag that we need to rebuild the bctext */ } @@ -65,9 +65,7 @@ void process_init() * the IP interface. */ -void from_kiss(buf, l) -unsigned char *buf; -int l; +void from_kiss(unsigned char *buf, int l) { unsigned char *a, *ipaddr; @@ -148,9 +146,7 @@ int l; * We simply send the packet to the KISS send routine. */ -void from_ip(buf, l) -unsigned char *buf; -int l; +void from_ip(unsigned char *buf, int l) { int port = 0; unsigned char *a; @@ -209,7 +205,7 @@ int l; * Send an ID frame out the KISS port. */ -void do_beacon() +void do_beacon(void) { int i; unsigned char *p; @@ -255,8 +251,7 @@ void do_beacon() * return true if the addresses supplied match * modified for wildcarding by vk5xxx */ -int addrmatch(a, b) -unsigned char *a, *b; +int addrmatch(unsigned char *a, unsigned char *b) { if ((*a == '\0') || (*b == '\0')) return 0; @@ -284,8 +279,7 @@ unsigned char *a, *b; /* * return pointer to the next station to get this packet */ -unsigned char *next_addr(f) -unsigned char *f; +unsigned char *next_addr(unsigned char *f) { unsigned char *a; @@ -310,9 +304,7 @@ unsigned char *f; * tack on the CRC for the frame. Note we assume the buffer is long * enough to have the two bytes tacked on. */ -void add_crc(buf, l) -unsigned char *buf; -int l; +void add_crc(unsigned char *buf, int l) { unsigned short int u; @@ -324,10 +316,7 @@ int l; /* * Dump AX25 frame. */ -void dump_ax25frame(t, buf, l) -unsigned char *buf; -char *t; -int l; +void dump_ax25frame(char *t, unsigned char *buf, int l) { #ifdef DEBUG int i; diff --git a/ax25ipd/routing.c b/ax25ipd/routing.c index 990c693..8519b0c 100644 --- a/ax25ipd/routing.c +++ b/ax25ipd/routing.c @@ -39,7 +39,7 @@ struct bcast_table_entry { struct bcast_table_entry *bcast_tbl; /* Initialize the routing module */ -void route_init() +void route_init(void) { route_tbl = NULL; default_route = NULL; @@ -47,11 +47,8 @@ void route_init() } /* Add a new route entry */ -void route_add(ip, call, udpport, flags) -unsigned char *ip; -unsigned char *call; -int udpport; -unsigned int flags; +void route_add(unsigned char *ip, unsigned char *call, int udpport, + unsigned int flags) { struct route_table_entry *rl, *rn; int i; @@ -104,8 +101,7 @@ unsigned int flags; } /* Add a new broadcast address entry */ -void bcast_add(call) -unsigned char *call; +void bcast_add(unsigned char *call) { struct bcast_table_entry *bl, *bn; int i; @@ -145,8 +141,7 @@ unsigned char *call; * immediately following the IP address. (UGLY coding; to be fixed later!) */ -unsigned char *call_to_ip(call) -unsigned char *call; +unsigned char *call_to_ip(unsigned char *call) { struct route_table_entry *rp; unsigned char mycall[7]; @@ -192,8 +187,7 @@ unsigned char *call; * Accept a callsign and return true if it is a broadcast address, or false * if it is not found on the list */ -int is_call_bcast(call) -unsigned char *call; +int is_call_bcast(unsigned char *call) { struct bcast_table_entry *bp; unsigned char bccall[7]; @@ -222,9 +216,7 @@ unsigned char *call; } /* Traverse the routing table, transmitting the packet to each bcast route */ -void send_broadcast(buf, l) -unsigned char *buf; -int l; +void send_broadcast(unsigned char *buf, int l) { struct route_table_entry *rp; @@ -238,7 +230,7 @@ int l; } /* print out the list of routes */ -void dump_routes() +void dump_routes(void) { struct route_table_entry *rp; int i; diff --git a/ax25mond/ax25mond.c b/ax25mond/ax25mond.c index efcceb0..81b2da9 100644 --- a/ax25mond/ax25mond.c +++ b/ax25mond/ax25mond.c @@ -189,7 +189,7 @@ void add_socket(char *sockname, char monmode) /*--------------------------------------------------------------------------*/ -void close_sockets() +void close_sockets(void) { int i; diff --git a/ax25rtd/config.c b/ax25rtd/config.c index 1fa94a3..f557456 100644 --- a/ax25rtd/config.c +++ b/ax25rtd/config.c @@ -1,4 +1,4 @@ -/* $Id: config.c,v 1.4 2006/10/05 11:50:39 dl9sau Exp $ +/* $Id: config.c,v 1.5 2009/06/14 08:08:26 ralf Exp $ * * Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com) * @@ -267,7 +267,7 @@ void load_listeners(void) fclose(fp); } -void load_config() +void load_config(void) { FILE *fp; char buf[1024], *p, *cmd, *arg; |