]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_misc.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / isisd / isis_misc.h
index a71edd8e69be80f1f5b07c4306a1a8d2e9b8fe8e..c551fde7d1358a53ff77bd98a27dad9ac1d97e03 100644 (file)
@@ -3,17 +3,17 @@
  *                             Miscellanous routines
  *
  * 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
 #ifndef _ZEBRA_ISIS_MISC_H
 #define _ZEBRA_ISIS_MISC_H
 
-int string2circuit_t (const char *);
-const char *circuit_t2string (int);
-const char *circuit_state2string (int state);
-const char *circuit_type2string (int type);
-const char *syst2string (int);
-struct in_addr newprefix2inaddr (u_char * prefix_start,
-                                u_char prefix_masklen);
+int string2circuit_t(const char *);
+const char *circuit_t2string(int);
+const char *circuit_state2string(int state);
+const char *circuit_type2string(int type);
+const char *syst2string(int);
+struct in_addr newprefix2inaddr(uint8_t *prefix_start, uint8_t prefix_masklen);
 /*
  * Converting input to memory stored format
  * return value of 0 indicates wrong input
  */
-int dotformat2buff (u_char *, const char *);
-int sysid2buff (u_char *, const char *);
+int dotformat2buff(uint8_t *, const char *);
+int sysid2buff(uint8_t *, const char *);
 
 /*
  * Printing functions
  */
-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);
+const char *isonet_print(const uint8_t *, int len);
+const char *sysid_print(const uint8_t *);
+const char *snpa_print(const uint8_t *);
+const char *rawlspid_print(const uint8_t *);
+const char *isis_format_id(const uint8_t *id, size_t len);
+const char *time2string(uint32_t);
+const char *nlpid2str(uint8_t nlpid);
 /* typedef struct nlpids nlpids; */
-char *nlpid2string (struct nlpids *);
-const char *print_sys_hostname (const u_char *sysid);
-void zlog_dump_data (void *data, int len);
+char *nlpid2string(struct nlpids *);
+const char *print_sys_hostname(const uint8_t *sysid);
+void zlog_dump_data(void *data, int len);
 
 /*
  * misc functions
  */
-int speaks (struct nlpids *nlpids, int family);
-unsigned long isis_jitter (unsigned long timer, unsigned long jitter);
-const char *unix_hostname (void);
+unsigned long isis_jitter(unsigned long timer, unsigned long jitter);
 
 /*
  * macros
  */
-#define GETSYSID(A) (A->area_addr + (A->addr_len - \
-                                     (ISIS_SYS_ID_LEN + ISIS_NSEL_LEN)))
+#define GETSYSID(A)                                                            \
+       (A->area_addr + (A->addr_len - (ISIS_SYS_ID_LEN + ISIS_NSEL_LEN)))
 
 /* used for calculating nice string representation instead of plain seconds */
 
@@ -73,11 +72,16 @@ const char *unix_hostname (void);
 #define SECS_PER_MONTH  2628000
 #define SECS_PER_YEAR   31536000
 
-enum
-{
-  ISIS_UI_LEVEL_BRIEF,
-  ISIS_UI_LEVEL_DETAIL,
-  ISIS_UI_LEVEL_EXTENSIVE,
+enum { ISIS_UI_LEVEL_BRIEF,
+       ISIS_UI_LEVEL_DETAIL,
+       ISIS_UI_LEVEL_EXTENSIVE,
 };
 
+#include "lib/log.h"
+void log_multiline(int priority, const char *prefix, const char *format, ...)
+       PRINTF_ATTRIBUTE(3, 4);
+struct vty;
+void vty_multiline(struct vty *vty, const char *prefix, const char *format, ...)
+       PRINTF_ATTRIBUTE(3, 4);
+void vty_out_timestr(struct vty *vty, time_t uptime);
 #endif