l2tpns/util.c
David Parrish 7aa420ce9f * Update cli callbacks to work with libcli 1.6.
This supports privileged and unprivileged commands, as well as a configuration
  mode
* Add help for all cli commands
* Add "show version" command
* Fix uptime counter display
* Fix nasty bug where cluster basetime can be set to 0 when sending initial
  heartbeat
* Don't rmmod ip_conntrack, as this can take a lot of time
* Re-order logging in routeset such that the action is given before any error
* Use the correct gateway address when deleting routes
* Remove any routes when address changes
* Require authentication if telnet from remote ip
* Require enable password always
* Return error if show pool done on slave
* We MUST immediately exit if we're the wrong master!
2004-06-28 02:43:13 +00:00

18 lines
351 B
C

/* Misc util functions */
char const *cvs_id_util = "$Id: util.c,v 1.2 2004-06-28 02:43:13 fred_nerk Exp $";
#include "l2tpns.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
char *inet_toa(unsigned long addr)
{
struct in_addr in;
memcpy(&in, &addr, sizeof(unsigned long));
return inet_ntoa(in);
}