/sys/net cleanup
Alexey Slynko
slynko at tronet.ru
Tue Nov 22 10:24:55 PST 2005
Hi,
1) Ansify function definitions
2) Some style(9) code cleanup
3) Add Parameters: comment in some places
Index: zlib.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/zlib.c,v
retrieving revision 1.7
diff -u -r1.7 zlib.c
--- zlib.c 21 Dec 2004 02:54:14 -0000 1.7
+++ zlib.c 22 Nov 2005 18:01:27 -0000
@@ -724,11 +724,9 @@
zmemzero((charf *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
/* ========================================================================= */
-int deflateInit_(strm, level, version, stream_size)
- z_streamp strm;
- int level;
- const char *version;
- int stream_size;
+int
+deflateInit_(z_streamp strm, int level, const char * version,
+ int stream_size)
{
return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, version, stream_size);
@@ -736,16 +734,10 @@
}
/* ========================================================================= */
-int deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
- version, stream_size)
- z_streamp strm;
- int level;
- int method;
- int windowBits;
- int memLevel;
- int strategy;
- const char *version;
- int stream_size;
+int
+deflateInit2_(z_streamp strm, int level, int method, int windowBits,
+ int memLevel, int strategy, const char *version,
+ int stream_size)
{
deflate_state *s;
int noheader = 0;
@@ -824,10 +816,8 @@
}
/* ========================================================================= */
-int deflateSetDictionary (strm, dictionary, dictLength)
- z_streamp strm;
- const Bytef *dictionary;
- uInt dictLength;
+int
+deflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
{
deflate_state *s;
uInt length = dictLength;
@@ -867,8 +857,8 @@
}
/* ========================================================================= */
-int deflateReset (strm)
- z_streamp strm;
+int
+deflateReset(z_streamp strm)
{
deflate_state *s;
@@ -897,10 +887,8 @@
}
/* ========================================================================= */
-int deflateParams(strm, level, strategy)
- z_streamp strm;
- int level;
- int strategy;
+int
+deflateParams(z_streamp strm, int level, int strategy)
{
deflate_state *s;
compress_func func;
@@ -937,9 +925,8 @@
* IN assertion: the stream state is correct and there is enough room in
* pending_buf.
*/
-local void putShortMSB (s, b)
- deflate_state *s;
- uInt b;
+local void
+putShortMSB(deflate_state *s, uInt b)
{
put_byte(s, (Byte)(b >> 8));
put_byte(s, (Byte)(b & 0xff));
@@ -951,8 +938,8 @@
* to avoid allocating a large strm->next_out buffer and copying into it.
* (See also read_buf()).
*/
-local void flush_pending(strm)
- z_streamp strm;
+local void
+flush_pending(z_streamp strm)
{
deflate_state *s = (deflate_state *) strm->state;
unsigned len = s->pending;
@@ -974,9 +961,8 @@
}
/* ========================================================================= */
-int deflate (strm, flush)
- z_streamp strm;
- int flush;
+int
+deflate(z_streamp strm, int flush)
{
int old_flush; /* value of flush param for previous deflate call */
deflate_state *s;
@@ -1111,8 +1097,8 @@
}
/* ========================================================================= */
-int deflateEnd (strm)
- z_streamp strm;
+int
+deflateEnd(z_streamp strm)
{
int status;
deflate_state *s;
@@ -1141,9 +1127,8 @@
/* =========================================================================
* Copy the source state to the destination state.
*/
-int deflateCopy (dest, source)
- z_streamp dest;
- z_streamp source;
+int
+deflateCopy(z_streamp dest, z_streamp source)
{
deflate_state *ds;
deflate_state *ss;
@@ -1193,8 +1178,8 @@
* Return the number of bytes of output which are immediately available
* for output from the decompressor.
*/
-int deflateOutputPending (strm)
- z_streamp strm;
+int
+deflateOutputPending(z_streamp strm)
{
if (strm == Z_NULL || strm->state == Z_NULL) return 0;
@@ -1208,10 +1193,8 @@
* allocating a large strm->next_in buffer and copying from it.
* (See also flush_pending()).
*/
-local int read_buf(strm, buf, size)
- z_streamp strm;
- charf *buf;
- unsigned size;
+local int
+read_buf(z_streamp strm, charf *buf, unsigned size)
{
unsigned len = strm->avail_in;
@@ -1233,8 +1216,8 @@
/* ===========================================================================
* Initialize the "longest match" routines for a new zlib stream
*/
-local void lm_init (s)
- deflate_state *s;
+local void
+lm_init(deflate_state *s)
{
s->window_size = (ulg)2L*s->w_size;
@@ -1266,14 +1249,16 @@
* IN assertions: cur_match is the head of the hash chain for the current
* string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
* OUT assertion: the match length is not greater than s->lookahead.
+ *
+ * Parameters:
+ * cur_match: current match
*/
#ifndef ASMV
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
* match.S. The code will be functionally equivalent.
*/
-local uInt longest_match(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
+local uInt
+longest_match(deflate_state *s, IPos cur_match)
{
unsigned chain_length = s->max_chain_length;/* max hash chain length */
Bytef *scan = s->window + s->strstart; /* current string */
@@ -1414,10 +1399,8 @@
/* ===========================================================================
* Check that the match at match_start is indeed a match.
*/
-local void check_match(s, start, match, length)
- deflate_state *s;
- IPos start, match;
- int length;
+local void
+check_match(deflate_state *s, IPos start, IPos match, int length)
{
/* check that the match is indeed a match */
if (zmemcmp((charf *)s->window + match,
@@ -1448,8 +1431,8 @@
* performed for at least two bytes (required for the zip translate_eol
* option -- not supported here).
*/
-local void fill_window(s)
- deflate_state *s;
+local void
+fill_window(deflate_state *s)
{
unsigned n, m;
Posf *p;
@@ -1568,9 +1551,8 @@
* NOTE: this function should be optimized to avoid extra copying from
* window to pending_buf.
*/
-local block_state deflate_stored(s, flush)
- deflate_state *s;
- int flush;
+local block_state
+deflate_stored(deflate_state *s, int flush)
{
/* Stored blocks are limited to 0xffff bytes, pending_buf is limited
* to pending_buf_size, and each stored block has a 5 byte header:
@@ -1626,9 +1608,8 @@
* new strings in the dictionary only for unmatched strings or for short
* matches. It is used only for the fast compression options.
*/
-local block_state deflate_fast(s, flush)
- deflate_state *s;
- int flush;
+local block_state
+deflate_fast(deflate_state *s, int flush)
{
IPos hash_head = NIL; /* head of the hash chain */
int bflush; /* set if current block must be flushed */
@@ -1719,9 +1700,8 @@
* evaluation for matches: a match is finally adopted only if there is
* no better match at the next window position.
*/
-local block_state deflate_slow(s, flush)
- deflate_state *s;
- int flush;
+local block_state
+deflate_slow(deflate_state *s, int flush)
{
IPos hash_head = NIL; /* head of hash chain */
int bflush; /* set if current block must be flushed */
@@ -2016,14 +1996,16 @@
/* ===========================================================================
* Send a value on a given number of bits.
* IN assertion: length <= 16 and value fits in length bits.
+ *
+ * Parameters:
+ * value: value to send
+ * length: number of bits
*/
#ifdef DEBUG_ZLIB
local void send_bits OF((deflate_state *s, int value, int length));
-local void send_bits(s, value, length)
- deflate_state *s;
- int value; /* value to send */
- int length; /* number of bits */
+local void
+send_bits(deflate_state *s, int value, int length)
{
Tracevv((stderr," l %2d v %4x ", length, value));
Assert(length > 0 && length <= 15, "invalid length");
@@ -2067,7 +2049,8 @@
* this function may be called by two threads concurrently, but this is
* harmless since both invocations do exactly the same thing.
*/
-local void tr_static_init()
+local void
+tr_static_init(void)
{
static int static_init_done = 0;
int n; /* iterates over tree elements */
@@ -2137,8 +2120,8 @@
/* ===========================================================================
* Initialize the tree data structures for a new zlib stream.
*/
-void _tr_init(s)
- deflate_state *s;
+void
+_tr_init(deflate_state *s)
{
tr_static_init();
@@ -2167,8 +2150,8 @@
/* ===========================================================================
* Initialize a new block.
*/
-local void init_block(s)
- deflate_state *s;
+local void
+init_block(deflate_state *s)
{
int n; /* iterates over tree elements */
@@ -2210,11 +2193,13 @@
* exchanging a node with the smallest of its two sons if necessary, stopping
* when the heap property is re-established (each father smaller than its
* two sons).
+ *
+ * Parameters:
+ * tree: the tree to restore
+ * k: node to move down
*/
-local void pqdownheap(s, tree, k)
- deflate_state *s;
- ct_data *tree; /* the tree to restore */
- int k; /* node to move down */
+local void
+pqdownheap( deflate_state *s, ct_data *tree, int k)
{
int v = s->heap[k];
int j = k << 1; /* left son of k */
@@ -2245,10 +2230,12 @@
* array bl_count contains the frequencies for each bit length.
* The length opt_len is updated; static_len is also updated if stree is
* not null.
+ *
+ * Parameters:
+ * desc: the tree descriptor
*/
-local void gen_bitlen(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
+local void
+gen_bitlen(deflate_state *s, tree_desc *desc)
{
ct_data *tree = desc->dyn_tree;
int max_code = desc->max_code;
@@ -2332,11 +2319,14 @@
* the given tree and the field len is set for all tree elements.
* OUT assertion: the field code is set for all tree elements of non
* zero code length.
+ *
+ * Parameters:
+ * tree: the tree to decorate
+ * max_code: largest code with non zero frequency
+ * bl_count: number of codes at each bit length
*/
-local void gen_codes (tree, max_code, bl_count)
- ct_data *tree; /* the tree to decorate */
- int max_code; /* largest code with non zero frequency */
- ushf *bl_count; /* number of codes at each bit length */
+local void
+gen_codes(ct_data *tree, int max_code, ushf *bl_count)
{
ush next_code[MAX_BITS+1]; /* next code value for each bit length */
ush code = 0; /* running code value */
@@ -2374,10 +2364,12 @@
* OUT assertions: the fields len and code are set to the optimal bit length
* and corresponding code. The length opt_len is updated; static_len is
* also updated if stree is not null. The field max_code is set.
+ *
+ * Parameters:
+ * desc: the tree descriptor
*/
-local void build_tree(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
+local void
+build_tree(deflate_state *s, tree_desc *desc)
{
ct_data *tree = desc->dyn_tree;
ct_data *stree = desc->stat_desc->static_tree;
@@ -2461,11 +2453,13 @@
/* ===========================================================================
* Scan a literal or distance tree to determine the frequencies of the codes
* in the bit length tree.
+ *
+ * Parameters:
+ * tree: the tree to be scanned
+ * max_code: and its largest code of non zero frequency
*/
-local void scan_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
+local void
+scan_tree (deflate_state *s, ct_data *tree, int max_code)
{
int n; /* iterates over all tree elements */
int prevlen = -1; /* last emitted length */
@@ -2506,11 +2500,13 @@
/* ===========================================================================
* Send a literal or distance tree in compressed form, using the codes in
* bl_tree.
+ *
+ * Parameters:
+ * tree: the tree to be scanned
+ * max_code: and its largest code of non zero frequency
*/
-local void send_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
+local void
+send_tree(deflate_state *s, ct_data *tree, int max_code)
{
int n; /* iterates over all tree elements */
int prevlen = -1; /* last emitted length */
@@ -2558,8 +2554,8 @@
* Construct the Huffman tree for the bit lengths and return the index in
* bl_order of the last bit length code to send.
*/
-local int build_bl_tree(s)
- deflate_state *s;
+local int
+build_bl_tree(deflate_state *s)
{
int max_blindex; /* index of last bit length code of non zero freq */
@@ -2592,10 +2588,12 @@
* Send the header for a block using dynamic Huffman trees: the counts, the
* lengths of the bit length codes, the literal tree and the distance tree.
* IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
+ *
+ * Parameters:
+ * lcodes, dcodes, blcodes: number of codes for each tree
*/
-local void send_all_trees(s, lcodes, dcodes, blcodes)
- deflate_state *s;
- int lcodes, dcodes, blcodes; /* number of codes for each tree */
+local void
+send_all_trees(deflate_state *s, int lcodes, int dcodes, int blcodes)
{
int rank; /* index in bl_order */
@@ -2621,12 +2619,14 @@
/* ===========================================================================
* Send a stored block
+ *
+ * Parameters:
+ * buf: input block
+ * stored_len: length of input block
+ * eof: true if this is the last block for a file
*/
-void _tr_stored_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+void
+_tr_stored_block(deflate_state *s, charf *buf, ulg stored_len, int eof)
{
send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
@@ -2637,8 +2637,8 @@
/* Send just the `stored block' type code without any length bytes or data.
*/
-void _tr_stored_type_only(s)
- deflate_state *s;
+void
+_tr_stored_type_only(deflate_state *s)
{
send_bits(s, (STORED_BLOCK << 1), 3);
bi_windup(s);
@@ -2657,8 +2657,8 @@
* To simplify the code, we assume the worst case of last real code encoded
* on one bit only.
*/
-void _tr_align(s)
- deflate_state *s;
+void
+_tr_align(deflate_state *s)
{
send_bits(s, STATIC_TREES<<1, 3);
send_code(s, END_BLOCK, static_ltree);
@@ -2682,12 +2682,14 @@
* Determine the best encoding for the current block: dynamic trees, static
* trees or store, and output the encoded block to the zip file. This function
* returns the total compressed length for the file so far.
+ *
+ * Parameters:
+ * buf: input block, or NULL if too old
+ * stored_len: length of input block
+ * eof: true if this is the last block for a file
*/
-ulg _tr_flush_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block, or NULL if too old */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+ulg
+_tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, int eof)
{
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
int max_blindex = 0; /* index of last bit length code of non zero freq */
@@ -2794,11 +2796,13 @@
/* ===========================================================================
* Save the match info and tally the frequency counts. Return true if
* the current block must be flushed.
+ *
+ * Parameters:
+ * dist: distance of matched string
+ * lc: match length-MIN_MATCH or unmatched char (if dist==0)
*/
-int _tr_tally (s, dist, lc)
- deflate_state *s;
- unsigned dist; /* distance of matched string */
- unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
+int
+_tr_tally(deflate_state *s, unsigned dist, unsigned lc)
{
s->d_buf[s->last_lit] = (ush)dist;
s->l_buf[s->last_lit++] = (uch)lc;
@@ -2842,11 +2846,13 @@
/* ===========================================================================
* Send the block data compressed using the given Huffman trees
+ *
+ * Parameters:
+ * ltree: literal tree
+ * dtree: distance tree
*/
-local void compress_block(s, ltree, dtree)
- deflate_state *s;
- ct_data *ltree; /* literal tree */
- ct_data *dtree; /* distance tree */
+local void
+compress_block(deflate_state *s, ct_data *ltree, ct_data *dtree)
{
unsigned dist; /* distance of matched string */
int lc; /* match length or unmatched char (if dist == 0) */
@@ -2896,8 +2902,8 @@
* IN assertion: the fields freq of dyn_ltree are set and the total of all
* frequencies does not exceed 64K (to fit in an int on 16 bit machines).
*/
-local void set_data_type(s)
- deflate_state *s;
+local void
+set_data_type(deflate_state *s)
{
int n = 0;
unsigned ascii_freq = 0;
@@ -2912,10 +2918,13 @@
* Reverse the first len bits of a code, using straightforward code (a faster
* method would use a table)
* IN assertion: 1 <= len <= 15
+ *
+ * Parameters:
+ * code: the value to invert
+ * len: its bit length
*/
-local unsigned bi_reverse(code, len)
- unsigned code; /* the value to invert */
- int len; /* its bit length */
+local unsigned
+bi_reverse(unsigned code, int len)
{
unsigned res = 0;
do {
@@ -2928,8 +2937,8 @@
/* ===========================================================================
* Flush the bit buffer, keeping at most 7 bits in it.
*/
-local void bi_flush(s)
- deflate_state *s;
+local void
+bi_flush(deflate_state *s)
{
if (s->bi_valid == 16) {
put_short(s, s->bi_buf);
@@ -2945,8 +2954,8 @@
/* ===========================================================================
* Flush the bit buffer and align the output on a byte boundary
*/
-local void bi_windup(s)
- deflate_state *s;
+local void
+bi_windup(deflate_state *s)
{
if (s->bi_valid > 8) {
put_short(s, s->bi_buf);
@@ -2963,12 +2972,14 @@
/* ===========================================================================
* Copy a stored block, storing first the length and its
* one's complement if requested.
+ *
+ * Parameters:
+ * buf: the input data
+ * len: its length
+ * header: true if block header must be written
*/
-local void copy_block(s, buf, len, header)
- deflate_state *s;
- charf *buf; /* the input data */
- unsigned len; /* its length */
- int header; /* true if block header must be written */
+local void
+copy_block(deflate_state *s, charf *buf, unsigned len, int header)
{
bi_windup(s); /* align on byte boundary */
s->last_eob_len = 8; /* enough lookahead for inflate */
@@ -3088,8 +3099,8 @@
};
-int inflateReset(z)
-z_streamp z;
+int
+inflateReset(z_streamp z)
{
uLong c;
@@ -3104,8 +3115,8 @@
}
-int inflateEnd(z)
-z_streamp z;
+int
+inflateEnd(z_streamp z)
{
uLong c;
@@ -3120,11 +3131,8 @@
}
-int inflateInit2_(z, w, version, stream_size)
-z_streamp z;
-int w;
-const char *version;
-int stream_size;
+int
+inflateInit2_(z_streamp z, int w, const char *version, int stream_size)
{
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
stream_size != sizeof(z_stream))
@@ -3179,10 +3187,8 @@
}
-int inflateInit_(z, version, stream_size)
-z_streamp z;
-const char *version;
-int stream_size;
+int
+inflateInit_(z_streamp z, const char *version, int stream_size)
{
return inflateInit2_(z, DEF_WBITS, version, stream_size);
}
@@ -3191,9 +3197,8 @@
#define NEEDBYTE {if(z->avail_in==0)goto empty;r=Z_OK;}
#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
-int inflate(z, f)
-z_streamp z;
-int f;
+int
+inflate(z_streamp z, int f)
{
int r;
uInt b;
@@ -3323,10 +3328,8 @@
}
-int inflateSetDictionary(z, dictionary, dictLength)
-z_streamp z;
-const Bytef *dictionary;
-uInt dictLength;
+int
+inflateSetDictionary(z_streamp z, const Bytef *dictionary, uInt dictLength)
{
uInt length = dictLength;
@@ -3355,8 +3358,8 @@
* will have been updated if need be.
*/
-int inflateIncomp(z)
-z_stream *z;
+int
+inflateIncomp(z_stream *z)
{
if (z->state->mode != BLOCKS)
return Z_DATA_ERROR;
@@ -3364,8 +3367,8 @@
}
-int inflateSync(z)
-z_streamp z;
+int
+inflateSync(z_streamp z)
{
uInt n; /* number of bytes to look at */
Bytef *p; /* pointer to bytes */
@@ -3676,10 +3679,8 @@
*/
-void inflate_blocks_reset(s, z, c)
-inflate_blocks_statef *s;
-z_streamp z;
-uLongf *c;
+void
+inflate_blocks_reset(inflate_blocks_statef *s, z_streamp z, uLongf *c)
{
if (s->checkfn != Z_NULL)
*c = s->check;
@@ -3701,10 +3702,8 @@
}
-inflate_blocks_statef *inflate_blocks_new(z, c, w)
-z_streamp z;
-check_func c;
-uInt w;
+inflate_blocks_statef *
+inflate_blocks_new(z_streamp z, check_func c, uInt w)
{
inflate_blocks_statef *s;
@@ -3728,10 +3727,9 @@
#ifdef DEBUG_ZLIB
extern uInt inflate_hufts;
#endif
-int inflate_blocks(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
+
+int
+inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
{
uInt t; /* temporary storage */
uLong b; /* bit buffer */
@@ -4004,10 +4002,8 @@
}
-int inflate_blocks_free(s, z, c)
-inflate_blocks_statef *s;
-z_streamp z;
-uLongf *c;
+int
+inflate_blocks_free(inflate_blocks_statef *s, z_streamp z, uLongf *c)
{
inflate_blocks_reset(s, z, c);
ZFREE(z, s->window);
@@ -4017,10 +4013,8 @@
}
-void inflate_set_dictionary(s, d, n)
-inflate_blocks_statef *s;
-const Bytef *d;
-uInt n;
+void
+inflate_set_dictionary(inflate_blocks_statef *s, const Bytef *d, uInt n)
{
zmemcpy((charf *)s->window, d, n);
s->read = s->write = s->window + n;
@@ -4034,9 +4028,8 @@
* BLOCKS). On exit, the output will also be caught up, and the checksum
* will have been updated if need be.
*/
-int inflate_addhistory(s, z)
-inflate_blocks_statef *s;
-z_stream *z;
+int
+inflate_addhistory(inflate_blocks_statef *s, z_stream *z)
{
uLong b; /* bit buffer */ /* NOT USED HERE */
uInt k; /* bits in bit buffer */ /* NOT USED HERE */
@@ -4084,8 +4077,8 @@
* At the end of a Deflate-compressed PPP packet, we expect to have seen
* a `stored' block type value but not the (zero) length bytes.
*/
-int inflate_packet_flush(s)
- inflate_blocks_statef *s;
+int
+inflate_packet_flush(inflate_blocks_statef *s)
{
if (s->mode != LENS)
return Z_DATA_ERROR;
@@ -4195,20 +4188,26 @@
uInt inflate_hufts;
#endif
-local int huft_build(b, n, s, d, e, t, m, zs)
-uIntf *b; /* code lengths in bits (all assumed <= BMAX) */
-uInt n; /* number of codes (assumed <= N_MAX) */
-uInt s; /* number of simple-valued codes (0..s-1) */
-const uIntf *d; /* list of base values for non-simple codes */
-const uIntf *e; /* list of extra bits for non-simple codes */
-inflate_huft * FAR *t; /* result: starting table */
-uIntf *m; /* maximum lookup bits, returns actual */
-z_streamp zs; /* for zalloc function */
-/* Given a list of code lengths and a maximum table size, make a set of
- tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
- if the given code set is incomplete (the tables are still built in this
- case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of
- lengths), or Z_MEM_ERROR if not enough memory. */
+/*
+ * Parameters:
+ * b: code lengths in bits (all assumed <= BMAX)
+ * n: number of codes (assumed <= N_MAX)
+ * s: number of simple-valued codes (0..s-1)
+ * d: list of base values for non-simple codes
+ * e: list of extra bits for non-simple codes
+ * t: result: starting table
+ * m: maximum lookup bits, returns actual
+ * zs: for zalloc function
+ *
+ * Given a list of code lengths and a maximum table size, make a set of
+ * tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
+ * if the given code set is incomplete (the tables are still built in this
+ * case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of
+ * lengths), or Z_MEM_ERROR if not enough memory.
+ */
+local int
+huft_build(uIntf *b, uInt n, uInt s, const uIntf *d, const uIntf *e,
+ inflate_huft * FAR *t, uIntf *m, z_streamp zs)
{
uInt a; /* counter for codes of length k */
@@ -4398,12 +4397,15 @@
return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK;
}
-
-int inflate_trees_bits(c, bb, tb, z)
-uIntf *c; /* 19 code lengths */
-uIntf *bb; /* bits tree desired/actual depth */
-inflate_huft * FAR *tb; /* bits tree result */
-z_streamp z; /* for zfree function */
+/*
+ * Parameters:
+ * c: 19 code lengths
+ * bb: bits tree desired/actual depth
+ * tb: bits tree result
+ * z: for zfree function
+ */
+int
+inflate_trees_bits(uIntf *c, uIntf *bb, inflate_huft * FAR *tb, z_streamp z)
{
int r;
@@ -4419,16 +4421,21 @@
return r;
}
-
-int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, z)
-uInt nl; /* number of literal/length codes */
-uInt nd; /* number of distance codes */
-uIntf *c; /* that many (total) code lengths */
-uIntf *bl; /* literal desired/actual bit depth */
-uIntf *bd; /* distance desired/actual bit depth */
-inflate_huft * FAR *tl; /* literal/length tree result */
-inflate_huft * FAR *td; /* distance tree result */
-z_streamp z; /* for zfree function */
+/*
+ * Parameters:
+ * nl: number of literal/length codes
+ * nd: number of distance codes
+ * c: that many (total) code lengths
+ * bl: literal desired/actual bit depth
+ * bd: distance desired/actual bit depth
+ * tl: literal/length tree result
+ * td: distance tree result
+ * z: for zfree function
+ */
+int
+inflate_trees_dynamic(uInt nl, uInt nd, uIntf *c, uIntf *bl, uIntf *bd,
+ inflate_huft * FAR *tl, inflate_huft * FAR *td,
+ z_streamp z)
{
int r;
@@ -4486,11 +4493,14 @@
local inflate_huft *fixed_tl;
local inflate_huft *fixed_td;
-
-local voidpf falloc(q, n, s)
-voidpf q; /* opaque pointer */
-uInt n; /* number of items */
-uInt s; /* size of item */
+/*
+ * Parameters:
+ * q: opaque pointer
+ * n: number of items
+ * s: size of item
+ */
+local voidpf
+falloc(voidpf q, uInt n, uInt s)
{
Assert(s == sizeof(inflate_huft) && n <= *(intf *)q,
"inflate_trees falloc overflow");
@@ -4498,12 +4508,16 @@
return (voidpf)(fixed_mem + *(intf *)q);
}
-
-int inflate_trees_fixed(bl, bd, tl, td)
-uIntf *bl; /* literal desired/actual bit depth */
-uIntf *bd; /* distance desired/actual bit depth */
-inflate_huft * FAR *tl; /* literal/length tree result */
-inflate_huft * FAR *td; /* distance tree result */
+/*
+ * Parameters:
+ * bl: literal desired/actual bit depth
+ * bd: distance desired/actual bit depth
+ * tl: literal/length tree result
+ * td: distance tree result
+ */
+int
+inflate_trees_fixed(uIntf *bl, uIntf *bd, inflate_huft * FAR *tl,
+ inflate_huft * FAR *td)
{
/* build fixed tables if not already (multiple overlapped executions ok) */
if (!fixed_built)
@@ -4547,13 +4561,16 @@
return Z_OK;
}
-
-int inflate_trees_free(t, z)
-inflate_huft *t; /* table to free */
-z_streamp z; /* for zfree function */
-/* Free the malloc'ed tables built by huft_build(), which makes a linked
- list of the tables it made, with the links in a dummy first entry of
- each table. */
+/*
+ * Parameters:
+ * t: table to free
+ * z: for zfree function
+ * list of the tables it made, with the links in a dummy first entry of
+ * each table.
+ */
+int
+inflate_trees_free(inflate_huft *t, z_streamp z)
{
inflate_huft *p, *q, *r;
@@ -4655,12 +4672,13 @@
};
-
-inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
-uInt bl, bd;
-inflate_huft *tl;
-inflate_huft *td; /* need separate declaration for Borland C++ */
-z_streamp z;
+/*
+ * Parameters:
+ * td: need separate declaration for Borland C++
+ */
+inflate_codes_statef *
+inflate_codes_new(uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td,
+ z_streamp z)
{
inflate_codes_statef *c;
@@ -4678,10 +4696,8 @@
}
-int inflate_codes(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
+int
+inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
{
uInt j; /* temporary storage */
inflate_huft *t; /* temporary pointer */
@@ -4838,9 +4854,8 @@
}
-void inflate_codes_free(c, z)
-inflate_codes_statef *c;
-z_streamp z;
+void
+inflate_codes_free(inflate_codes_statef *c, z_streamp z)
{
ZFREE(z, c);
Tracev((stderr, "inflate: codes free\n"));
@@ -4872,10 +4887,8 @@
/* copy as much as possible from the sliding window to the output area */
-int inflate_flush(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
+int
+inflate_flush(inflate_blocks_statef *s, z_streamp z, int r)
{
uInt n;
Bytef *p;
@@ -4970,17 +4983,17 @@
#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}
#define UNGRAB {n+=(c=k>>3);p-=c;k&=7;}
-/* Called with number of bytes left to write in window at least 258
- (the maximum string length) and number of input bytes available
- at least ten. The ten bytes are six bytes for the longest length/
- distance pair plus four bytes for overloading the bit buffer. */
-
-int inflate_fast(bl, bd, tl, td, s, z)
-uInt bl, bd;
-inflate_huft *tl;
-inflate_huft *td; /* need separate declaration for Borland C++ */
-inflate_blocks_statef *s;
-z_streamp z;
+/* Called with number of bytes left to write in window at least 258
+ * (the maximum string length) and number of input bytes available
+ * at least ten. The ten bytes are six bytes for the longest length/
+ * distance pair plus four bytes for overloading the bit buffer.
+ *
+ * Parameters:
+ * td: need separate declaration for Borland C++
+ */
+int
+inflate_fast(uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td,
+ inflate_blocks_statef *s, z_streamp z)
{
inflate_huft *t; /* temporary pointer */
uInt e; /* extra bits or operation */
@@ -5151,14 +5164,15 @@
""};
-const char *zlibVersion()
+const char
+*zlibVersion(void)
{
return ZLIB_VERSION;
}
#ifdef DEBUG_ZLIB
-void z_error (m)
- char *m;
+void
+z_error(char *m)
{
fprintf(stderr, "%s\n", m);
exit(1);
@@ -5167,10 +5181,8 @@
#ifndef HAVE_MEMCPY
-void zmemcpy(dest, source, len)
- Bytef* dest;
- Bytef* source;
- uInt len;
+void
+zmemcpy(Bytef *dest, Bytef *source, uInt len)
{
if (len == 0) return;
do {
@@ -5178,10 +5190,8 @@
} while (--len != 0);
}
-int zmemcmp(s1, s2, len)
- Bytef* s1;
- Bytef* s2;
- uInt len;
+int
+zmemcmp(Bytef *s1, Bytef *s2, uInt len)
{
uInt j;
@@ -5191,9 +5201,8 @@
return 0;
}
-void zmemzero(dest, len)
- Bytef* dest;
- uInt len;
+void
+zmemzero(Bytef *dest, uInt len)
{
if (len == 0) return;
do {
@@ -5233,7 +5242,8 @@
* a protected system like OS/2. Use Microsoft C instead.
*/
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf
+zcalloc(voidpf opaque, unsigned items, unsigned size)
{
voidpf buf = opaque; /* just to make some compilers happy */
ulg bsize = (ulg)items*size;
@@ -5257,7 +5267,8 @@
return buf;
}
-void zcfree (voidpf opaque, voidpf ptr)
+void
+zcfreevoidpf opaque, voidpf ptr)
{
int n;
if (*(ush*)&ptr != 0) { /* object < 64K */
@@ -5292,13 +5303,15 @@
# define _hfree hfree
#endif
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf
+zcalloc(voidpf opaque, unsigned items, unsigned size)
{
if (opaque) opaque = 0; /* to make compiler happy */
return _halloc((long)items, size);
}
-void zcfree (voidpf opaque, voidpf ptr)
+void
+zcfree(voidpf opaque, voidpf ptr)
{
if (opaque) opaque = 0; /* to make compiler happy */
_hfree(ptr);
@@ -5314,18 +5327,15 @@
extern void free OF((voidpf ptr));
#endif
-voidpf zcalloc (opaque, items, size)
- voidpf opaque;
- unsigned items;
- unsigned size;
+voidpf
+zcalloc(voidpf opaque, unsigned items, unsigned size)
{
if (opaque) items += size - size; /* make compiler happy */
return (voidpf)calloc(items, size);
}
-void zcfree (opaque, ptr)
- voidpf opaque;
- voidpf ptr;
+void
+zcfree(voidpf opaque, voidpf ptr)
{
free(ptr);
if (opaque) return; /* make compiler happy */
@@ -5355,10 +5365,8 @@
#define DO16(buf) DO8(buf,0); DO8(buf,8);
/* ========================================================================= */
-uLong adler32(adler, buf, len)
- uLong adler;
- const Bytef *buf;
- uInt len;
+uLong
+adler32(uLong adler, const Bytef *buf, uInt len)
{
unsigned long s1 = adler & 0xffff;
unsigned long s2 = (adler >> 16) & 0xffff;
Index: bridge/bridge.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/bridge/bridge.c,v
retrieving revision 1.18
diff -u -r1.18 bridge.c
--- bridge/bridge.c 5 Jul 2005 10:20:39 -0000 1.18
+++ bridge/bridge.c 22 Nov 2005 17:00:52 -0000
@@ -392,7 +392,7 @@
* "ifconfig -l"
*/
static void
-parse_bdg_cfg()
+parse_bdg_cfg(void)
{
char *p, *beg ;
int l, cluster;
Index: disc/if_disc.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/disc/if_disc.c,v
retrieving revision 1.7
diff -u -r1.7 if_disc.c
--- disc/if_disc.c 26 Jan 2005 00:37:39 -0000 1.7
+++ disc/if_disc.c 22 Nov 2005 16:23:07 -0000
@@ -72,7 +72,7 @@
/* ARGSUSED */
static void
-discattach()
+discattach(void)
{
struct ifnet *ifp = &discif;
@@ -112,11 +112,8 @@
DECLARE_MODULE(if_disc, disc_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
static int
-discoutput(ifp, m, dst, rt)
- struct ifnet *ifp;
- struct mbuf *m;
- struct sockaddr *dst;
- struct rtentry *rt;
+discoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
+ struct rtentry *rt)
{
if ((m->m_flags & M_PKTHDR) == 0)
panic("discoutput no HDR");
@@ -148,10 +145,7 @@
/* ARGSUSED */
static void
-discrtrequest(cmd, rt, info)
- int cmd;
- struct rtentry *rt;
- struct rt_addrinfo *info;
+discrtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info)
{
if (rt)
rt->rt_rmx.rmx_mtu = DSMTU;
@@ -162,11 +156,7 @@
*/
/* ARGSUSED */
static int
-discioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+discioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct ifaddr *ifa;
struct ifreq *ifr = (struct ifreq *)data;
Index: dummynet/ip_dummynet.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/dummynet/ip_dummynet.c,v
retrieving revision 1.13
diff -u -r1.13 ip_dummynet.c
--- dummynet/ip_dummynet.c 3 Jun 2005 18:20:36 -0000 1.13
+++ dummynet/ip_dummynet.c 22 Nov 2005 17:01:17 -0000
@@ -1324,7 +1324,7 @@
* remove references from all ipfw rules to all pipes.
*/
static void
-dummynet_flush()
+dummynet_flush(void)
{
struct dn_pipe *curr_p, *p ;
struct dn_flow_set *fs, *curr_fs;
@@ -1648,7 +1648,7 @@
* drain all queues. Called in case of severe mbuf shortage.
*/
void
-dummynet_drain()
+dummynet_drain(void)
{
struct dn_flow_set *fs;
struct dn_pipe *p;
Index: faith/if_faith.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/faith/if_faith.c,v
retrieving revision 1.12
diff -u -r1.12 if_faith.c
--- faith/if_faith.c 26 Jan 2005 00:37:39 -0000 1.12
+++ faith/if_faith.c 22 Nov 2005 16:25:27 -0000
@@ -114,10 +114,7 @@
#define FAITHMTU 1500
static int
-faithmodevent(mod, type, data)
- module_t mod;
- int type;
- void *data;
+faithmodevent(module_t mod, int type, void *data)
{
switch (type) {
@@ -156,9 +153,7 @@
MODULE_VERSION(if_faith, 1);
int
-faith_clone_create(ifc, unit)
- struct if_clone *ifc;
- int unit;
+faith_clone_create(struct if_clone *ifc, int unit)
{
struct faith_softc *sc;
@@ -184,8 +179,7 @@
}
void
-faith_clone_destroy(ifp)
- struct ifnet *ifp;
+faith_clone_destroy(struct ifnet *ifp)
{
struct faith_softc *sc = (struct faith_softc *) ifp;
@@ -197,11 +191,8 @@
}
int
-faithoutput(ifp, m, dst, rt)
- struct ifnet *ifp;
- struct mbuf *m;
- struct sockaddr *dst;
- struct rtentry *rt;
+faithoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
+ struct rtentry *rt)
{
int isr;
@@ -260,10 +251,7 @@
/* ARGSUSED */
static void
-faithrtrequest(cmd, rt, info)
- int cmd;
- struct rtentry *rt;
- struct rt_addrinfo *info;
+faithrtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info)
{
if (rt) {
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */
@@ -282,11 +270,7 @@
*/
/* ARGSUSED */
static int
-faithioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+faithioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct ifaddr *ifa;
struct ifreq *ifr = (struct ifreq *)data;
@@ -346,8 +330,7 @@
* XXX could be layer violation to call sys/net from sys/netinet6
*/
static int
-faithprefix(in6)
- struct in6_addr *in6;
+faithprefix(struct in6_addr *in6)
{
struct rtentry *rt;
struct sockaddr_in6 sin6;
Index: gif/if_gif.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/gif/if_gif.c,v
retrieving revision 1.13
diff -u -r1.13 if_gif.c
--- gif/if_gif.c 3 Jun 2005 18:20:36 -0000 1.13
+++ gif/if_gif.c 22 Nov 2005 16:38:57 -0000
@@ -127,9 +127,7 @@
¶llel_tunnels, 0, "Allow parallel tunnels?");
int
-gif_clone_create(ifc, unit)
- struct if_clone *ifc;
- int unit;
+gif_clone_create(struct if_clone *ifc, int unit)
{
struct gif_softc *sc;
@@ -146,8 +144,7 @@
}
void
-gifattach0(sc)
- struct gif_softc *sc;
+gifattach0(struct gif_softc *sc)
{
sc->encap_cookie4 = sc->encap_cookie6 = NULL;
@@ -168,8 +165,7 @@
}
void
-gif_clone_destroy(ifp)
- struct ifnet *ifp;
+gif_clone_destroy(struct ifnet *ifp)
{
int err;
struct gif_softc *sc = ifp->if_softc;
@@ -196,10 +192,7 @@
}
static int
-gifmodevent(mod, type, data)
- module_t mod;
- int type;
- void *data;
+gifmodevent(module_t mod, int type, void *data)
{
switch (type) {
@@ -235,11 +228,7 @@
DECLARE_MODULE(if_gif, gif_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
int
-gif_encapcheck(m, off, proto, arg)
- const struct mbuf *m;
- int off;
- int proto;
- void *arg;
+gif_encapcheck(const struct mbuf *m, int off, int proto, void *arg)
{
struct ip ip;
struct gif_softc *sc;
@@ -296,12 +285,13 @@
}
}
+/*
+ * Parameters:
+ * rt: added in net2
+ */
int
-gif_output(ifp, m, dst, rt)
- struct ifnet *ifp;
- struct mbuf *m;
- struct sockaddr *dst;
- struct rtentry *rt; /* added in net2 */
+gif_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
+ struct rtentry *rt)
{
struct gif_softc *sc = (struct gif_softc*)ifp;
int error = 0;
@@ -373,10 +363,7 @@
}
void
-gif_input(m, af, ifp)
- struct mbuf *m;
- int af;
- struct ifnet *ifp;
+gif_input(struct mbuf *m, int af, struct ifnet *ifp)
{
int isr;
@@ -434,11 +421,7 @@
/* XXX how should we handle IPv6 scope on SIOC[GS]IFPHYADDR? */
int
-gif_ioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+gif_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct gif_softc *sc = (struct gif_softc*)ifp;
struct ifreq *ifr = (struct ifreq*)data;
@@ -672,10 +655,7 @@
}
int
-gif_set_tunnel(ifp, src, dst)
- struct ifnet *ifp;
- struct sockaddr *src;
- struct sockaddr *dst;
+gif_set_tunnel(struct ifnet *ifp, struct sockaddr *src, struct sockaddr *dst)
{
struct gif_softc *sc = (struct gif_softc *)ifp;
struct gif_softc *sc2;
@@ -779,8 +759,7 @@
}
void
-gif_delete_tunnel(ifp)
- struct ifnet *ifp;
+gif_delete_tunnel(struct ifnet *ifp)
{
struct gif_softc *sc = (struct gif_softc *)ifp;
Index: gre/if_gre.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/gre/if_gre.c,v
retrieving revision 1.13
diff -u -r1.13 if_gre.c
--- gre/if_gre.c 3 Jun 2005 18:20:37 -0000 1.13
+++ gre/if_gre.c 22 Nov 2005 16:39:53 -0000
@@ -158,9 +158,7 @@
}
static int
-gre_clone_create(ifc, unit)
- struct if_clone *ifc;
- int unit;
+gre_clone_create(struct if_clone *ifc, int unit)
{
struct gre_softc *sc;
@@ -189,8 +187,7 @@
}
static void
-gre_clone_destroy(ifp)
- struct ifnet *ifp;
+gre_clone_destroy(struct ifnet *ifp)
{
struct gre_softc *sc = ifp->if_softc;
Index: ip_mroute/ip_mroute.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/ip_mroute/ip_mroute.c,v
retrieving revision 1.18
diff -u -r1.18 ip_mroute.c
--- ip_mroute/ip_mroute.c 15 Aug 2005 16:46:20 -0000 1.18
+++ ip_mroute/ip_mroute.c 22 Nov 2005 17:02:28 -0000
@@ -2678,7 +2678,7 @@
* looking at.
*/
static void
-bw_meter_process()
+bw_meter_process(void)
{
static uint32_t last_tv_sec; /* last time we processed this */
Index: ipfw/ip_fw.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/ipfw/ip_fw.c,v
retrieving revision 1.14
diff -u -r1.14 ip_fw.c
--- ipfw/ip_fw.c 17 Jun 2005 19:12:19 -0000 1.14
+++ ipfw/ip_fw.c 22 Nov 2005 17:01:59 -0000
@@ -1618,7 +1618,7 @@
* Must be called at splimp().
*/
static void
-flush_rule_ptrs()
+flush_rule_ptrs(void)
{
struct ip_fw *fcp ;
Index: pf/pf.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/pf/pf.c,v
retrieving revision 1.6
diff -u -r1.6 pf.c
--- pf/pf.c 28 Oct 2005 16:01:04 -0000 1.6
+++ pf/pf.c 22 Nov 2005 17:12:38 -0000
@@ -1071,7 +1071,7 @@
}
void
-pf_update_anchor_rules()
+pf_update_anchor_rules(void)
{
struct pf_rule *rule;
int i;
Index: ppp/if_ppp.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/ppp/if_ppp.c,v
retrieving revision 1.25
diff -u -r1.25 if_ppp.c
--- ppp/if_ppp.c 15 Jun 2005 12:27:19 -0000 1.25
+++ ppp/if_ppp.c 22 Nov 2005 18:06:28 -0000
@@ -230,8 +230,7 @@
* Called from boot code to establish ppp interfaces.
*/
static void
-pppattach(dummy)
- void *dummy;
+pppattach(void *dummy)
{
struct ppp_softc *sc;
int i = 0;
@@ -308,8 +307,7 @@
* Deallocate a ppp unit. Must be called at splsoftnet or higher.
*/
void
-pppdealloc(sc)
- struct ppp_softc *sc;
+pppdealloc(struct ppp_softc *sc)
{
struct mbuf *m;
@@ -579,11 +577,7 @@
* Process an ioctl request to the ppp network interface.
*/
static int
-pppsioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+pppsioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct thread *td = curthread; /* XXX */
struct ppp_softc *sc = &ppp_softc[ifp->if_dunit];
@@ -712,11 +706,8 @@
* Called at splnet from pppwrite().
*/
int
-pppoutput(ifp, m0, dst, rtp)
- struct ifnet *ifp;
- struct mbuf *m0;
- struct sockaddr *dst;
- struct rtentry *rtp;
+pppoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
+ struct rtentry *rtp)
{
struct ppp_softc *sc = &ppp_softc[ifp->if_dunit];
int protocol, address, control;
@@ -907,8 +898,7 @@
* Should be called at spl[soft]net.
*/
static void
-ppp_requeue(sc)
- struct ppp_softc *sc;
+ppp_requeue(struct ppp_softc *sc)
{
struct mbuf *m, **mpp;
struct ifqueue *ifq;
@@ -968,8 +958,7 @@
* remember to call sc->sc_start later at splsoftnet.
*/
void
-ppp_restart(sc)
- struct ppp_softc *sc;
+ppp_restart(struct ppp_softc *sc)
{
crit_enter();
sc->sc_flags &= ~SC_TBUSY;
@@ -985,8 +974,7 @@
* protocol field compression to the packet.
*/
struct mbuf *
-ppp_dequeue(sc)
- struct ppp_softc *sc;
+ppp_dequeue(struct ppp_softc *sc)
{
struct mbuf *m, *mp;
u_char *cp;
@@ -1115,10 +1103,7 @@
* 0 if it is about to be transmitted.
*/
static void
-ppp_ccp(sc, m, rcvd)
- struct ppp_softc *sc;
- struct mbuf *m;
- int rcvd;
+ppp_ccp(struct ppp_softc *sc, struct mbuf *m, int rcvd)
{
u_char *dp, *ep;
struct mbuf *mp;
@@ -1212,8 +1197,7 @@
* CCP is down; free (de)compressor state if necessary.
*/
static void
-ppp_ccp_closed(sc)
- struct ppp_softc *sc;
+ppp_ccp_closed(struct ppp_softc *sc)
{
if (sc->sc_xc_state) {
(*sc->sc_xcomp->comp_free)(sc->sc_xc_state);
@@ -1233,10 +1217,7 @@
* were omitted.
*/
void
-ppppktin(sc, m, lost)
- struct ppp_softc *sc;
- struct mbuf *m;
- int lost;
+ppppktin(struct ppp_softc *sc, struct mbuf *m, int lost)
{
crit_enter();
@@ -1256,9 +1237,7 @@
TYPE_UNCOMPRESSED_TCP)
static void
-ppp_inproc(sc, m)
- struct ppp_softc *sc;
- struct mbuf *m;
+ppp_inproc(struct ppp_softc *sc, struct mbuf *m)
{
struct ifnet *ifp = &sc->sc_if;
int isr;
@@ -1556,8 +1535,7 @@
#define MAX_DUMP_BYTES 128
static void
-pppdumpm(m0)
- struct mbuf *m0;
+pppdumpm(struct mbuf *m0)
{
char buf[3*MAX_DUMP_BYTES+4];
char *bp = buf;
Index: ppp_layer/ppp_deflate.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/ppp_layer/ppp_deflate.c,v
retrieving revision 1.6
diff -u -r1.6 ppp_deflate.c
--- ppp_layer/ppp_deflate.c 2 Jun 2004 14:42:59 -0000 1.6
+++ ppp_layer/ppp_deflate.c 22 Nov 2005 17:12:09 -0000
@@ -120,9 +120,7 @@
* Space allocation and freeing routines for use by zlib routines.
*/
void *
-z_alloc(notused, items, size)
- void *notused;
- u_int items, size;
+z_alloc(void *notused, u_int items, u_int size)
{
void *ptr;
@@ -131,9 +129,7 @@
}
void
-z_free(notused, ptr)
- void *notused;
- void *ptr;
+z_free(void *notused, void *ptr)
{
free(ptr, M_DEVBUF);
}
@@ -142,9 +138,7 @@
* Allocate space for a compressor.
*/
static void *
-z_comp_alloc(options, opt_len)
- u_char *options;
- int opt_len;
+z_comp_alloc(u_char *options, int opt_len)
{
struct deflate_state *state;
int w_size;
@@ -177,8 +171,7 @@
}
static void
-z_comp_free(arg)
- void *arg;
+z_comp_free(void *arg)
{
struct deflate_state *state = (struct deflate_state *) arg;
@@ -187,10 +180,8 @@
}
static int
-z_comp_init(arg, options, opt_len, unit, hdrlen, debug)
- void *arg;
- u_char *options;
- int opt_len, unit, hdrlen, debug;
+z_comp_init(void *arg, u_char *options, int opt_len, int unit, int hdrlen,
+ int debug)
{
struct deflate_state *state = (struct deflate_state *) arg;
@@ -213,8 +204,7 @@
}
static void
-z_comp_reset(arg)
- void *arg;
+z_comp_reset(void *arg)
{
struct deflate_state *state = (struct deflate_state *) arg;
@@ -222,12 +212,14 @@
deflateReset(&state->strm);
}
+/*
+ * Parameters:
+ * mret: compressed packet (out)
+ * mp: uncompressed packet (in)
+ */
int
-z_compress(arg, mret, mp, orig_len, maxolen)
- void *arg;
- struct mbuf **mret; /* compressed packet (out) */
- struct mbuf *mp; /* uncompressed packet (in) */
- int orig_len, maxolen;
+z_compress(void *arg, struct mbuf **mret, struct mbuf *mp, int orig_len,
+ int maxolen)
{
struct deflate_state *state = (struct deflate_state *) arg;
u_char *rptr, *wptr;
@@ -348,9 +340,7 @@
}
static void
-z_comp_stats(arg, stats)
- void *arg;
- struct compstat *stats;
+z_comp_stats(void *arg, struct compstat *stats)
{
struct deflate_state *state = (struct deflate_state *) arg;
u_int out;
@@ -370,9 +360,7 @@
* Allocate space for a decompressor.
*/
static void *
-z_decomp_alloc(options, opt_len)
- u_char *options;
- int opt_len;
+z_decomp_alloc(u_char *options, int opt_len)
{
struct deflate_state *state;
int w_size;
@@ -404,8 +392,7 @@
}
static void
-z_decomp_free(arg)
- void *arg;
+z_decomp_free(void *arg)
{
struct deflate_state *state = (struct deflate_state *) arg;
@@ -414,10 +401,8 @@
}
static int
-z_decomp_init(arg, options, opt_len, unit, hdrlen, mru, debug)
- void *arg;
- u_char *options;
- int opt_len, unit, hdrlen, mru, debug;
+z_decomp_init(void *arg, u_char *options, int opt_len, int unit, int hdrlen,
+ int mru, int debug)
{
struct deflate_state *state = (struct deflate_state *) arg;
@@ -441,8 +426,7 @@
}
static void
-z_decomp_reset(arg)
- void *arg;
+z_decomp_reset(void *arg)
{
struct deflate_state *state = (struct deflate_state *) arg;
@@ -467,9 +451,7 @@
* compression, even though they are detected by inspecting the input.
*/
int
-z_decompress(arg, mi, mop)
- void *arg;
- struct mbuf *mi, **mop;
+z_decompress(void *arg, struct mbuf *mi, struct mbuf **mop)
{
struct deflate_state *state = (struct deflate_state *) arg;
struct mbuf *mo, *mo_head;
@@ -615,9 +597,7 @@
* Incompressible data has arrived - add it to the history.
*/
static void
-z_incomp(arg, mi)
- void *arg;
- struct mbuf *mi;
+z_incomp(void *arg, struct mbuf *mi)
{
struct deflate_state *state = (struct deflate_state *) arg;
u_char *rptr;
Index: ppp_layer/ppp_tty.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/ppp_layer/ppp_tty.c,v
retrieving revision 1.13
diff -u -r1.13 ppp_tty.c
--- ppp_layer/ppp_tty.c 15 Jun 2005 12:27:20 -0000 1.13
+++ ppp_layer/ppp_tty.c 22 Nov 2005 17:05:23 -0000
@@ -162,8 +162,7 @@
};
void
-pppasyncattach(dummy)
- void *dummy;
+pppasyncattach(void *dummy)
{
/* register line discipline */
linesw[PPPDISC] = pppdisc;
@@ -245,9 +244,7 @@
* Mimics part of ttyclose().
*/
static int
-pppclose(tp, flag)
- struct tty *tp;
- int flag;
+pppclose(struct tty *tp, int flag)
{
struct ppp_softc *sc;
@@ -272,8 +269,7 @@
* Relinquish the interface unit to another device.
*/
static void
-pppasyncrelinq(sc)
- struct ppp_softc *sc;
+pppasyncrelinq(struct ppp_softc *sc)
{
crit_enter();
@@ -297,8 +293,7 @@
* This gets called from the upper layer to notify a mtu change
*/
static void
-pppasyncsetmtu(sc)
-struct ppp_softc *sc;
+pppasyncsetmtu(struct ppp_softc *sc)
{
struct tty *tp = (struct tty *) sc->sc_devp;
@@ -315,10 +310,7 @@
* reads on the tty file descriptor (ie: pppd).
*/
static int
-pppread(tp, uio, flag)
- struct tty *tp;
- struct uio *uio;
- int flag;
+pppread(struct tty *tp, struct uio *uio, int flag)
{
struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
struct mbuf *m, *m0;
@@ -373,10 +365,7 @@
* writes on the tty file descriptor (ie: pppd).
*/
static int
-pppwrite(tp, uio, flag)
- struct tty *tp;
- struct uio *uio;
- int flag;
+pppwrite(struct tty *tp, struct uio *uio, int flag)
{
struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
struct mbuf *m, *m0, **mp;
@@ -540,8 +529,7 @@
* when there is data ready to be sent.
*/
static void
-pppasyncstart(sc)
- struct ppp_softc *sc;
+pppasyncstart(struct ppp_softc *sc)
{
struct tty *tp = (struct tty *) sc->sc_devp;
struct mbuf *m;
@@ -724,8 +712,7 @@
* the inq, at splsoftnet. The pppd daemon is to be woken up to do a read().
*/
static void
-pppasyncctlp(sc)
- struct ppp_softc *sc;
+pppasyncctlp(struct ppp_softc *sc)
{
struct tty *tp;
@@ -744,8 +731,7 @@
* Called at spltty or higher.
*/
int
-pppstart(tp)
- struct tty *tp;
+pppstart(struct tty *tp)
{
struct ppp_softc *sc = (struct ppp_softc *) tp->t_sc;
@@ -782,8 +768,7 @@
* Timeout routine - try to start some more output.
*/
static void
-ppp_timeout(x)
- void *x;
+ppp_timeout(void *x)
{
struct ppp_softc *sc = (struct ppp_softc *) x;
struct tty *tp = (struct tty *) sc->sc_devp;
@@ -798,8 +783,7 @@
* Allocate enough mbuf to handle current MRU.
*/
static void
-pppgetm(sc)
- struct ppp_softc *sc;
+pppgetm(struct ppp_softc *sc)
{
struct mbuf *m, **mp;
int len;
@@ -832,9 +816,7 @@
* This is safe to be called while the upper half's netisr is preempted.
*/
static int
-pppinput(c, tp)
- int c;
- struct tty *tp;
+pppinput(int c, struct tty *tp)
{
struct ppp_softc *sc;
struct mbuf *m;
@@ -1085,9 +1067,7 @@
#define MAX_DUMP_BYTES 128
static void
-ppplogchar(sc, c)
- struct ppp_softc *sc;
- int c;
+ppplogchar(struct ppp_softc *sc, int c)
{
if (c >= 0)
sc->sc_rawin[sc->sc_rawin_count++] = c;
Index: ppp_layer/slcompress.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/ppp_layer/slcompress.c,v
retrieving revision 1.3
diff -u -r1.3 slcompress.c
--- ppp_layer/slcompress.c 26 Jul 2003 20:19:34 -0000 1.3
+++ ppp_layer/slcompress.c 22 Nov 2005 17:59:18 -0000
@@ -68,9 +68,7 @@
#endif
void
-sl_compress_init(comp, max_state)
- struct slcompress *comp;
- int max_state;
+sl_compress_init(struct slcompress *comp, int max_state)
{
u_int i;
struct cstate *tstate = comp->tstate;
@@ -160,11 +158,8 @@
* if m is an M_PKTHDR mbuf.
*/
u_int
-sl_compress_tcp(m, ip, comp, compress_cid)
- struct mbuf *m;
- struct ip *ip;
- struct slcompress *comp;
- int compress_cid;
+sl_compress_tcp(struct mbuf *m, struct ip *ip, struct slcompress *comp,
+ int compress_cid)
{
struct cstate *cs = comp->last_cs->cs_next;
u_int hlen = ip->ip_hl;
@@ -420,11 +415,7 @@
int
-sl_uncompress_tcp(bufp, len, type, comp)
- u_char **bufp;
- int len;
- u_int type;
- struct slcompress *comp;
+sl_uncompress_tcp(u_char **bufp, int len, u_int type, struct slcompress *comp)
{
u_char *hdr, *cp;
int hlen, vjlen;
@@ -468,13 +459,8 @@
* in *hdrp and its length in *hlenp.
*/
int
-sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp)
- u_char *buf;
- int buflen, total_len;
- u_int type;
- struct slcompress *comp;
- u_char **hdrp;
- u_int *hlenp;
+sl_uncompress_tcp_core(u_char *buf, int buflen, int total_len, u_int type,
+ struct slcompress *comp, u_char **hdrp, u_int *hlenp)
{
u_char *cp;
u_int hlen, changes;
Index: sl/if_sl.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/sl/if_sl.c,v
retrieving revision 1.19
diff -u -r1.19 if_sl.c
--- sl/if_sl.c 16 Jul 2005 17:08:13 -0000 1.19
+++ sl/if_sl.c 22 Nov 2005 16:43:09 -0000
@@ -202,8 +202,7 @@
* Called from boot code to establish sl interfaces.
*/
static void
-slattach(dummy)
- void *dummy;
+slattach(void *dummy)
{
struct sl_softc *sc;
int i = 0;
@@ -235,8 +234,7 @@
}
static int
-slinit(sc)
- struct sl_softc *sc;
+slinit(struct sl_softc *sc)
{
if (sc->sc_ep == NULL)
sc->sc_ep = malloc(SLBUFSIZE, M_DEVBUF, M_WAITOK);
@@ -305,9 +303,7 @@
* Detach the tty from the sl unit.
*/
static int
-slclose(tp,flag)
- struct tty *tp;
- int flag;
+slclose(struct tty *tp, int flag)
{
struct sl_softc *sc;
@@ -447,11 +443,8 @@
* ordering gets trashed. It can be done for all packets in slstart.
*/
static int
-sloutput(ifp, m, dst, rtp)
- struct ifnet *ifp;
- struct mbuf *m;
- struct sockaddr *dst;
- struct rtentry *rtp;
+sloutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
+ struct rtentry *rtp)
{
struct sl_softc *sc = &sl_softc[ifp->if_dunit];
struct ip *ip;
@@ -517,8 +510,7 @@
* the interface before starting output.
*/
static int
-slstart(tp)
- struct tty *tp;
+slstart(struct tty *tp)
{
struct sl_softc *sc = (struct sl_softc *)tp->t_sc;
struct mbuf *m;
@@ -703,9 +695,7 @@
* Copy data buffer to mbuf chain; add ifnet pointer.
*/
static struct mbuf *
-sl_btom(sc, len)
- struct sl_softc *sc;
- int len;
+sl_btom(struct sl_softc *sc, int len)
{
struct mbuf *m;
@@ -745,9 +735,7 @@
* tty interface receiver interrupt.
*/
static int
-slinput(c, tp)
- int c;
- struct tty *tp;
+slinput(int c, struct tty *tp)
{
struct sl_softc *sc;
struct mbuf *m;
@@ -910,11 +898,7 @@
* Process an ioctl request.
*/
static int
-slioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+slioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct ifaddr *ifa = (struct ifaddr *)data;
struct ifreq *ifr = (struct ifreq *)data;
@@ -982,8 +966,7 @@
}
static void
-sl_keepalive(chan)
- void *chan;
+sl_keepalive(void *chan)
{
struct sl_softc *sc = chan;
@@ -1000,8 +983,7 @@
}
static void
-sl_outfill(chan)
- void *chan;
+sl_outfill(void *chan)
{
struct sl_softc *sc = chan;
struct tty *tp = sc->sc_ttyp;
Index: stf/if_stf.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/stf/if_stf.c,v
retrieving revision 1.14
diff -u -r1.14 if_stf.c
--- stf/if_stf.c 26 Jan 2005 00:37:39 -0000 1.14
+++ stf/if_stf.c 22 Nov 2005 16:47:06 -0000
@@ -155,10 +155,7 @@
static int stf_ioctl (struct ifnet *, u_long, caddr_t, struct ucred *);
static int
-stfmodevent(mod, type, data)
- module_t mod;
- int type;
- void *data;
+stfmodevent(module_t mod, int type, void *data)
{
struct stf_softc *sc;
int err;
@@ -216,11 +213,7 @@
DECLARE_MODULE(if_stf, stf_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
static int
-stf_encapcheck(m, off, proto, arg)
- const struct mbuf *m;
- int off;
- int proto;
- void *arg;
+stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg)
{
struct ip ip;
struct in6_ifaddr *ia6;
@@ -278,8 +271,7 @@
}
static struct in6_ifaddr *
-stf_getsrcifa6(ifp)
- struct ifnet *ifp;
+stf_getsrcifa6(struct ifnet *ifp)
{
struct ifaddr *ia;
struct in_ifaddr *ia4;
@@ -309,11 +301,8 @@
}
static int
-stf_output(ifp, m, dst, rt)
- struct ifnet *ifp;
- struct mbuf *m;
- struct sockaddr *dst;
- struct rtentry *rt;
+stf_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
+ struct rtentry *rt)
{
struct stf_softc *sc;
struct sockaddr_in6 *dst6;
@@ -413,11 +402,12 @@
return ip_output(m, NULL, &sc->sc_ro, 0, NULL, NULL);
}
+/*
+ * Parameters:
+ * inifp: incoming interface
+ */
static int
-stf_checkaddr4(sc, in, inifp)
- struct stf_softc *sc;
- struct in_addr *in;
- struct ifnet *inifp; /* incoming interface */
+stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp)
{
struct in_ifaddr *ia4;
@@ -473,11 +463,12 @@
return 0;
}
+/*
+ * Parameters:
+ * inifp: incoming interface
+ */
static int
-stf_checkaddr6(sc, in6, inifp)
- struct stf_softc *sc;
- struct in6_addr *in6;
- struct ifnet *inifp; /* incoming interface */
+stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp)
{
/*
* check 6to4 addresses
@@ -586,10 +577,7 @@
/* ARGSUSED */
static void
-stf_rtrequest(cmd, rt, info)
- int cmd;
- struct rtentry *rt;
- struct rt_addrinfo *info;
+stf_rtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info)
{
if (rt)
@@ -597,11 +585,7 @@
}
static int
-stf_ioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct ifaddr *ifa;
struct ifreq *ifr;
Index: tap/if_tap.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/tap/if_tap.c,v
retrieving revision 1.20
diff -u -r1.20 if_tap.c
--- tap/if_tap.c 14 Jun 2005 18:37:26 -0000 1.20
+++ tap/if_tap.c 22 Nov 2005 16:53:09 -0000
@@ -132,10 +132,7 @@
* module event handler
*/
static int
-tapmodevent(mod, type, data)
- module_t mod;
- int type;
- void *data;
+tapmodevent(module_t mod, int type, void *data)
{
static int attached = 0;
struct ifnet *ifp = NULL;
@@ -201,8 +198,7 @@
* to create interface
*/
static void
-tapcreate(dev)
- dev_t dev;
+tapcreate(dev_t dev)
{
struct ifnet *ifp = NULL;
struct tap_softc *tp = NULL;
@@ -371,8 +367,7 @@
* network interface initialization function
*/
static void
-tapifinit(xtp)
- void *xtp;
+tapifinit(void *xtp)
{
struct tap_softc *tp = (struct tap_softc *)xtp;
struct ifnet *ifp = &tp->tap_if;
@@ -393,11 +388,7 @@
* Process an ioctl request on network interface
*/
int
-tapifioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+tapifioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct tap_softc *tp = (struct tap_softc *)(ifp->if_softc);
struct ifstat *ifs = NULL;
@@ -450,8 +441,7 @@
* queue packets from higher level ready to put out
*/
static void
-tapifstart(ifp)
- struct ifnet *ifp;
+tapifstart(struct ifnet *ifp)
{
struct tap_softc *tp = ifp->if_softc;
@@ -613,10 +603,7 @@
* least as much of a packet as can be read
*/
static int
-tapread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+tapread(dev_t dev, struct uio *uio, int flag)
{
struct tap_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tap_if;
@@ -679,10 +666,7 @@
* the cdevsw write interface - an atomic write is a packet - or else!
*/
static int
-tapwrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+tapwrite(dev_t dev, struct uio *uio, int flag)
{
struct tap_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tap_if;
Index: tun/if_tun.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/net/tun/if_tun.c,v
retrieving revision 1.23
--- tun/if_tun.c 10 Jul 2005 15:17:00 -0000 1.23
+++ tun/if_tun.c 22 Nov 2005 18:00:11 -0000
@@ -107,8 +107,7 @@
}
static void
-tuncreate(dev)
- dev_t dev;
+tuncreate(dev_t dev)
{
struct tun_softc *sc;
struct ifnet *ifp;
@@ -213,8 +212,7 @@
}
static int
-tuninit(ifp)
- struct ifnet *ifp;
+tuninit(struct ifnet *ifp)
{
struct tun_softc *tp = ifp->if_softc;
struct ifaddr *ifa;
@@ -253,11 +251,7 @@
* Process an ioctl request.
*/
int
-tunifioctl(ifp, cmd, data, cr)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
- struct ucred *cr;
+tunifioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
{
struct ifreq *ifr = (struct ifreq *)data;
struct tun_softc *tp = ifp->if_softc;
@@ -301,11 +295,8 @@
* tunoutput - queue packets from higher level ready to put out.
*/
int
-tunoutput(ifp, m0, dst, rt)
- struct ifnet *ifp;
- struct mbuf *m0;
- struct sockaddr *dst;
- struct rtentry *rt;
+tunoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
+ struct rtentry *rt)
{
struct tun_softc *tp = ifp->if_softc;
int error;
@@ -513,10 +504,7 @@
* least as much of a packet as can be read.
*/
static int
-tunread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+tunread(dev_t dev, struct uio *uio, int flag)
{
struct tun_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tun_if;
@@ -565,10 +553,7 @@
* the cdevsw write interface - an atomic write is a packet - or else!
*/
static int
-tunwrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+tunwrite(dev_t dev, struct uio *uio, int flag)
{
struct tun_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tun_if;
More information about the Submit
mailing list