/* Print the contents of an ARP request block. */
-static void arp_disp_2(char *name, int type, int arp_flags, char *hwa, char *mask, char *dev)
+static void arp_disp_2(const char *name, int type, int arp_flags, const char *hwa, const char *mask, const char *dev)
{
static int title = 0;
struct hwtype *xhw;
}
/* Print the contents of an ARP request block. */
-static void arp_disp(char *name, char *ip, int type, int arp_flags, char *hwa, char *mask, char *dev)
+static void arp_disp(const char *name, const char *ip, int type, int arp_flags, const char *hwa, const char *mask, const char *dev)
{
struct hwtype *xhw;
char dev[100];
int type, flags;
FILE *fp;
- char *hostname;
+ const char *hostname;
int num, entries = 0, showed = 0;
host[0] = '\0';
/* Display an ARCnet address in readable format. */
-static char *pr_arcnet(unsigned char *ptr)
+static const char *pr_arcnet(const char *ptr)
{
static char buff[64];
};
/* Display an Ash address in readable format. */
-static char *
-pr_ash(unsigned char *ptr)
+static const char *
+pr_ash(const char *ptr)
{
static char buff[128];
char *p = buff;
#if HAVE_AFASH
/* Display an Ash socket address. */
-static char *
+static const char *
pr_sash(struct sockaddr *sap, int numeric)
{
static char buf[64];
extern struct aftype ax25_aftype;
-static char *AX25_print(unsigned char *ptr)
+static const char *AX25_print(const char *ptr)
{
static char buff[8];
int i;
/* Display an AX.25 socket address. */
-static char *
+static const char *
AX25_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
#include "util.h"
/* Display a ddp domain address. */
-static char *ddp_print(unsigned char *ptr)
+static const char *ddp_print(const char *ptr)
{
static char buff[64];
struct sockaddr_at *sat = (struct sockaddr_at *) (ptr - 2);
/* Display a ddp domain address. */
-static char *ddp_sprint(struct sockaddr *sap, int numeric)
+static const char *ddp_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
/* Display an Econet address */
-static char *
-ec_print(unsigned char *ptr)
+static const char *
+ec_print(const char *ptr)
{
static char buff[64];
struct ec_addr *ec = (struct ec_addr *) ptr;
/* Display an Econet socket address */
-static char *
+static const char *
ec_sprint(struct sockaddr *sap, int numeric)
{
struct sockaddr_ec *sec = (struct sockaddr_ec *) sap;
if (sap->sa_family != AF_ECONET)
return _("[NONE SET]");
- return ec_print((unsigned char *) &sec->addr);
+ return ec_print((const char *) &sec->addr);
}
static int
/* Display an Ethernet address in readable format. */
-static char *pr_ether(unsigned char *ptr)
+static const char *pr_ether(const char *ptr)
{
static char buff[64];
struct hwtype eui64_hwtype;
/* Display an EUI-64 address in readable format. */
-static char *pr_eui64( unsigned char *ptr )
+static const char *pr_eui64(const char *ptr)
{
static char buff[64];
/* Display an FDDI address in readable format. */
-static char *pr_fddi(unsigned char *ptr)
+static const char *pr_fddi(const char *ptr)
{
static char buff[64];
#include "net-support.h"
#include "pathnames.h"
-char *pr_dlci(unsigned char *ptr)
+static const char *pr_dlci(const char *ptr)
{
static char buf[12];
/* Display an HIPPI address in readable format. */
-static char *pr_hippi(unsigned char *ptr)
+static const char *pr_hippi(const char *ptr)
{
static char buff[64];
/* Display an InfiniBand address in readable format. */
-static char *pr_ib(unsigned char *ptr)
+static const char *pr_ib(const char *ptr)
{
static char buff[128];
char *pos;
/* Display an Internet socket address. */
-static char *INET_print(unsigned char *ptr)
+static const char *INET_print(const char *ptr)
{
return (inet_ntoa((*(struct in_addr *) ptr)));
}
/* Display an Internet socket address. */
-static char *INET_sprint(struct sockaddr *sap, int numeric)
+static const char *INET_sprint(struct sockaddr *sap, int numeric)
{
static char buff[128];
/* Display an Internet socket address. */
-static char *INET6_print(unsigned char *ptr)
+static const char *INET6_print(const char *ptr)
{
static char name[80];
/* Display an Internet socket address. */
/* dirty! struct sockaddr usually doesn't suffer for inet6 addresses, fst. */
-static char *INET6_sprint(struct sockaddr *sap, int numeric)
+static const char *INET6_sprint(struct sockaddr *sap, int numeric)
{
static char buff[128];
#endif
/* Display a ipx domain address. */
-static char *IPX_print(unsigned char *ptr)
+static const char *IPX_print(const char *ptr)
{
static char buff[64];
struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) (ptr - 2);
/* Display a ipx domain address. */
-static char *IPX_sprint(struct sockaddr *sap, int numeric)
+static const char *IPX_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
* Print hardware address of interface
*
*/
-static char *irda_print(unsigned char *ptr)
+static const char *irda_print(const char *ptr)
{
static char buff[12];
#include "util.h"
/* Display an UNSPEC address. */
-static char *pr_unspec(unsigned char *ptr)
+static const char *pr_unspec(const char *ptr)
{
static char buff[64];
char *pos;
char *title;
int af;
int alen;
- char *(*print) (unsigned char *);
- char *(*sprint) (struct sockaddr *, int numeric);
+ const char *(*print) (const char *);
+ const char *(*sprint) (struct sockaddr *, int numeric);
int (*input) (int type, char *bufp, struct sockaddr *);
void (*herror) (char *text);
int (*rprint) (int options);
char *title;
int type;
int alen;
- char *(*print) (unsigned char *);
+ const char *(*print) (const char *);
int (*input) (char *, struct sockaddr *);
int (*activate) (int fd);
int suppress_null_addr;
extern struct aftype netrom_aftype;
-static char *NETROM_print(unsigned char *ptr)
+static const char *NETROM_print(const char *ptr)
{
static char buff[8];
int i;
/* Display an AX.25 socket address. */
-static char *NETROM_sprint(struct sockaddr *sap, int numeric)
+static const char *NETROM_sprint(struct sockaddr *sap, int numeric)
{
char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
extern struct aftype rose_aftype;
-static char *
- ROSE_print(unsigned char *ptr)
+static const char *
+ ROSE_print(const char *ptr)
{
static char buff[12];
}
/* Display a ROSE socket address. */
-static char *
+static const char *
ROSE_sprint(struct sockaddr *sap, int numeric)
{
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
extern struct hwtype strip_hwtype;
-static char *
-pr_strip(unsigned char *ptr)
+static const char *
+pr_strip(const char *ptr)
{
static char buff[64];
if(ptr[1])
extern struct hwtype tr_hwtype1;
#endif
-static char *pr_tr(unsigned char *ptr)
+static const char *pr_tr(const char *ptr)
{
static char buff[64];
extern struct hwtype ether_hwtype;
-static char *pr_tunnel(unsigned char *ptr)
+static const char *pr_tunnel(const char *ptr)
{
return ("");
}
/* Display an UNSPEC address. */
-static char *UNSPEC_print(unsigned char *ptr)
+static const char *UNSPEC_print(const char *ptr)
{
static char buff[64];
char *pos;
/* Display an UNSPEC socket address. */
-static char *UNSPEC_sprint(struct sockaddr *sap, int numeric)
+static const char *UNSPEC_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
#if HAVE_AFUNIX
/* Display a UNIX domain address. */
-static char *UNIX_print(unsigned char *ptr)
+static const char *UNIX_print(const char *ptr)
{
return (ptr);
}
/* Display a UNIX domain address. */
-static char *UNIX_sprint(struct sockaddr *sap, int numeric)
+static const char *UNIX_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
#endif
-static char *
-X25_print(unsigned char *ptr)
+static const char *
+X25_print(const char *ptr)
{
static char buff[X25_ADDR_LEN+1];
/* Display an X.25 socket address. */
-static char *
+static const char *
X25_sprint(struct sockaddr *sap, int numeric)
{
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)