aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2004-11-01 20:12:03 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2004-11-01 20:12:03 +0000
commit440df10b41862fbfc61fb2280c92c474f009b774 (patch)
tree8df01b92204d2d8d04d4c9a800791a658431044a /sys/netgraph
parent43d6677ba182fa5dc5300e64dee8456099d2603d (diff)
downloadsrc-440df10b41862fbfc61fb2280c92c474f009b774.tar.gz
src-440df10b41862fbfc61fb2280c92c474f009b774.zip
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)
Notes
Notes: svn path=/head/; revision=137114
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_cisco.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c
index 6b37ddb55c4e..8c3d618d2180 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);