summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pdu.c
diff options
context:
space:
mode:
Diffstat (limited to 'isisd/isis_pdu.c')
-rw-r--r--isisd/isis_pdu.c66
1 files changed, 39 insertions, 27 deletions
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index a2ab0649..0a69dcb6 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -1,23 +1,23 @@
/*
- * IS-IS Rout(e)ing protocol - isis_pdu.c
+ * IS-IS Rout(e)ing protocol - isis_pdu.c
* PDU processing
*
* Copyright (C) 2001,2002 Sampo Saaristo
- * Tampere University of Technology
+ * Tampere University of Technology
* Institute of Communications Engineering
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public Licenseas published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
- * This program is distributed in the hope that it will be useful,but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * This program is distributed in the hope that it will be useful,but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
@@ -142,7 +142,7 @@ ip_match (struct list *left, struct list *right)
if ((left == NULL) || (right == NULL))
return 0;
-
+
for (ALL_LIST_ELEMENTS_RO (left, node1, ip1))
{
for (ALL_LIST_ELEMENTS_RO (right, node2, ip2))
@@ -158,7 +158,7 @@ ip_match (struct list *left, struct list *right)
}
/*
- * Checks whether we should accept a PDU of given level
+ * Checks whether we should accept a PDU of given level
*/
static int
accept_level (int level, int circuit_t)
@@ -269,7 +269,7 @@ tlvs_to_adj_ipv6_addrs (struct tlvs *tlvs, struct isis_adjacency *adj)
#endif /* HAVE_IPV6 */
/*
- * RECEIVE SIDE
+ * RECEIVE SIDE
*/
/*
@@ -320,7 +320,7 @@ process_p2p_hello (struct isis_circuit *circuit)
hdr.local_id = stream_getc (stream); */
/*
- * My interpertation of the ISO, if no adj exists we will create one for
+ * My interpertation of the ISO, if no adj exists we will create one for
* the circuit
*/
@@ -430,6 +430,8 @@ process_p2p_hello (struct isis_circuit *circuit)
isis_adj_state_change (adj, ISIS_ADJ_DOWN, "Wrong System");
}
break;
+ default:
+ break ;
}
}
@@ -495,6 +497,8 @@ process_p2p_hello (struct isis_circuit *circuit)
; /* Accept */
}
break;
+ default:
+ break ;
}
}
@@ -536,6 +540,8 @@ process_p2p_hello (struct isis_circuit *circuit)
; /* Accept */
}
break;
+ default:
+ break ;
}
}
}
@@ -615,6 +621,8 @@ process_p2p_hello (struct isis_circuit *circuit)
; /* Accept */
}
break;
+ default:
+ break ;
}
}
}
@@ -638,6 +646,8 @@ process_p2p_hello (struct isis_circuit *circuit)
case ISIS_ADJ_NONE:
adj->sys_type = ISIS_SYSTYPE_UNKNOWN;
break;
+ default:
+ break ;
}
adj->circuit_t = hdr->circuit_t;
@@ -773,8 +783,8 @@ process_lan_hello (int level, struct isis_circuit *circuit, u_char * ssnpa)
goto out;
}
- /*
- * it's own IIH PDU - discard silently
+ /*
+ * it's own IIH PDU - discard silently
*/
if (!memcmp (circuit->u.bc.snpa, ssnpa, ETH_ALEN))
{
@@ -846,6 +856,8 @@ process_lan_hello (int level, struct isis_circuit *circuit, u_char * ssnpa)
ISIS_SYS_ID_LEN + 1);
}
break;
+ default:
+ break ;
}
adj->hold_time = hdr.hold_time;
@@ -949,7 +961,7 @@ process_lsp (int level, struct isis_circuit *circuit, u_char * ssnpa)
ntohs (hdr->checksum),
ntohs (hdr->rem_lifetime),
/* FIXME: use %z when we stop supporting old compilers. */
- (unsigned long) stream_get_endp (circuit->rcv_stream),
+ (unsigned long) stream_get_endp (circuit->rcv_stream),
circuit->interface->name);
}
@@ -1144,7 +1156,7 @@ dontcheckadj:
}
return retval;
}
- /* 7.3.15.1 c) - If this is our own lsp and we don't have it initiate a
+ /* 7.3.15.1 c) - If this is our own lsp and we don't have it initiate a
* purge */
if (memcmp (hdr->lsp_id, isis->sysid, ISIS_SYS_ID_LEN) == 0)
{
@@ -1489,7 +1501,7 @@ process_snp (int snp_type, int level, struct isis_circuit *circuit,
}
else
{
- /* 7.3.15.2 b) 5) if it was not found, and all of those are not 0,
+ /* 7.3.15.2 b) 5) if it was not found, and all of those are not 0,
* insert it and set SSN on it */
if (entry->rem_lifetime && entry->checksum && entry->seq_num &&
memcmp (entry->lsp_id, isis->sysid, ISIS_SYS_ID_LEN))
@@ -1776,7 +1788,7 @@ isis_receive (struct thread *thread)
int retval;
/*
- * Get the circuit
+ * Get the circuit
*/
circuit = THREAD_ARG (thread);
assert (circuit);
@@ -1792,8 +1804,8 @@ isis_receive (struct thread *thread)
if (retval == ISIS_OK)
retval = isis_handle_pdu (circuit, ssnpa);
- /*
- * prepare for next packet.
+ /*
+ * prepare for next packet.
*/
THREAD_READ_ON (master, circuit->t_read, isis_receive, circuit,
circuit->fd);
@@ -1810,7 +1822,7 @@ isis_receive (struct thread *thread)
int retval;
/*
- * Get the circuit
+ * Get the circuit
*/
circuit = THREAD_ARG (thread);
assert (circuit);
@@ -1827,8 +1839,8 @@ isis_receive (struct thread *thread)
if (retval == ISIS_OK)
retval = isis_handle_pdu (circuit, ssnpa);
- /*
- * prepare for next packet.
+ /*
+ * prepare for next packet.
*/
circuit->t_read = thread_add_timer_msec (master, isis_receive, circuit,
listcount
@@ -1882,7 +1894,7 @@ fill_fixed_hdr (struct isis_fixed_hdr *hdr, u_char pdu_type)
}
/*
- * SEND SIDE
+ * SEND SIDE
*/
static void
fill_fixed_hdr_andstream (struct isis_fixed_hdr *hdr, u_char pdu_type,
@@ -1974,7 +1986,7 @@ send_hello (struct isis_circuit *circuit, int level)
}
/*
- * Then the variable length part
+ * Then the variable length part
*/
/* add circuit password */
if (circuit->passwd.type)