Some other cleanup.
*/
message m;
int result;
- sigset_t sigset;
/* SEF local startup. */
env_setargs(argc, argv);
{
/* Signal handler. */
sigset_t sigset;
- int sig;
/* Try to obtain signal set from PM. */
if (getsigset(&sigset) != 0) return;
* created or updated) matching that subscription. Return
* a message and copy the key and value for every one.
*/
- struct data_store *dsp;
int r, s, d, type = m_ptr->DS_FLAGS & DS_TYPE_MASK;
if(!type) return EINVAL;
for(s = 0; s < NR_DS_SUBS; s++) {
Copyright 1995 Philip Homburg
*/
-#define BUF_IMPLEMENTATION 1 /* Avoid some macros */
-
#include "inet.h"
#include <stdlib.h>
#include "generic/assert.h"
#include "generic/buf.h"
-#include "generic/type.h"
THIS_FILE
#include "generic/assert.h"
#include "generic/buf.h"
#include "generic/clock.h"
-#include "generic/type.h"
THIS_FILE
PUBLIC void clck_init()
{
- int r;
-
clck_call_expire= 0;
curr_time= 0;
prev_time= 0;
{
if (!curr_time)
{
- int s;
- if ((s=getuptime(&curr_time)) != OK)
+ if (getuptime(&curr_time) != OK)
ip_panic(("can't read clock"));
assert(curr_time >= prev_time);
}
#include "event.h"
#include "eth.h"
#include "io.h"
-#include "sr.h"
THIS_FILE
#include "buf.h"
#include "eth.h"
#include "eth_int.h"
-#include "io.h"
#include "sr.h"
THIS_FILE
unsigned long flags;
unsigned int en_di_flags;
- eth_port_t *eth_port;
acc_t *pack;
- eth_port= eth_fd->ef_port;
flags= eth_fd->ef_ethopt.nweo_flags;
en_di_flags= (flags >>16) | (flags & 0xffff);
if (r == -1)
{
bf_afree(reply_ip_hdr);
- reply_ip_hdr= NULL;
return;
}
acc_t *ip_pack, *icmp_pack, *tmp_pack;
int ip_hdr_len, icmp_hdr_len, ih_type;
size_t size, pack_len;
- ipaddr_t dest, netmask;
+ ipaddr_t dest;
nettype_t nettype;
pack= bf_packIffLess(pack, IP_MIN_HDR_SIZE);
}
dest= ip_hdr->ih_src;
nettype= ip_nettype(dest);
- netmask= ip_netmask(nettype);
if (nettype != IPNT_CLASS_A && nettype != IPNT_LOCAL &&
nettype != IPNT_CLASS_B && nettype != IPNT_CLASS_C)
{
{
for (i= 0, ip_ass= ip_ass_table; i<IP_ASS_NR; i++, ip_ass++)
{
- next_pack= ip_ass->ia_frags;
while(ip_ass->ia_frags != NULL)
{
pack= ip_ass->ia_frags;
size_t pack_size;
eth_hdr_t *eth_hdr;
xmit_hdr_t *xmit_hdr;
- ipaddr_t hostpart, tmpaddr;
+ ipaddr_t tmpaddr;
time_t t;
u32_t *p;
ip_panic(( "invalid destination" ));
}
- hostpart= (dest & ~ip_port->ip_subnetmask);
assert(dest != ip_port->ip_ipaddr);
r= arp_ip_eth(ip_port->ip_dl.dl_eth.de_port,
int ip_port_nr;
nwio_ipconf_t *ipconf;
{
- int i, old_ip_flags, do_report;
+ int i, do_report;
ip_port_t *ip_port;
ip_fd_t *ip_fd;
ipaddr_t ipaddr;
ip_port= &ip_port_table[ip_port_nr];
- old_ip_flags= ip_port->ip_flags;
-
if (ipconf->nwic_flags & ~NWIC_FLAGS)
return EBADMODE;
THIS_FILE
-#define NOT_IMPLEMENTED 0
-
PUBLIC tcp_port_t *tcp_port_table;
PUBLIC tcp_fd_t tcp_fd_table[TCP_FD_NR];
PUBLIC tcp_conn_t tcp_conn_table[TCP_CONN_NR];
#define _MINIX_SOURCE 1
#include <fcntl.h>
-#include <time.h>
#include <unistd.h>
#include <sys/svrctl.h>
#include <minix/ds.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
#include <minix3/queryparam.h>
#if EXAMPLE
eth_port_t *eth_port;
acc_t *pack;
{
- eth_port_t *loc_port;
- message mess1, block_msg;
- u8_t *eth_dst_ptr;
- int multicast, r;
- ev_arg_t ev_arg;
-
assert(!no_ethWritePort);
assert(!eth_port->etp_vlan);
PRIVATE int notification_count;
#endif
-PUBLIC void eth_rec(m)
-message *m;
+PUBLIC void eth_rec(message *m)
{
int i, r, m_type, stat;
eth_port_t *loc_port, *vlan_port;
}
}
-PUBLIC void eth_check_drivers(m)
-message *m;
+PUBLIC void eth_check_drivers(message *m)
{
- int i, r, tasknr;
+ int r, tasknr;
tasknr= m->m_source;
#if 0
eth_port_t *eth_port;
eth_stat_t *eth_stat;
{
- int r;
cp_grant_id_t gid;
assert(!eth_port->etp_vlan);
{
int r;
unsigned dl_flags, mask;
- message mess, repl_mess;
+ message mess;
assert(!eth_port->etp_vlan);
PRIVATE void setup_read(eth_port)
eth_port_t *eth_port;
{
- eth_port_t *loc_port;
acc_t *pack, *pack_ptr;
- message mess1, block_msg;
+ message mess1;
iovec_s_t *iovec;
- ev_arg_t ev_arg;
int i, r;
assert(!eth_port->etp_vlan);
eth_port_t *eth_port;
int tasknr;
{
- int i, r;
+ int r;
unsigned flags, dl_flags;
cp_grant_id_t gid;
message mess;
int fd;
size_t count;
{
- int r, err;
- size_t len;
+ int r;
acc_t *pkt;
qp_fd_t *qp_fd;
/* Send one character back to the user. */
acc_t *pkt;
qp_fd_t *qp_fd;
- size_t n, bytes_left;
+ size_t bytes_left;
off_t off;
bytes_left= qv->rd_bytes_left;
{
sr_fd_t *sr_fd;
int result;
- int proc_nr, ref, operation;
+ int proc_nr, ref;
result=EINTR;
proc_nr= m->IO_ENDPT;
ref= (int)m->IO_GRANT;
- operation= 0;
sr_fd= sr_getchannel(m->DEVICE);
assert (sr_fd);
message *m;
{
sr_fd_t *sr_fd;
- mq_t **q_head_ptr, **q_tail_ptr;
- int ip_flag, susp_flag;
- int r, ops;
+ int r;
unsigned m_ops, i_ops;
- ioreq_t request;
- size_t size;
sr_fd= sr_getchannel(m->DEVICE);
assert (sr_fd);
int status;
int is_revive;
{
- int result, proc, ref,operation;
+ int result, proc, ref;
message reply, *mp;
proc= mq->mq_mess.IO_ENDPT;
ref= (int)mq->mq_mess.IO_GRANT;
- operation= mq->mq_mess.m_type;
if (is_revive)
mp= &mq->mq_mess;
void onabrt(int sig)
{
- static int count;
+ static int count = 0;
if (++count == 2) reboot(RBT_HALT);
gotabrt = 1;