]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/pppd.h
pppd.8: Document netmask option
[ppp.git] / pppd / pppd.h
index 135fd35eb1e7aef961cafc58230ab6e789e98711..4f020215c7f8d510a0a123c4bdfe9bf3a406075a 100644 (file)
 #ifndef PPP_PPPD_H
 #define PPP_PPPD_H
 
-#ifdef HAVE_STDARG_H
 #include <stdarg.h>
-#endif
-
-#ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
-#endif
-
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
-
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
-#endif
 
 #include "pppdconf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Limits
  */
@@ -262,10 +252,10 @@ extern struct channel *the_channel;
 bool debug_on();
 
 /* Safe sprintf++ */
-int slprintf(char *, int, char *, ...);                
+int slprintf(char *, int, const char *, ...);
 
 /* vsprintf++ */
-int vslprintf(char *, int, char *, va_list);
+int vslprintf(char *, int, const char *, va_list);
 
 /* safe strcpy */
 size_t strlcpy(char *, const char *, size_t);
@@ -274,25 +264,25 @@ size_t strlcpy(char *, const char *, size_t);
 size_t strlcat(char *, const char *, size_t);
 
 /* log a debug message */
-void dbglog(char *, ...);
+void dbglog(const char *, ...);
 
 /* log an informational message */
-void info(char *, ...);
+void info(const char *, ...);
 
 /* log a notice-level message */
-void notice(char *, ...);
+void notice(const char *, ...);
 
 /* log a warning message */
-void warn(char *, ...);
+void warn(const char *, ...);
 
 /* log an error message */
-void error(char *, ...);       
+void error(const char *, ...);
 
 /* log an error message and die(1) */
-void fatal(char *, ...);       
+void fatal(const char *, ...);
 
 /* Say we ran out of memory, and die */
-void novm(char *);
+void novm(const char *);
 
 /* Format a packet and log it with syslog */
 void log_packet(unsigned char *, int, char *, int);
@@ -574,4 +564,8 @@ extern int  (*allowed_address_hook)(uint32_t addr);
 extern void (*snoop_recv_hook)(unsigned char *p, int len);
 extern void (*snoop_send_hook)(unsigned char *p, int len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_PPPD_H */