-/* $OpenBSD: auth.c,v 1.41 2024/08/09 05:16:13 deraadt Exp $ */
+/* $OpenBSD: auth.c,v 1.42 2024/08/10 05:32:28 jsg Exp $ */
/*
* auth.c - PPP authentication and phase control.
* auth_check_options - called to check authentication options.
*/
void
-auth_check_options()
+auth_check_options(void)
{
lcp_options *wo = &lcp_wantoptions[0];
int can_auth;
* plogout - Logout the user.
*/
static void
-plogout()
+plogout(void)
{
char *tty;
* secrets that we could possibly use for authenticating the peer.
*/
static int
-have_pap_secret()
+have_pap_secret(void)
{
FILE *f;
int ret;
-/* $OpenBSD: chat.c,v 1.36 2024/08/09 05:16:15 deraadt Exp $ */
+/* $OpenBSD: chat.c,v 1.37 2024/08/10 05:32:28 jsg Exp $ */
/*
* Chat -- a program for automatic session establishment (i.e. dial
/*
* We got an error parsing the command line.
*/
-void usage()
+void usage(void)
{
fprintf(stderr, "\
usage: %s [-eSsVv] [-f chat_file] [-r report_file] [-T phone_number]\n\
logmsg("alarm");
}
-void unalarm()
+void unalarm(void)
{
int flags;
fatal(2, "SIGHUP");
}
-void init()
+void init(void)
{
signal(SIGINT, sigint);
signal(SIGTERM, sigterm);
alarmed = 0;
}
-void set_tty_parameters()
+void set_tty_parameters(void)
{
#if defined(get_term_param)
term_parms t;
#endif
}
-void break_sequence()
+void break_sequence(void)
{
#ifdef TERMIOS
tcsendbreak (0, 0);
fatal(1, "Failed");
}
-int get_char()
+int get_char(void)
{
int status;
char c;
-/* $OpenBSD: demand.c,v 1.12 2024/08/09 05:16:13 deraadt Exp $ */
+/* $OpenBSD: demand.c,v 1.13 2024/08/10 05:32:28 jsg Exp $ */
/*
* demand.c - Support routines for demand-dialling.
* demand_conf - configure the interface for doing dial-on-demand.
*/
void
-demand_conf()
+demand_conf(void)
{
int i;
struct protent *protp;
* without an error.
*/
void
-demand_drop()
+demand_drop(void)
{
struct packet *pkt, *nextpkt;
int i;
* demand_unblock - set each enabled network protocol to pass packets.
*/
void
-demand_unblock()
+demand_unblock(void)
{
int i;
struct protent *protp;
-/* $OpenBSD: ipcp.c,v 1.16 2024/08/09 05:16:13 deraadt Exp $ */
+/* $OpenBSD: ipcp.c,v 1.17 2024/08/10 05:32:28 jsg Exp $ */
/*
* ipcp.c - PPP IP Control Protocol.
* and assign appropriate defaults.
*/
static void
-ip_check_options()
+ip_check_options(void)
{
struct hostent *hp;
u_int32_t local;
-/* $OpenBSD: magic.c,v 1.10 2013/09/29 16:24:22 deraadt Exp $ */
+/* $OpenBSD: magic.c,v 1.11 2024/08/10 05:32:28 jsg Exp $ */
/*
* magic.c - PPP Magic Number routines.
* and current time, currently.
*/
void
-magic_init()
+magic_init(void)
{
}
* magic - Returns the next magic number.
*/
u_int32_t
-magic()
+magic(void)
{
return arc4random();
}
-/* $OpenBSD: main.c,v 1.57 2024/08/09 05:16:13 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.58 2024/08/10 05:32:28 jsg Exp $ */
/*
* main.c - Point-to-Point Protocol main module
* detach - detach us from the controlling terminal.
*/
void
-detach()
+detach(void)
{
if (detached)
return;
* get_input - called when incoming data is available.
*/
static void
-get_input()
+get_input(void)
{
int len, i;
u_char *p;
* quit - Clean up state and exit (with an error indication).
*/
void
-quit()
+quit(void)
{
die(1);
}
* cleanup - restore anything which needs to be restored before we exit
*/
static void
-cleanup()
+cleanup(void)
{
sys_cleanup();
* close_tty - restore the terminal device and close it.
*/
static void
-close_tty()
+close_tty(void)
{
disestablish_ppp(ttyfd);
* calltimeout - Call any timeout routines which are now due.
*/
static void
-calltimeout()
+calltimeout(void)
{
struct callout *p;
-/* $OpenBSD: options.c,v 1.31 2024/08/09 05:16:13 deraadt Exp $ */
+/* $OpenBSD: options.c,v 1.32 2024/08/10 05:32:28 jsg Exp $ */
/*
* options.c - handles option processing for PPP.
* usage - print out a message telling how to use the program.
*/
void
-usage()
+usage(void)
{
if (phase == PHASE_INITIALIZE)
fprintf(stderr, usage_string, VERSION, PATCHLEVEL, IMPLEMENTATION,
* and if so, interpret options from it.
*/
int
-options_from_user()
+options_from_user(void)
{
char *user, *path, *file;
int ret;
* device, and if so, interpret options from it.
*/
int
-options_for_tty()
+options_for_tty(void)
{
char *dev, *path;
int ret;
-/* $OpenBSD: pppstats.c,v 1.13 2024/08/09 05:16:15 deraadt Exp $ */
+/* $OpenBSD: pppstats.c,v 1.14 2024/08/10 05:32:28 jsg Exp $ */
/*
* print PPP statistics:
int main(int, char *argv[]);
void
-usage()
+usage(void)
{
extern char *__progname;
* First line printed is cumulative.
*/
void
-intpr()
+intpr(void)
{
register int line = 0;
sigset_t oldmask, mask;
-/* $OpenBSD: sys-bsd.c,v 1.34 2024/08/09 05:16:13 deraadt Exp $ */
+/* $OpenBSD: sys-bsd.c,v 1.35 2024/08/10 05:32:28 jsg Exp $ */
/*
* sys-bsd.c - System-dependent procedures for setting up
* sys_init - System-dependent initialization.
*/
void
-sys_init()
+sys_init(void)
{
/* Get an internet socket for doing socket ioctl's on. */
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
* This should call die() because it's called from die().
*/
void
-sys_cleanup()
+sys_cleanup(void)
{
struct ifreq ifr;
* sys_close - Clean up in a child process before execing.
*/
void
-sys_close()
+sys_close(void)
{
close(sockfd);
if (loop_slave >= 0) {
* sys_check_options - check the options that the user specified
*/
void
-sys_check_options()
+sys_check_options(void)
{
}
* (in fact we check whether we can do an ioctl on ppp0).
*/
int
-ppp_available()
+ppp_available(void)
{
int s, ok;
struct ifreq ifr;
* restore_loop - reattach the ppp unit to the loopback.
*/
void
-restore_loop()
+restore_loop(void)
{
int x;
* Check whether the link seems not to be 8-bit clean.
*/
void
-clean_check()
+clean_check(void)
{
int x;
char *s;
* Here we use a pty.
*/
void
-open_ppp_loopback()
+open_ppp_loopback(void)
{
int flags;
struct termios tios;
* Return value is 1 if we need to bring up the link, 0 otherwise.
*/
int
-get_loop_output()
+get_loop_output(void)
{
int rv = 0;
int n;
* unlock - remove our lockfile
*/
void
-unlock()
+unlock(void)
{
if (lock_file) {
unlink(lock_file);