Change type of vars which hold in_addr.s_addr from u_long to u_int32_t,

for more safety on alpha.

Approved by: jkh
This commit is contained in:
Yoshinobu Inoue 2000-03-03 13:01:57 +00:00
parent 46ad1c2366
commit 1fece1a6b6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57727
2 changed files with 5 additions and 4 deletions

View File

@ -96,7 +96,7 @@ int file(char *name);
void getsocket(void);
int my_ether_aton(char *a, u_char *n);
int rtmsg(int cmd);
int get_ether_addr(u_long ipaddr, u_char *hwaddr);
int get_ether_addr(u_int32_t ipaddr, u_char *hwaddr);
static int pid;
static int nflag; /* no reverse dns lookups */
@ -641,10 +641,10 @@ doit:
#define MAX_IFS 32
int
get_ether_addr(u_long ipaddr, u_char *hwaddr)
get_ether_addr(u_int32_t ipaddr, u_char *hwaddr)
{
struct ifreq *ifr, *ifend, *ifp;
u_long ina, mask;
u_int32_t ina, mask;
struct sockaddr_dl *dla;
struct ifreq ifreq;
struct ifconf ifc;

View File

@ -31,6 +31,7 @@
* SUCH DAMAGE.
*
* @(#)globals.h 8.1 (Berkeley) 6/6/93
* $FreeBSD$
*/
#include <sys/param.h>
@ -137,7 +138,7 @@ extern struct hosttbl hosttbl[NHOSTS+1];
struct netinfo {
struct netinfo *next;
struct in_addr net;
u_long mask;
u_int32_t mask;
struct in_addr my_addr;
struct sockaddr_in dest_addr; /* broadcast addr or point-point */
long status;