diff options
author | glebius <glebius@FreeBSD.org> | 2004-11-01 20:12:03 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2004-11-01 20:12:03 +0000 |
commit | b376859d7c136063c53e9f3087354216304fcaf0 (patch) | |
tree | 8df01b92204d2d8d04d4c9a800791a658431044a | |
parent | 9ac1091d8c43879fdded74e43f9f4d99de302ced (diff) | |
download | FreeBSD-src-b376859d7c136063c53e9f3087354216304fcaf0.zip FreeBSD-src-b376859d7c136063c53e9f3087354216304fcaf0.tar.gz |
o style changes:
- tabs after defines
- tabs instead of many spaces
- sort local variables by size
o remove spl(9) calls
Approved by: julian (mentor)
-rw-r--r-- | sys/netgraph/ng_cisco.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c index 6b37ddb..8c3d618 100644 --- a/sys/netgraph/ng_cisco.c +++ b/sys/netgraph/ng_cisco.c @@ -64,12 +64,12 @@ #include <netgraph/ng_parse.h> #include <netgraph/ng_cisco.h> -#define CISCO_MULTICAST 0x8f /* Cisco multicast address */ -#define CISCO_UNICAST 0x0f /* Cisco unicast address */ -#define CISCO_KEEPALIVE 0x8035 /* Cisco keepalive protocol */ -#define CISCO_ADDR_REQ 0 /* Cisco address request */ -#define CISCO_ADDR_REPLY 1 /* Cisco address reply */ -#define CISCO_KEEPALIVE_REQ 2 /* Cisco keepalive request */ +#define CISCO_MULTICAST 0x8f /* Cisco multicast address */ +#define CISCO_UNICAST 0x0f /* Cisco unicast address */ +#define CISCO_KEEPALIVE 0x8035 /* Cisco keepalive protocol */ +#define CISCO_ADDR_REQ 0 /* Cisco address request */ +#define CISCO_ADDR_REPLY 1 /* Cisco address reply */ +#define CISCO_KEEPALIVE_REQ 2 /* Cisco keepalive request */ #define KEEPALIVE_SECS 10 @@ -79,7 +79,7 @@ struct cisco_header { u_short protocol; }; -#define CISCO_HEADER_LEN sizeof (struct cisco_header) +#define CISCO_HEADER_LEN sizeof (struct cisco_header) struct cisco_packet { u_long type; @@ -90,7 +90,7 @@ struct cisco_packet { u_short time1; }; -#define CISCO_PACKET_LEN (sizeof(struct cisco_packet)) +#define CISCO_PACKET_LEN (sizeof(struct cisco_packet)) struct protoent { hook_p hook; /* the hook for this proto */ @@ -344,8 +344,8 @@ cisco_rcvdata(hook_p hook, item_p item) const sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); struct protoent *pep; struct cisco_header *h; - int error = 0; struct mbuf *m; + int error = 0; if ((pep = NG_HOOK_PRIVATE(hook)) == NULL) goto out; @@ -443,8 +443,8 @@ cisco_input(sc_p sc, item_p item) const struct cisco_header *h; struct cisco_header hdrbuf; struct protoent *pep; - int error = 0; struct mbuf *m; + int error = 0; /* Get data */ m = NGI_M(item); @@ -580,11 +580,9 @@ static void cisco_keepalive(void *arg) { const sc_p sc = arg; - int s = splimp(); cisco_send(sc, CISCO_KEEPALIVE_REQ, sc->local_seq, sc->remote_seq); sc->seqRetries++; - splx(s); sc->handle = timeout(cisco_keepalive, sc, hz * KEEPALIVE_SECS); } @@ -597,9 +595,9 @@ cisco_send(sc_p sc, int type, long par1, long par2) struct cisco_header *h; struct cisco_packet *ch; struct mbuf *m; + struct timeval time; u_long t; int error = 0; - struct timeval time; getmicrouptime(&time); |