1: /*
2: * Copyright (c) 1983 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #if defined(LIBC_SCCS) && !defined(lint)
8: static char sccsid[] = "@(#)inet_ntoa.c 5.2 (Berkeley) 3/9/86";
9: #endif LIBC_SCCS and not lint
10:
11: /*
12: * Convert network-format internet address
13: * to base 256 d.d.d.d representation.
14: */
15: #include <sys/types.h>
16: #include <netinet/in.h>
17:
18: char *
19: inet_ntoa(in)
20: struct in_addr in;
21: {
22: static char b[18];
23: register char *p;
24:
25: p = (char *)∈
26: #define UC(b) (((int)b)&0xff)
27: sprintf(b, "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
28: return (b);
29: }
Defined functions
inet_ntoa
defined in line
18; used 175 times
- in /usr/include/arpa/inet.h line
25
- in /usr/src/bin/ping/ping.c line
325,
477,
520,
894-895(2),
917-920(2)
- in /usr/src/games/hunt/hunt.c line
133
- in /usr/src/include/arpa/inet.h line
25
- in /usr/src/lib/libc/net/rcmd.c line
92,
99
- in /usr/src/lib/libc/net/res_debug.c line
27,
223-227(2),
314
- in /usr/src/lib/libc/net/res_send.c line
87
- in /usr/src/libexec/fingerd/fingerd.c line
101
- in /usr/src/libexec/ftpd/ftpd.c line
705,
931,
1132
- in /usr/src/libexec/popper/pop_init.c line
102
- in /usr/src/libexec/rlogind/rlogind.c line
124,
156,
201
- in /usr/src/libexec/rshd/rshd.c line
183,
259,
270,
279
- in /usr/src/libexec/tcpd/socket.c line
33,
131,
214
- in /usr/src/libexec/telnetd/telnetd.c line
240,
293
- in /usr/src/new/crash/dispnet.c line
824
- in /usr/src/new/nntp/common/clientlib.c line
225-229(2)
- in /usr/src/new/nntp/server/access_inet.c line
62,
74,
85
- in /usr/src/sbin/ifconfig/ifconfig.c line
313,
325,
343,
356
- in /usr/src/sbin/route/route.c line
415
- in /usr/src/sbin/routed/af.c line
141-143(2)
- in /usr/src/sbin/routed/tools/query.c line
149-154(2),
203-206(2)
- in /usr/src/sbin/routed/trace.c line
149-151(2),
232-235(2),
252
- in /usr/src/ucb/PORT/systat/netcmds.c line
257
- in /usr/src/ucb/ftp/ftp.c line
133,
140
- in /usr/src/ucb/telnet.c line
2100,
2107
- in /usr/src/usr.bin/uucp/cico.c line
310,
331,
359
- in /usr/src/usr.bin/uucp/uucpd.c line
197,
278
- in /usr/src/usr.lib/libident/ident-tester.c line
42,
66
- in /usr/src/usr.sbin/arp/arp.c line
188,
195,
239,
245,
339
- in /usr/src/usr.sbin/inetd/inetd.c line
927
- in /usr/src/usr.sbin/lpr/lpd.c line
406,
415
- in /usr/src/usr.sbin/named/named/db_dump.c line
297,
364,
446
- in /usr/src/usr.sbin/named/named/db_load.c line
899
- in /usr/src/usr.sbin/named/named/db_update.c line
117
- in /usr/src/usr.sbin/named/named/ns_forw.c line
124,
416
- in /usr/src/usr.sbin/named/named/ns_init.c line
470
- in /usr/src/usr.sbin/named/named/ns_main.c line
316,
372,
523,
541,
558,
678,
745,
1143
- in /usr/src/usr.sbin/named/named/ns_maint.c line
161,
222
- in /usr/src/usr.sbin/named/named/ns_req.c line
552
- in /usr/src/usr.sbin/named/named/ns_resp.c line
151,
172-173(2),
211,
247,
628,
656-660(2),
1028,
1196
- in /usr/src/usr.sbin/named/named/ns_sort.c line
90,
118,
148,
181,
258
- in /usr/src/usr.sbin/named/tools/nslookup/debug.c line
265-269(2),
400-403(2)
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line
612-614(2)
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line
251,
1072
- in /usr/src/usr.sbin/named/tools/nslookup/res_debug.c line
33,
223-227(2),
326
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line
142
- in /usr/src/usr.sbin/named/tools/nslookup/subr.c line
211,
248
- in /usr/src/usr.sbin/named/tools/nsquery.c line
78,
84-87(2)
- in /usr/src/usr.sbin/named/tools/nstest.c line
35
- in /usr/src/usr.sbin/ntp/ntp.c line
251,
266
- in /usr/src/usr.sbin/ntp/ntp_proto.c line
727,
733,
750,
986-990(2),
1222,
1266
- in /usr/src/usr.sbin/ntp/ntp_sock.c line
76,
262
- in /usr/src/usr.sbin/ntp/ntpd.c line
469,
482,
974,
983-987(2),
1177
- in /usr/src/usr.sbin/ntp/ntpdc.c line
344,
368-370(2),
381,
411,
421-424(2)
- in /usr/src/usr.sbin/sendmail.MX/src/daemon.c line
227-231(2)
- in /usr/src/usr.sbin/sendmail/src/daemon.c line
227-231(2)
- in /usr/src/usr.sbin/syslogd/syslogd.c line
729-731(2),
740-741(2)
- in /usr/src/usr.sbin/timed/readmsg.c line
415,
429,
438
- in /usr/src/usr.sbin/timed/timed.c line
521
- in /usr/src/usr.sbin/traceroute/traceroute.c line
228,
453,
627,
655(2),
679-685(3)
- in /usr/src/usr.sbin/trpt/trpt.c line
253-255(2)
Defined variables
sccsid
defined in line
8;
never used
Defined macros
UC
defined in line
26; used 4 times