1: /*
2: * Copyright (c) 1987 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: #ifdef LIBC_SCCS
8: <@(#)htonl.s 1.1 (Berkeley) 1/25/87\0>
9: .even
10: #endif LIBC_SCCS
11:
12: /*
13: * netlong = htonl(hostlong);
14: * u_long netlong,
15: * hostlong;
16: *
17: * hostlong = ntohl(netlong);
18: * u_long hostlong,
19: * netlong;
20: *
21: * Translate from host unsigned long representation to network unsigned
22: * long representation and back. On the PDP-11 all this requires is
23: * swapping the bytes within the high and low words of a long, so the
24: * two routines are really one ...
25: */
26: #include "DEFS.h"
27:
28: .globl _htonl, _ntohl
29: _htonl:
30: _ntohl:
31: PROFCODE(_htonl)
32: mov 2(sp),r0
33: mov 4(sp),r1
34: swab r0
35: swab r1
36: rts pc
Defined functions
_htonl
declared in line
28; defined in line
29; used 39 times
_ntohl
declared in line
28; defined in line
30; used 35 times
- in line 28
- in /usr/src/games/hunt/answer.c line
72,
79
- in /usr/src/lib/libc/inet/inet_lnaof.c line
23
- in /usr/src/lib/libc/ns/ns_ntoa.c line
29
- in /usr/src/libexec/identd/src/crypto.c line
215
- in /usr/src/libexec/talkd/print.c line
59
- in /usr/src/libexec/talkd/process.c line
47,
62
- in /usr/src/new/crash/if.c line
132
- in /usr/src/new/nntp/server/subnet.c line
141,
151,
198
- in /usr/src/sbin/ifconfig/ifconfig.c line
345
- in /usr/src/sbin/routed/af.c line
51,
111
- in /usr/src/sbin/routed/inet.c line
53,
81,
114,
158-159(2)
- in /usr/src/sbin/routed/input.c line
54,
145
- in /usr/src/sbin/routed/startup.c line
98-100(2)
- in /usr/src/sbin/routed/trace.c line
253
- in /usr/src/sbin/routed/trace.h line
53
- in /usr/src/sys/netinet/in.h line
173
- in /usr/src/sys/netns/ns.h line
116
- in /usr/src/ucb/netstat/if.c line
144
- in /usr/src/ucb/talk/ctl_transact.c line
79
- in /usr/src/usr.bin/uucp/tio.c line
183
- in /usr/src/usr.sbin/named/named/ns.h line
210
- in /usr/src/usr.sbin/named/tools/nstest.c line
111,
241