diff --git a/lib/libc/net/ether_addr.c b/lib/libc/net/ether_addr.c index 89aa7b5d6924..e3b7438aa38c 100644 --- a/lib/libc/net/ether_addr.c +++ b/lib/libc/net/ether_addr.c @@ -62,7 +62,7 @@ * and separate it into its component parts. */ int ether_line(l, e, hostname) - char *l; + const char *l; struct ether_addr *e; char *hostname; { @@ -84,7 +84,7 @@ int ether_line(l, e, hostname) * binary form. */ struct ether_addr *ether_aton(a) - char *a; + const char *a; { int i; static struct ether_addr o; @@ -110,7 +110,7 @@ struct ether_addr *ether_aton(a) * an ASCII string. */ char *ether_ntoa(n) - struct ether_addr *n; + const struct ether_addr *n; { int i; static char a[18]; @@ -129,7 +129,7 @@ char *ether_ntoa(n) int ether_ntohost(hostname, e) char *hostname; - struct ether_addr *e; + const struct ether_addr *e; { FILE *fp; char buf[BUFSIZ + 2]; @@ -180,7 +180,7 @@ int ether_ntohost(hostname, e) * NIS/YP. */ int ether_hostton(hostname, e) - char *hostname; + const char *hostname; struct ether_addr *e; { FILE *fp; diff --git a/lib/libc/net/ethers.3 b/lib/libc/net/ethers.3 index 1c1fb2652c62..46f0e4fc02cb 100644 --- a/lib/libc/net/ethers.3 +++ b/lib/libc/net/ethers.3 @@ -48,15 +48,15 @@ .Fd #include <sys/socket.h> .Fd #include <net/ethernet.h> .Ft int -.Fn ether_line "char *l" "struct ether_addr *e" "char *hostname" +.Fn ether_line "const char *l" "struct ether_addr *e" "char *hostname" .Ft struct ether_addr * -.Fn ether_aton "char *a" +.Fn ether_aton "const char *a" .Ft char * -.Fn ether_ntoa "struct ether_addr *n" +.Fn ether_ntoa "const struct ether_addr *n" .Ft int -.Fn ether_ntohost "char *hostname" "struct ether_addr *e" +.Fn ether_ntohost "char *hostname" "const struct ether_addr *e" .Ft int -.Fn ether_hostton "char *hostname" "struct ether_addr *e" +.Fn ether_hostton "const char *hostname" "struct ether_addr *e" .Sh DESCRIPTION These functions operate on ethernet addresses using an .Ar ether_addr diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index 6d1c82e19fbf..15cab6c58d26 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -107,11 +107,11 @@ extern void (*ng_ether_detach_p)(struct ifnet *ifp); * Ethernet address conversion/parsing routines. */ __BEGIN_DECLS -struct ether_addr *ether_aton __P((char *)); -int ether_hostton __P((char *, struct ether_addr *)); -int ether_line __P((char *, struct ether_addr *, char *)); -char *ether_ntoa __P((struct ether_addr *)); -int ether_ntohost __P((char *, struct ether_addr *)); +struct ether_addr *ether_aton __P((const char *)); +int ether_hostton __P((const char *, struct ether_addr *)); +int ether_line __P((const char *, struct ether_addr *, char *)); +char *ether_ntoa __P((const struct ether_addr *)); +int ether_ntohost __P((char *, const struct ether_addr *)); __END_DECLS #endif /* !_KERNEL */