summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--netax25/procutils.h39
-rw-r--r--procutils.c39
2 files changed, 40 insertions, 38 deletions
diff --git a/netax25/procutils.h b/netax25/procutils.h
index eabea20..25b31e8 100644
--- a/netax25/procutils.h
+++ b/netax25/procutils.h
@@ -55,13 +55,13 @@ struct proc_ax25 {
int ndigi;
unsigned char st;
unsigned short vs, vr, va;
- unsigned short t1, t1timer, t2, t2timer, t3, t3timer;
- unsigned short idle, idletimer;
- unsigned char n2, n2count;
- unsigned short rtt;
+ unsigned long t1timer, t1, t2timer, t2, t3timer, t3;
+ unsigned long idletimer, idle;
+ unsigned char n2count, n2;
+ unsigned long rtt;
unsigned char window;
unsigned short paclen;
- unsigned long sndq, rcvq;
+ unsigned short sndq, rcvq;
unsigned long inode;
struct proc_ax25 *next;
@@ -73,11 +73,11 @@ struct proc_nr {
char my_circuit[6], ur_circuit[6];
unsigned char st;
unsigned short vs, vr, va;
- unsigned short t1, t1timer, t2, t2timer, t4, t4timer;
- unsigned short idle, idletimer;
- unsigned char n2, n2count;
+ unsigned long t1timer, t1, t2timer, t2, t4timer, t4;
+ unsigned long idletimer, idle;
+ unsigned char n2count, n2;
unsigned char window;
- unsigned long sndq, rcvq;
+ unsigned short sndq, rcvq;
unsigned long inode;
struct proc_nr *next;
@@ -120,33 +120,34 @@ struct proc_rs {
};
struct proc_rs_route {
- unsigned short lci1;
+ unsigned short lci1;
char address1[11], call1[10];
- unsigned int neigh1;
- unsigned short lci2;
+ unsigned int neigh1;
+ unsigned short lci2;
char address2[11], call2[10];
- unsigned int neigh2;
+ unsigned int neigh2;
struct proc_rs_route *next;
};
struct proc_rs_neigh {
- int addr;
+ int addr;
char call[10];
char dev[14];
- int count;
+ unsigned int count;
+ unsigned int use;
char mode[4];
char restart[4];
- unsigned short t0, tf;
+ unsigned short t0, tf;
struct proc_rs_neigh *next;
};
struct proc_rs_nodes {
char address[11];
- unsigned char mask;
- unsigned char n;
- unsigned int neigh1, neigh2, neigh3;
+ unsigned char mask;
+ unsigned char n;
+ unsigned int neigh1, neigh2, neigh3;
struct proc_rs_nodes *next;
};
diff --git a/procutils.c b/procutils.c
index bb65ffe..de128d5 100644
--- a/procutils.c
+++ b/procutils.c
@@ -117,22 +117,22 @@ struct proc_ax25 *read_proc_ax25(void)
p->vr = safe_atoi(token(&cp, space));
p->va = safe_atoi(token(&cp, space));
- p->t1timer = safe_atoi(token(&cp, space));
- p->t1 = safe_atoi(token(&cp, space));
+ p->t1timer = safe_atox(token(&cp, space));
+ p->t1 = safe_atox(token(&cp, space));
- p->t2timer = safe_atoi(token(&cp, space));
- p->t2 = safe_atoi(token(&cp, space));
+ p->t2timer = safe_atox(token(&cp, space));
+ p->t2 = safe_atox(token(&cp, space));
- p->t3timer = safe_atoi(token(&cp, space));
- p->t3 = safe_atoi(token(&cp, space));
+ p->t3timer = safe_atox(token(&cp, space));
+ p->t3 = safe_atox(token(&cp, space));
- p->idletimer = safe_atoi(token(&cp, space));
- p->idle = safe_atoi(token(&cp, space));
+ p->idletimer = safe_atox(token(&cp, space));
+ p->idle = safe_atox(token(&cp, space));
p->n2count = safe_atoi(token(&cp, space));
p->n2 = safe_atoi(token(&cp, space));
- p->rtt = safe_atoi(token(&cp, space));
+ p->rtt = safe_atox(token(&cp, space));
p->window = safe_atoi(token(&cp, space));
@@ -141,7 +141,7 @@ struct proc_ax25 *read_proc_ax25(void)
p->sndq = safe_atoi(token(&cp, space));
p->rcvq = safe_atoi(token(&cp, space));
- p->inode = safe_atoi(token(&cp, space));
+ p->inode = safe_atox(token(&cp, space));
p->next = list;
list = p;
@@ -244,21 +244,21 @@ struct proc_nr *read_proc_nr(void)
p->vr = safe_atoi(token(&cp, space));
p->va = safe_atoi(token(&cp, space));
- p->t1timer = safe_atoi(token(&cp, "/"));
- p->t1 = safe_atoi(token(&cp, "/ \t\r\n"));
- p->t2timer = safe_atoi(token(&cp, "/"));
- p->t2 = safe_atoi(token(&cp, "/ \t\r\n"));
- p->t4timer = safe_atoi(token(&cp, "/"));
- p->t4 = safe_atoi(token(&cp, "/ \t\r\n"));
- p->idletimer = safe_atoi(token(&cp, "/"));
- p->idle = safe_atoi(token(&cp, "/ \t\r\n"));
+ p->t1timer = safe_atox(token(&cp, "/"));
+ p->t1 = safe_atox(token(&cp, "/ \t\r\n"));
+ p->t2timer = safe_atox(token(&cp, "/"));
+ p->t2 = safe_atox(token(&cp, "/ \t\r\n"));
+ p->t4timer = safe_atox(token(&cp, "/"));
+ p->t4 = safe_atox(token(&cp, "/ \t\r\n"));
+ p->idletimer = safe_atox(token(&cp, "/"));
+ p->idle = safe_atox(token(&cp, "/ \t\r\n"));
p->n2count = safe_atoi(token(&cp, "/"));
p->n2 = safe_atoi(token(&cp, "/ \t\r\n"));
p->window = safe_atoi(token(&cp, space));
p->sndq = safe_atoi(token(&cp, space));
p->rcvq = safe_atoi(token(&cp, space));
- p->inode = safe_atoi(token(&cp, space));
+ p->inode = safe_atox(token(&cp, space));
p->next = list;
list = p;
@@ -495,6 +495,7 @@ struct proc_rs_neigh *read_proc_rs_neigh(void)
safe_strncpy(p->call, strtok(NULL, " \t\n\r"), 9);
safe_strncpy(p->dev, strtok(NULL, " \t\n\r"), 13);
p->count = safe_atoi(strtok(NULL, " \t\n\r"));
+ p->use = safe_atoi(strtok(NULL, " \t\n\r"));
safe_strncpy(p->mode, strtok(NULL, " \t\n\r"), 3);
safe_strncpy(p->restart, strtok(NULL, " \t\n\r"), 3);
p->t0 = safe_atoi(strtok(NULL, " \t\n\r"));