aboutsummaryrefslogtreecommitdiff
path: root/nslookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'nslookup.c')
-rw-r--r--nslookup.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nslookup.c b/nslookup.c
index ffa720174..e2d8cea1f 100644
--- a/nslookup.c
+++ b/nslookup.c
@@ -58,9 +58,9 @@ static void server_fprint(FILE * dst)
58/* only works for IPv4 */ 58/* only works for IPv4 */
59static int addr_fprint(char *addr, FILE * dst) 59static int addr_fprint(char *addr, FILE * dst)
60{ 60{
61 uint8_t split[4]; 61 u_int8_t split[4];
62 uint32_t ip; 62 u_int32_t ip;
63 uint32_t *x = (uint32_t *) addr; 63 u_int32_t *x = (u_int32_t *) addr;
64 64
65 ip = ntohl(*x); 65 ip = ntohl(*x);
66 split[0] = (ip & 0xff000000) >> 24; 66 split[0] = (ip & 0xff000000) >> 24;
@@ -73,12 +73,12 @@ static int addr_fprint(char *addr, FILE * dst)
73} 73}
74 74
75/* changes a c-string matching the perl regex \d+\.\d+\.\d+\.\d+ 75/* changes a c-string matching the perl regex \d+\.\d+\.\d+\.\d+
76 * into a uint32_t 76 * into a u_int32_t
77 */ 77 */
78static uint32_t str_to_addr(const char *addr) 78static u_int32_t str_to_addr(const char *addr)
79{ 79{
80 uint32_t split[4]; 80 u_int32_t split[4];
81 uint32_t ip; 81 u_int32_t ip;
82 82
83 sscanf(addr, "%d.%d.%d.%d", 83 sscanf(addr, "%d.%d.%d.%d",
84 &split[0], &split[1], &split[2], &split[3]); 84 &split[0], &split[1], &split[2], &split[3]);
@@ -174,4 +174,4 @@ int nslookup_main(int argc, char **argv)
174 return 0; 174 return 0;
175} 175}
176 176
177/* $Id: nslookup.c,v 1.4 2000/02/08 19:58:47 erik Exp $ */ 177/* $Id: nslookup.c,v 1.5 2000/02/18 21:34:17 erik Exp $ */