retire PUBLIC, PRIVATE and FORWARD

This commit is contained in:
Ben Gras
2012-03-25 20:25:53 +02:00
parent 6a73e85ad1
commit 7336a67dfe
603 changed files with 5776 additions and 5779 deletions

View File

@@ -60,35 +60,35 @@ typedef struct
u16_t vh_vlan;
} vlan_hdr_t;
FORWARD int eth_checkopt ARGS(( eth_fd_t *eth_fd ));
FORWARD void hash_fd ARGS(( eth_fd_t *eth_fd ));
FORWARD void unhash_fd ARGS(( eth_fd_t *eth_fd ));
FORWARD void eth_buffree ARGS(( int priority ));
static int eth_checkopt ARGS(( eth_fd_t *eth_fd ));
static void hash_fd ARGS(( eth_fd_t *eth_fd ));
static void unhash_fd ARGS(( eth_fd_t *eth_fd ));
static void eth_buffree ARGS(( int priority ));
#ifdef BUF_CONSISTENCY_CHECK
FORWARD void eth_bufcheck ARGS(( void ));
static void eth_bufcheck ARGS(( void ));
#endif
FORWARD int eth_sel_read ARGS(( eth_fd_t * ));
FORWARD void packet2user ARGS(( eth_fd_t *fd, acc_t *pack, time_t exp_time ));
FORWARD void reply_thr_get ARGS(( eth_fd_t *eth_fd,
static int eth_sel_read ARGS(( eth_fd_t * ));
static void packet2user ARGS(( eth_fd_t *fd, acc_t *pack, time_t exp_time ));
static void reply_thr_get ARGS(( eth_fd_t *eth_fd,
size_t result, int for_ioctl ));
FORWARD void reply_thr_put ARGS(( eth_fd_t *eth_fd,
static void reply_thr_put ARGS(( eth_fd_t *eth_fd,
size_t result, int for_ioctl ));
FORWARD void do_rec_conf ARGS(( eth_port_t *eth_port ));
FORWARD u32_t compute_rec_conf ARGS(( eth_port_t *eth_port ));
FORWARD acc_t *insert_vlan_hdr ARGS(( eth_port_t *eth_port, acc_t *pack ));
static void do_rec_conf ARGS(( eth_port_t *eth_port ));
static u32_t compute_rec_conf ARGS(( eth_port_t *eth_port ));
static acc_t *insert_vlan_hdr ARGS(( eth_port_t *eth_port, acc_t *pack ));
PUBLIC eth_port_t *eth_port_table;
PUBLIC int no_ethWritePort= 0;
eth_port_t *eth_port_table;
int no_ethWritePort= 0;
PRIVATE eth_fd_t eth_fd_table[ETH_FD_NR];
PRIVATE ether_addr_t broadcast= { { 255, 255, 255, 255, 255, 255 } };
static eth_fd_t eth_fd_table[ETH_FD_NR];
static ether_addr_t broadcast= { { 255, 255, 255, 255, 255, 255 } };
PUBLIC void eth_prep()
void eth_prep()
{
eth_port_table= alloc(eth_conf_nr * sizeof(eth_port_table[0]));
}
PUBLIC void eth_init()
void eth_init()
{
int i, j;
@@ -123,7 +123,7 @@ PUBLIC void eth_init()
osdep_eth_init();
}
PUBLIC int eth_open(port, srfd, get_userdata, put_userdata, put_pkt,
int eth_open(port, srfd, get_userdata, put_userdata, put_pkt,
select_res)
int port, srfd;
get_userdata_t get_userdata;
@@ -165,7 +165,7 @@ select_res_t select_res;
return i;
}
PUBLIC int eth_ioctl(fd, req)
int eth_ioctl(fd, req)
int fd;
ioreq_t req;
{
@@ -416,7 +416,7 @@ printf("eth_ioctl: setting etp_getstat in port %d to %p\n",
return NW_OK;
}
PUBLIC int eth_write(fd, count)
int eth_write(fd, count)
int fd;
size_t count;
{
@@ -479,7 +479,7 @@ size_t count;
return NW_OK;
}
PUBLIC int eth_send(fd, data, data_len)
int eth_send(fd, data, data_len)
int fd;
acc_t *data;
size_t data_len;
@@ -564,7 +564,7 @@ size_t data_len;
return NW_OK;
}
PUBLIC int eth_read (fd, count)
int eth_read (fd, count)
int fd;
size_t count;
{
@@ -602,7 +602,7 @@ size_t count;
return NW_SUSPEND;
}
PUBLIC int eth_cancel(fd, which_operation)
int eth_cancel(fd, which_operation)
int fd;
int which_operation;
{
@@ -654,7 +654,7 @@ int which_operation;
return NW_OK;
}
PUBLIC int eth_select(fd, operations)
int eth_select(fd, operations)
int fd;
unsigned operations;
{
@@ -685,7 +685,7 @@ unsigned operations;
return resops;
}
PUBLIC void eth_close(fd)
void eth_close(fd)
int fd;
{
eth_fd_t *eth_fd;
@@ -711,7 +711,7 @@ int fd;
do_rec_conf(eth_port);
}
PUBLIC void eth_loop_ev(ev, ev_arg)
void eth_loop_ev(ev, ev_arg)
event_t *ev;
ev_arg_t ev_arg;
{
@@ -733,7 +733,7 @@ ev_arg_t ev_arg;
eth_restart_write(eth_port);
}
PRIVATE int eth_checkopt (eth_fd)
static int eth_checkopt (eth_fd)
eth_fd_t *eth_fd;
{
/* bug: we don't check access modes yet */
@@ -769,7 +769,7 @@ eth_fd_t *eth_fd;
return NW_OK;
}
PRIVATE void hash_fd(eth_fd)
static void hash_fd(eth_fd)
eth_fd_t *eth_fd;
{
eth_port_t *eth_port;
@@ -792,7 +792,7 @@ eth_fd_t *eth_fd;
}
}
PRIVATE void unhash_fd(eth_fd)
static void unhash_fd(eth_fd)
eth_fd_t *eth_fd;
{
eth_port_t *eth_port;
@@ -825,7 +825,7 @@ eth_fd_t *eth_fd;
*eth_fd_p= curr->ef_type_next;
}
PUBLIC void eth_restart_write(eth_port)
void eth_restart_write(eth_port)
eth_port_t *eth_port;
{
eth_fd_t *eth_fd;
@@ -845,7 +845,7 @@ eth_port_t *eth_port;
}
}
PUBLIC void eth_arrive (eth_port, pack, pack_size)
void eth_arrive (eth_port, pack, pack_size)
eth_port_t *eth_port;
acc_t *pack;
size_t pack_size;
@@ -1031,7 +1031,7 @@ size_t pack_size;
}
}
PUBLIC void eth_reg_vlan(eth_port, vlan_port)
void eth_reg_vlan(eth_port, vlan_port)
eth_port_t *eth_port;
eth_port_t *vlan_port;
{
@@ -1044,7 +1044,7 @@ eth_port_t *vlan_port;
eth_port->etp_vlan_tab[h]= vlan_port;
}
PUBLIC void eth_restart_ioctl(eth_port)
void eth_restart_ioctl(eth_port)
eth_port_t *eth_port;
{
int i, r;
@@ -1111,7 +1111,7 @@ printf("eth_restart_ioctl: clearing etp_getstat in port %d\n",
}
}
PRIVATE int eth_sel_read (eth_fd)
static int eth_sel_read (eth_fd)
eth_fd_t *eth_fd;
{
acc_t *tmp_acc, *next_acc;
@@ -1136,7 +1136,7 @@ eth_fd_t *eth_fd;
return 0;
}
PRIVATE void packet2user (eth_fd, pack, exp_time)
static void packet2user (eth_fd, pack, exp_time)
eth_fd_t *eth_fd;
acc_t *pack;
time_t exp_time;
@@ -1196,7 +1196,7 @@ time_t exp_time;
reply_thr_put(eth_fd, result, FALSE);
}
PRIVATE void eth_buffree (priority)
static void eth_buffree (priority)
int priority;
{
int i;
@@ -1231,7 +1231,7 @@ int priority;
}
#ifdef BUF_CONSISTENCY_CHECK
PRIVATE void eth_bufcheck()
static void eth_bufcheck()
{
int i;
eth_fd_t *eth_fd;
@@ -1253,7 +1253,7 @@ PRIVATE void eth_bufcheck()
}
#endif
PRIVATE void do_rec_conf(eth_port)
static void do_rec_conf(eth_port)
eth_port_t *eth_port;
{
int i;
@@ -1276,7 +1276,7 @@ eth_port_t *eth_port;
eth_set_rec_conf(eth_port, flags);
}
PRIVATE u32_t compute_rec_conf(eth_port)
static u32_t compute_rec_conf(eth_port)
eth_port_t *eth_port;
{
eth_fd_t *eth_fd;
@@ -1298,7 +1298,7 @@ eth_port_t *eth_port;
return flags;
}
PRIVATE void reply_thr_get (eth_fd, result, for_ioctl)
static void reply_thr_get (eth_fd, result, for_ioctl)
eth_fd_t *eth_fd;
size_t result;
int for_ioctl;
@@ -1309,7 +1309,7 @@ int for_ioctl;
assert (!data);
}
PRIVATE void reply_thr_put (eth_fd, result, for_ioctl)
static void reply_thr_put (eth_fd, result, for_ioctl)
eth_fd_t *eth_fd;
size_t result;
int for_ioctl;
@@ -1321,7 +1321,7 @@ int for_ioctl;
assert(error == NW_OK);
}
PRIVATE acc_t *insert_vlan_hdr(eth_port, pack)
static acc_t *insert_vlan_hdr(eth_port, pack)
eth_port_t *eth_port;
acc_t *pack;
{