1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2002 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate * 26*7c478bd9Sstevel@tonic-gate * Copyright 1983,1984,1985,1986,1987,1988,1989 AT&T. 27*7c478bd9Sstevel@tonic-gate * All rights reserved. 28*7c478bd9Sstevel@tonic-gate * 29*7c478bd9Sstevel@tonic-gate * University Copyright- Copyright (c) 1982, 1986, 1988 30*7c478bd9Sstevel@tonic-gate * The Regents of the University of California 31*7c478bd9Sstevel@tonic-gate * All Rights Reserved 32*7c478bd9Sstevel@tonic-gate * 33*7c478bd9Sstevel@tonic-gate * University Acknowledgment- Portions of this document are derived from 34*7c478bd9Sstevel@tonic-gate * software developed by the University of California, Berkeley, and its 35*7c478bd9Sstevel@tonic-gate * contributors. 36*7c478bd9Sstevel@tonic-gate */ 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate #ifndef _SYSLOGD_H 39*7c478bd9Sstevel@tonic-gate #define _SYSLOGD_H 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 44*7c478bd9Sstevel@tonic-gate extern "C" { 45*7c478bd9Sstevel@tonic-gate #endif 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate struct utmpx dummy; /* for sizeof ut_user, ut_line */ 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate /* 50*7c478bd9Sstevel@tonic-gate * Various constants & tunable values for syslogd 51*7c478bd9Sstevel@tonic-gate */ 52*7c478bd9Sstevel@tonic-gate #define DEBUGFILE "/var/adm/syslog.debug" 53*7c478bd9Sstevel@tonic-gate #define MAXLINE 1024 /* maximum line length */ 54*7c478bd9Sstevel@tonic-gate #define DEFUPRI (LOG_USER|LOG_INFO) 55*7c478bd9Sstevel@tonic-gate #define DEFSPRI (LOG_KERN|LOG_CRIT) 56*7c478bd9Sstevel@tonic-gate #define MARKCOUNT 3 /* ratio of minor to major marks */ 57*7c478bd9Sstevel@tonic-gate #define UNAMESZ (sizeof (dummy.ut_user)) /* length of a login name */ 58*7c478bd9Sstevel@tonic-gate #define UDEVSZ (sizeof (dummy.ut_line)) /* length of login dev name */ 59*7c478bd9Sstevel@tonic-gate #define MAXUNAMES 20 /* maximum number of user names */ 60*7c478bd9Sstevel@tonic-gate #define Q_HIGHWATER_MARK 10000 /* max outstanding msgs per file */ 61*7c478bd9Sstevel@tonic-gate #define NOPRI 0x10 /* the "no priority" priority */ 62*7c478bd9Sstevel@tonic-gate #define LOG_MARK (LOG_NFACILITIES << 3) /* mark "facility" */ 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate /* 65*7c478bd9Sstevel@tonic-gate * host_list_t structure contains a list of hostnames for a given address 66*7c478bd9Sstevel@tonic-gate */ 67*7c478bd9Sstevel@tonic-gate typedef struct host_list { 68*7c478bd9Sstevel@tonic-gate int hl_cnt; /* number of hl_hosts entries */ 69*7c478bd9Sstevel@tonic-gate char **hl_hosts; /* hostnames */ 70*7c478bd9Sstevel@tonic-gate pthread_mutex_t hl_mutex; /* protects this structs members */ 71*7c478bd9Sstevel@tonic-gate int hl_refcnt; /* reference count */ 72*7c478bd9Sstevel@tonic-gate } host_list_t; 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gate /* 75*7c478bd9Sstevel@tonic-gate * host_info_t structure contains address information for a host 76*7c478bd9Sstevel@tonic-gate * from which we received a message. 77*7c478bd9Sstevel@tonic-gate */ 78*7c478bd9Sstevel@tonic-gate typedef struct host_info { 79*7c478bd9Sstevel@tonic-gate struct netconfig *ncp; 80*7c478bd9Sstevel@tonic-gate struct netbuf addr; 81*7c478bd9Sstevel@tonic-gate } host_info_t; 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate /* 84*7c478bd9Sstevel@tonic-gate * statistics structure attached to each filed for debugging 85*7c478bd9Sstevel@tonic-gate */ 86*7c478bd9Sstevel@tonic-gate typedef struct filed_stats { 87*7c478bd9Sstevel@tonic-gate int flag; /* flag word */ 88*7c478bd9Sstevel@tonic-gate int total; /* total messages logged */ 89*7c478bd9Sstevel@tonic-gate int dups; /* duplicate messages */ 90*7c478bd9Sstevel@tonic-gate int cantfwd; /* can't forward */ 91*7c478bd9Sstevel@tonic-gate int errs; /* write errors */ 92*7c478bd9Sstevel@tonic-gate } filed_stats_t; 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate 95*7c478bd9Sstevel@tonic-gate /* 96*7c478bd9Sstevel@tonic-gate * internal representation of a log message. Includes all routing & bookkeeping 97*7c478bd9Sstevel@tonic-gate * information for the message. created in the system & network poll routines, 98*7c478bd9Sstevel@tonic-gate * and passed among the various processing threads as necessary 99*7c478bd9Sstevel@tonic-gate */ 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate typedef struct log_message { 102*7c478bd9Sstevel@tonic-gate pthread_mutex_t msg_mutex; /* protects this structs members */ 103*7c478bd9Sstevel@tonic-gate int refcnt; /* message reference count */ 104*7c478bd9Sstevel@tonic-gate int pri; /* message priority */ 105*7c478bd9Sstevel@tonic-gate int flags; /* misc flags */ 106*7c478bd9Sstevel@tonic-gate time_t ts; /* timestamp */ 107*7c478bd9Sstevel@tonic-gate host_list_t *hlp; /* ptr to host list struct */ 108*7c478bd9Sstevel@tonic-gate void *ptr; /* for anonymous use */ 109*7c478bd9Sstevel@tonic-gate char msg[MAXLINE+1]; /* the message itself */ 110*7c478bd9Sstevel@tonic-gate } log_message_t; 111*7c478bd9Sstevel@tonic-gate 112*7c478bd9Sstevel@tonic-gate _NOTE(MUTEX_PROTECTS_DATA(log_message_t::msg_mutex, log_message_t)) 113*7c478bd9Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(log_message_t)) 114*7c478bd9Sstevel@tonic-gate 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate /* 117*7c478bd9Sstevel@tonic-gate * format of a saved message. For each active file we are logging 118*7c478bd9Sstevel@tonic-gate * we save the last message and the current message, to make it 119*7c478bd9Sstevel@tonic-gate * possible to suppress duplicates on a per file basis. Earlier 120*7c478bd9Sstevel@tonic-gate * syslogd's used a global buffer for duplicate checking, so 121*7c478bd9Sstevel@tonic-gate * strict per file duplicate suppression was not always possible. 122*7c478bd9Sstevel@tonic-gate */ 123*7c478bd9Sstevel@tonic-gate typedef struct saved_msg { 124*7c478bd9Sstevel@tonic-gate int pri; 125*7c478bd9Sstevel@tonic-gate int flags; 126*7c478bd9Sstevel@tonic-gate time_t time; 127*7c478bd9Sstevel@tonic-gate char host[SYS_NMLN+1]; 128*7c478bd9Sstevel@tonic-gate char msg[MAXLINE+1]; 129*7c478bd9Sstevel@tonic-gate } saved_message_t; 130*7c478bd9Sstevel@tonic-gate 131*7c478bd9Sstevel@tonic-gate 132*7c478bd9Sstevel@tonic-gate /* 133*7c478bd9Sstevel@tonic-gate * Flags to logmsg(). 134*7c478bd9Sstevel@tonic-gate */ 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gate #define IGN_CONS 0x001 /* don't print on console */ 137*7c478bd9Sstevel@tonic-gate #define IGN_FILE 0x002 /* don't write to log file */ 138*7c478bd9Sstevel@tonic-gate #define SYNC_FILE 0x004 /* do fsync on file after printing */ 139*7c478bd9Sstevel@tonic-gate #define NOCOPY 0x008 /* don't suppress duplicate messages */ 140*7c478bd9Sstevel@tonic-gate #define ADDDATE 0x010 /* add a date to the message */ 141*7c478bd9Sstevel@tonic-gate #define MARK 0x020 /* this message is a mark */ 142*7c478bd9Sstevel@tonic-gate #define LOGSYNC 0x040 /* nightly log update message */ 143*7c478bd9Sstevel@tonic-gate #define NETWORK 0x100 /* message came from the net */ 144*7c478bd9Sstevel@tonic-gate #define SHUTDOWN 0x200 /* internal shutdown message */ 145*7c478bd9Sstevel@tonic-gate #define FLUSHMSG 0x400 /* internal flush message */ 146*7c478bd9Sstevel@tonic-gate 147*7c478bd9Sstevel@tonic-gate /* 148*7c478bd9Sstevel@tonic-gate * This structure represents the files that will have log 149*7c478bd9Sstevel@tonic-gate * copies printed. There is one instance of this for each 150*7c478bd9Sstevel@tonic-gate * file that is being logged to. 151*7c478bd9Sstevel@tonic-gate */ 152*7c478bd9Sstevel@tonic-gate struct filed { 153*7c478bd9Sstevel@tonic-gate pthread_mutex_t filed_mutex; /* protects this filed */ 154*7c478bd9Sstevel@tonic-gate pthread_t f_thread; /* thread that handles this file */ 155*7c478bd9Sstevel@tonic-gate dataq_t f_queue; /* queue of messages for this file */ 156*7c478bd9Sstevel@tonic-gate int f_queue_count; /* count of messages on the queue */ 157*7c478bd9Sstevel@tonic-gate int f_prev_queue_count; /* prev count of msgs on the queue */ 158*7c478bd9Sstevel@tonic-gate short f_type; /* entry type, see below */ 159*7c478bd9Sstevel@tonic-gate short f_orig_type; /* save entry type */ 160*7c478bd9Sstevel@tonic-gate int f_file; /* file descriptor */ 161*7c478bd9Sstevel@tonic-gate int f_msgflag; /* message disposition */ 162*7c478bd9Sstevel@tonic-gate filed_stats_t f_stat; /* statistics */ 163*7c478bd9Sstevel@tonic-gate saved_message_t f_prevmsg; /* previous message */ 164*7c478bd9Sstevel@tonic-gate saved_message_t f_current; /* current message */ 165*7c478bd9Sstevel@tonic-gate int f_prevcount; /* message repeat count */ 166*7c478bd9Sstevel@tonic-gate uchar_t f_pmask[LOG_NFACILITIES+1]; /* priority mask */ 167*7c478bd9Sstevel@tonic-gate union { 168*7c478bd9Sstevel@tonic-gate char f_uname[MAXUNAMES][SYS_NMLN + 1]; 169*7c478bd9Sstevel@tonic-gate struct { 170*7c478bd9Sstevel@tonic-gate char f_hname[SYS_NMLN + 1]; 171*7c478bd9Sstevel@tonic-gate struct netbuf f_addr; 172*7c478bd9Sstevel@tonic-gate } f_forw; /* forwarding address */ 173*7c478bd9Sstevel@tonic-gate char f_fname[MAXPATHLEN + 1]; 174*7c478bd9Sstevel@tonic-gate } f_un; 175*7c478bd9Sstevel@tonic-gate }; 176*7c478bd9Sstevel@tonic-gate 177*7c478bd9Sstevel@tonic-gate _NOTE(MUTEX_PROTECTS_DATA(filed::filed_mutex, filed)) 178*7c478bd9Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(filed)) 179*7c478bd9Sstevel@tonic-gate 180*7c478bd9Sstevel@tonic-gate /* values for f_type */ 181*7c478bd9Sstevel@tonic-gate #define F_UNUSED 0 /* unused entry */ 182*7c478bd9Sstevel@tonic-gate #define F_FILE 1 /* regular file */ 183*7c478bd9Sstevel@tonic-gate #define F_TTY 2 /* terminal */ 184*7c478bd9Sstevel@tonic-gate #define F_CONSOLE 3 /* console terminal */ 185*7c478bd9Sstevel@tonic-gate #define F_FORW 4 /* remote machine */ 186*7c478bd9Sstevel@tonic-gate #define F_USERS 5 /* list of users */ 187*7c478bd9Sstevel@tonic-gate #define F_WALL 6 /* everyone logged on */ 188*7c478bd9Sstevel@tonic-gate 189*7c478bd9Sstevel@tonic-gate /* 190*7c478bd9Sstevel@tonic-gate * values for logit routine 191*7c478bd9Sstevel@tonic-gate */ 192*7c478bd9Sstevel@tonic-gate #define CURRENT 0 /* print current message */ 193*7c478bd9Sstevel@tonic-gate #define SAVED 1 /* print saved message */ 194*7c478bd9Sstevel@tonic-gate /* 195*7c478bd9Sstevel@tonic-gate * values for f_msgflag 196*7c478bd9Sstevel@tonic-gate */ 197*7c478bd9Sstevel@tonic-gate #define CURRENT_VALID 0x01 /* new message is good */ 198*7c478bd9Sstevel@tonic-gate #define OLD_VALID 0x02 /* old message is valid */ 199*7c478bd9Sstevel@tonic-gate 200*7c478bd9Sstevel@tonic-gate /* 201*7c478bd9Sstevel@tonic-gate * code translation struct for use in processing config file 202*7c478bd9Sstevel@tonic-gate */ 203*7c478bd9Sstevel@tonic-gate struct code { 204*7c478bd9Sstevel@tonic-gate char *c_name; 205*7c478bd9Sstevel@tonic-gate int c_val; 206*7c478bd9Sstevel@tonic-gate }; 207*7c478bd9Sstevel@tonic-gate 208*7c478bd9Sstevel@tonic-gate /* 209*7c478bd9Sstevel@tonic-gate * structure describing a message to be sent to the wall thread. 210*7c478bd9Sstevel@tonic-gate * the thread id and attributes are stored in the structure 211*7c478bd9Sstevel@tonic-gate * passed to the thread, and the thread is created detached. 212*7c478bd9Sstevel@tonic-gate */ 213*7c478bd9Sstevel@tonic-gate typedef struct wall_device { 214*7c478bd9Sstevel@tonic-gate pthread_t thread; 215*7c478bd9Sstevel@tonic-gate pthread_attr_t thread_attr; 216*7c478bd9Sstevel@tonic-gate char dev[PATH_MAX + 1]; 217*7c478bd9Sstevel@tonic-gate char msg[MAXLINE+1]; 218*7c478bd9Sstevel@tonic-gate char ut_name[sizeof (dummy.ut_name)]; 219*7c478bd9Sstevel@tonic-gate } walldev_t; 220*7c478bd9Sstevel@tonic-gate 221*7c478bd9Sstevel@tonic-gate /* 222*7c478bd9Sstevel@tonic-gate * hostname caching struct to reduce hostname name lookup. 223*7c478bd9Sstevel@tonic-gate */ 224*7c478bd9Sstevel@tonic-gate struct hostname_cache { 225*7c478bd9Sstevel@tonic-gate struct hostname_cache *next; 226*7c478bd9Sstevel@tonic-gate struct netbuf addr; 227*7c478bd9Sstevel@tonic-gate struct netconfig *ncp; 228*7c478bd9Sstevel@tonic-gate host_list_t *h; 229*7c478bd9Sstevel@tonic-gate time_t expire; 230*7c478bd9Sstevel@tonic-gate }; 231*7c478bd9Sstevel@tonic-gate 232*7c478bd9Sstevel@tonic-gate #define DEF_HNC_SIZE 128 233*7c478bd9Sstevel@tonic-gate #define DEF_HNC_TTL 600 /* 10 minutes */ 234*7c478bd9Sstevel@tonic-gate 235*7c478bd9Sstevel@tonic-gate /* 236*7c478bd9Sstevel@tonic-gate * function prototypes 237*7c478bd9Sstevel@tonic-gate */ 238*7c478bd9Sstevel@tonic-gate int main(int argc, char **argv); 239*7c478bd9Sstevel@tonic-gate static void usage(void); 240*7c478bd9Sstevel@tonic-gate static void untty(void); 241*7c478bd9Sstevel@tonic-gate static void formatnet(struct netbuf *nbp, log_message_t *mp); 242*7c478bd9Sstevel@tonic-gate static void formatsys(struct log_ctl *lp, char *msg, int sync); 243*7c478bd9Sstevel@tonic-gate static void *logmsg(void *ap); 244*7c478bd9Sstevel@tonic-gate static void wallmsg(struct filed *f, char *from, char *msg); 245*7c478bd9Sstevel@tonic-gate static host_list_t *cvthname(struct netbuf *nbp, struct netconfig *ncp, char *); 246*7c478bd9Sstevel@tonic-gate static void set_flush_msg(struct filed *f); 247*7c478bd9Sstevel@tonic-gate static void flushmsg(int flags); 248*7c478bd9Sstevel@tonic-gate void logerror(const char *type, ...); 249*7c478bd9Sstevel@tonic-gate static void init(void); 250*7c478bd9Sstevel@tonic-gate static void conf_init(void); 251*7c478bd9Sstevel@tonic-gate static void cfline(char *line, int lineno, struct filed *f); 252*7c478bd9Sstevel@tonic-gate static int decode(char *name, struct code *codetab); 253*7c478bd9Sstevel@tonic-gate static int ismyaddr(struct netbuf *nbp); 254*7c478bd9Sstevel@tonic-gate static void getnets(void); 255*7c478bd9Sstevel@tonic-gate static int addnet(struct netconfig *ncp, struct netbuf *nbp); 256*7c478bd9Sstevel@tonic-gate static void bindnet(void); 257*7c478bd9Sstevel@tonic-gate static int logforward(struct filed *f, char *ebuf); 258*7c478bd9Sstevel@tonic-gate static int amiloghost(void); 259*7c478bd9Sstevel@tonic-gate static int same_addr(struct netbuf *, struct netbuf *); 260*7c478bd9Sstevel@tonic-gate static void prepare_sys_poll(void); 261*7c478bd9Sstevel@tonic-gate static void *sys_poll(void *ap); 262*7c478bd9Sstevel@tonic-gate static void getkmsg(int); 263*7c478bd9Sstevel@tonic-gate static void *net_poll(void *ap); 264*7c478bd9Sstevel@tonic-gate static log_message_t *new_msg(void); 265*7c478bd9Sstevel@tonic-gate static void free_msg(log_message_t *lm); 266*7c478bd9Sstevel@tonic-gate static int logmymsg(int pri, char *msg, int flags, int); 267*7c478bd9Sstevel@tonic-gate static void *logit(void *ap); 268*7c478bd9Sstevel@tonic-gate static void freehl(host_list_t *h); 269*7c478bd9Sstevel@tonic-gate static int filed_init(struct filed *h); 270*7c478bd9Sstevel@tonic-gate static void copy_msg(struct filed *f); 271*7c478bd9Sstevel@tonic-gate static void dumpstats(int fd); 272*7c478bd9Sstevel@tonic-gate static void filter_string(char *orig, char *new, size_t max); 273*7c478bd9Sstevel@tonic-gate static int openklog(char *name, int mode); 274*7c478bd9Sstevel@tonic-gate static void writemsg(int selection, struct filed *f); 275*7c478bd9Sstevel@tonic-gate static void *writetodev(void *ap); 276*7c478bd9Sstevel@tonic-gate static int shutdown_msg(void); 277*7c478bd9Sstevel@tonic-gate static void server(void *, char *, size_t, door_desc_t *, uint_t); 278*7c478bd9Sstevel@tonic-gate static char *alloc_stacks(int); 279*7c478bd9Sstevel@tonic-gate static void dealloc_stacks(int); 280*7c478bd9Sstevel@tonic-gate static int checkm4(void); 281*7c478bd9Sstevel@tonic-gate static void filed_destroy(struct filed *f); 282*7c478bd9Sstevel@tonic-gate static void open_door(void); 283*7c478bd9Sstevel@tonic-gate static void close_door(void); 284*7c478bd9Sstevel@tonic-gate static void delete_doorfiles(void); 285*7c478bd9Sstevel@tonic-gate static void signull(int, siginfo_t *, void *); 286*7c478bd9Sstevel@tonic-gate static int putctrlc(int, char **, size_t *, size_t); 287*7c478bd9Sstevel@tonic-gate static size_t findnl_bkwd(const char *, const size_t); 288*7c478bd9Sstevel@tonic-gate static size_t copynl_frwd(char *, const size_t, const char *, const size_t); 289*7c478bd9Sstevel@tonic-gate static size_t copy_frwd(char *, const size_t, const char *, const size_t); 290*7c478bd9Sstevel@tonic-gate static void logerror_format(const char *, char *, va_list); 291*7c478bd9Sstevel@tonic-gate static int logerror_to_console(int, const char *); 292*7c478bd9Sstevel@tonic-gate static void defaults(void); 293*7c478bd9Sstevel@tonic-gate static void shutdown_input(void); 294*7c478bd9Sstevel@tonic-gate static void *hostname_lookup(void *); 295*7c478bd9Sstevel@tonic-gate static void reconfigure(void); 296*7c478bd9Sstevel@tonic-gate static void disable_errorlog(void); 297*7c478bd9Sstevel@tonic-gate static void enable_errorlog(void); 298*7c478bd9Sstevel@tonic-gate 299*7c478bd9Sstevel@tonic-gate static void hnc_init(int); 300*7c478bd9Sstevel@tonic-gate static host_list_t *hnc_lookup(struct netbuf *, struct netconfig *); 301*7c478bd9Sstevel@tonic-gate static void hnc_register(struct netbuf *, struct netconfig *, host_list_t *); 302*7c478bd9Sstevel@tonic-gate static void hnc_unreg(struct hostname_cache **); 303*7c478bd9Sstevel@tonic-gate 304*7c478bd9Sstevel@tonic-gate 305*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 306*7c478bd9Sstevel@tonic-gate } 307*7c478bd9Sstevel@tonic-gate #endif 308*7c478bd9Sstevel@tonic-gate 309*7c478bd9Sstevel@tonic-gate #endif /* _SYSLOGD_H */ 310