mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 06:10:37 +00:00
isisd: annotate some function arguments with const
Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
85b123a4bf
commit
02e33d3ed5
@ -52,7 +52,7 @@
|
||||
extern struct isis *isis;
|
||||
|
||||
static struct isis_adjacency *
|
||||
adj_alloc (u_char * id)
|
||||
adj_alloc (const u_char *id)
|
||||
{
|
||||
struct isis_adjacency *adj;
|
||||
|
||||
@ -63,7 +63,7 @@ adj_alloc (u_char * id)
|
||||
}
|
||||
|
||||
struct isis_adjacency *
|
||||
isis_new_adj (u_char * id, u_char * snpa, int level,
|
||||
isis_new_adj (const u_char * id, const u_char * snpa, int level,
|
||||
struct isis_circuit *circuit)
|
||||
{
|
||||
struct isis_adjacency *adj;
|
||||
@ -104,7 +104,7 @@ isis_new_adj (u_char * id, u_char * snpa, int level,
|
||||
}
|
||||
|
||||
struct isis_adjacency *
|
||||
isis_adj_lookup (u_char * sysid, struct list *adjdb)
|
||||
isis_adj_lookup (const u_char * sysid, struct list *adjdb)
|
||||
{
|
||||
struct isis_adjacency *adj;
|
||||
struct listnode *node;
|
||||
@ -117,7 +117,7 @@ isis_adj_lookup (u_char * sysid, struct list *adjdb)
|
||||
}
|
||||
|
||||
struct isis_adjacency *
|
||||
isis_adj_lookup_snpa (u_char * ssnpa, struct list *adjdb)
|
||||
isis_adj_lookup_snpa (const u_char * ssnpa, struct list *adjdb)
|
||||
{
|
||||
struct listnode *node;
|
||||
struct isis_adjacency *adj;
|
||||
|
@ -101,10 +101,10 @@ struct isis_adjacency
|
||||
struct isis_circuit *circuit; /* back pointer */
|
||||
};
|
||||
|
||||
struct isis_adjacency *isis_adj_lookup (u_char * sysid, struct list *adjdb);
|
||||
struct isis_adjacency *isis_adj_lookup_snpa (u_char * ssnpa,
|
||||
struct isis_adjacency *isis_adj_lookup (const u_char * sysid, struct list *adjdb);
|
||||
struct isis_adjacency *isis_adj_lookup_snpa (const u_char * ssnpa,
|
||||
struct list *adjdb);
|
||||
struct isis_adjacency *isis_new_adj (u_char * id, u_char * snpa, int level,
|
||||
struct isis_adjacency *isis_new_adj (const u_char * id, const u_char * snpa, int level,
|
||||
struct isis_circuit *circuit);
|
||||
void isis_delete_adj (void *adj);
|
||||
void isis_adj_state_change (struct isis_adjacency *adj,
|
||||
|
@ -78,7 +78,7 @@ dyn_cache_cleanup (struct thread *thread)
|
||||
}
|
||||
|
||||
struct isis_dynhn *
|
||||
dynhn_find_by_id (u_char * id)
|
||||
dynhn_find_by_id (const u_char * id)
|
||||
{
|
||||
struct listnode *node = NULL;
|
||||
struct isis_dynhn *dyn = NULL;
|
||||
@ -104,7 +104,7 @@ dynhn_find_by_name (const char *hostname)
|
||||
}
|
||||
|
||||
void
|
||||
isis_dynhn_insert (u_char * id, struct hostname *hostname, int level)
|
||||
isis_dynhn_insert (const u_char * id, struct hostname *hostname, int level)
|
||||
{
|
||||
struct isis_dynhn *dyn;
|
||||
|
||||
@ -135,7 +135,7 @@ isis_dynhn_insert (u_char * id, struct hostname *hostname, int level)
|
||||
}
|
||||
|
||||
void
|
||||
isis_dynhn_remove (u_char * id)
|
||||
isis_dynhn_remove (const u_char * id)
|
||||
{
|
||||
struct isis_dynhn *dyn;
|
||||
|
||||
|
@ -32,9 +32,9 @@ struct isis_dynhn
|
||||
};
|
||||
|
||||
void dyn_cache_init (void);
|
||||
void isis_dynhn_insert (u_char * id, struct hostname *hostname, int level);
|
||||
void isis_dynhn_remove (u_char * id);
|
||||
struct isis_dynhn *dynhn_find_by_id (u_char * id);
|
||||
void isis_dynhn_insert (const u_char * id, struct hostname *hostname, int level);
|
||||
void isis_dynhn_remove (const u_char * id);
|
||||
struct isis_dynhn *dynhn_find_by_id (const u_char * id);
|
||||
struct isis_dynhn *dynhn_find_by_name (const char *hostname);
|
||||
void dynhn_print_all (struct vty *vty);
|
||||
|
||||
|
@ -63,7 +63,7 @@ char nlpidstring[30];
|
||||
* This converts the isonet to its printable format
|
||||
*/
|
||||
const char *
|
||||
isonet_print (u_char * from, int len)
|
||||
isonet_print (const u_char * from, int len)
|
||||
{
|
||||
int i = 0;
|
||||
char *pos = isonet;
|
||||
@ -370,7 +370,7 @@ syst2string (int type)
|
||||
* Print functions - we print to static vars
|
||||
*/
|
||||
const char *
|
||||
snpa_print (u_char * from)
|
||||
snpa_print (const u_char * from)
|
||||
{
|
||||
int i = 0;
|
||||
u_char *pos = (u_char *)snpa;
|
||||
@ -402,7 +402,7 @@ snpa_print (u_char * from)
|
||||
}
|
||||
|
||||
const char *
|
||||
sysid_print (u_char * from)
|
||||
sysid_print (const u_char * from)
|
||||
{
|
||||
int i = 0;
|
||||
char *pos = sysid;
|
||||
@ -434,7 +434,7 @@ sysid_print (u_char * from)
|
||||
}
|
||||
|
||||
const char *
|
||||
rawlspid_print (u_char * from)
|
||||
rawlspid_print (const u_char * from)
|
||||
{
|
||||
char *pos = lspid;
|
||||
if (!from)
|
||||
@ -553,7 +553,7 @@ unix_hostname (void)
|
||||
* If no dynamic hostname found then returns formatted system ID.
|
||||
*/
|
||||
const char *
|
||||
print_sys_hostname (u_char *sysid)
|
||||
print_sys_hostname (const u_char *sysid)
|
||||
{
|
||||
struct isis_dynhn *dyn;
|
||||
|
||||
|
@ -41,14 +41,14 @@ int sysid2buff (u_char *, const char *);
|
||||
/*
|
||||
* Printing functions
|
||||
*/
|
||||
const char *isonet_print (u_char *, int len);
|
||||
const char *sysid_print (u_char *);
|
||||
const char *snpa_print (u_char *);
|
||||
const char *rawlspid_print (u_char *);
|
||||
const char *isonet_print (const u_char *, int len);
|
||||
const char *sysid_print (const u_char *);
|
||||
const char *snpa_print (const u_char *);
|
||||
const char *rawlspid_print (const u_char *);
|
||||
const char *time2string (u_int32_t);
|
||||
/* typedef struct nlpids nlpids; */
|
||||
char *nlpid2string (struct nlpids *);
|
||||
const char *print_sys_hostname (u_char *sysid);
|
||||
const char *print_sys_hostname (const u_char *sysid);
|
||||
void zlog_dump_data (void *data, int len);
|
||||
|
||||
/*
|
||||
|
@ -884,7 +884,7 @@ process_p2p_hello (struct isis_circuit *circuit)
|
||||
* Process IS-IS LAN Level 1/2 Hello PDU
|
||||
*/
|
||||
static int
|
||||
process_lan_hello (int level, struct isis_circuit *circuit, u_char * ssnpa)
|
||||
process_lan_hello (int level, struct isis_circuit *circuit, const u_char *ssnpa)
|
||||
{
|
||||
int retval = ISIS_OK;
|
||||
struct isis_lan_hello_hdr hdr;
|
||||
@ -1272,7 +1272,7 @@ out:
|
||||
* Section 7.3.15.1 - Action on receipt of a link state PDU
|
||||
*/
|
||||
static int
|
||||
process_lsp (int level, struct isis_circuit *circuit, u_char * ssnpa)
|
||||
process_lsp (int level, struct isis_circuit *circuit, const u_char *ssnpa)
|
||||
{
|
||||
struct isis_link_state_hdr *hdr;
|
||||
struct isis_adjacency *adj = NULL;
|
||||
@ -1621,7 +1621,7 @@ dontcheckadj:
|
||||
|
||||
static int
|
||||
process_snp (int snp_type, int level, struct isis_circuit *circuit,
|
||||
u_char * ssnpa)
|
||||
const u_char *ssnpa)
|
||||
{
|
||||
int retval = ISIS_OK;
|
||||
int cmp, own_lsp;
|
||||
@ -1917,7 +1917,7 @@ process_snp (int snp_type, int level, struct isis_circuit *circuit,
|
||||
}
|
||||
|
||||
static int
|
||||
process_csnp (int level, struct isis_circuit *circuit, u_char * ssnpa)
|
||||
process_csnp (int level, struct isis_circuit *circuit, const u_char *ssnpa)
|
||||
{
|
||||
if (isis->debugs & DEBUG_SNP_PACKETS)
|
||||
{
|
||||
@ -1941,7 +1941,7 @@ process_csnp (int level, struct isis_circuit *circuit, u_char * ssnpa)
|
||||
}
|
||||
|
||||
static int
|
||||
process_psnp (int level, struct isis_circuit *circuit, u_char * ssnpa)
|
||||
process_psnp (int level, struct isis_circuit *circuit, const u_char *ssnpa)
|
||||
{
|
||||
if (isis->debugs & DEBUG_SNP_PACKETS)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user