187862bd3Sdenis /* 287862bd3Sdenis * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> 387862bd3Sdenis * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> 487862bd3Sdenis * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> 587862bd3Sdenis * 687862bd3Sdenis * Permission to use, copy, modify, and distribute this software for any 787862bd3Sdenis * purpose with or without fee is hereby granted, provided that the above 887862bd3Sdenis * copyright notice and this permission notice appear in all copies. 987862bd3Sdenis * 1087862bd3Sdenis * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1187862bd3Sdenis * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1287862bd3Sdenis * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1387862bd3Sdenis * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1487862bd3Sdenis * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1587862bd3Sdenis * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1687862bd3Sdenis * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1787862bd3Sdenis */ 1887862bd3Sdenis 1987862bd3Sdenis struct parse_result; 2087862bd3Sdenis 2187862bd3Sdenis struct output { 2287862bd3Sdenis void (*head)(struct parse_result *); 2387862bd3Sdenis void (*interface)(struct ctl_iface *, int); 2487862bd3Sdenis void (*summary)(struct ctl_sum *); 2587862bd3Sdenis void (*summary_area)(struct ctl_sum_area *); 2687862bd3Sdenis void (*neighbor)(struct ctl_nbr *, int); 2787862bd3Sdenis void (*rib)(struct ctl_rt *, int); 2887862bd3Sdenis void (*fib)(struct kroute *); 2987862bd3Sdenis void (*fib_interface)(struct kif *); 3087862bd3Sdenis void (*db)(struct lsa *, struct in_addr, u_int8_t, 31c502c694Sdenis char *); 3287862bd3Sdenis void (*db_simple)(struct lsa_hdr *, struct in_addr, u_int8_t, 33c502c694Sdenis char *); 3487862bd3Sdenis void (*tail)(void); 3587862bd3Sdenis }; 3687862bd3Sdenis 37*ce7279d8Sjsg extern const struct output show_output; 3887862bd3Sdenis 3987862bd3Sdenis #define EOL0(flag) ((flag & F_CTL_SSV) ? ';' : '\n') 4087862bd3Sdenis 4187862bd3Sdenis const char *fmt_timeframe_core(time_t); 4287862bd3Sdenis const char *get_linkstate(uint8_t, int); 4387862bd3Sdenis const char *print_ospf_rtr_flags(u_int8_t); 4487862bd3Sdenis const char *print_ospf_options(u_int8_t); 4587862bd3Sdenis uint64_t get_ifms_type(uint8_t); 4687862bd3Sdenis const char *get_media_descr(uint64_t); 4787862bd3Sdenis const char *print_baudrate(u_int64_t); 4887862bd3Sdenis const char *print_link(int); 4987862bd3Sdenis char *print_ls_type(u_int8_t); 5087862bd3Sdenis const char *log_id(u_int32_t ); 5187862bd3Sdenis const char *log_adv_rtr(u_int32_t); 5287862bd3Sdenis const char *print_ospf_flags(u_int8_t); 5387862bd3Sdenis char *print_rtr_link_type(u_int8_t); 54