# 2.11BSD#431 - /usr/src/lib/libc/pdp/net/htons.s

##### Functions

    _htons            X
    _ntohs            X

       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:         <@(#)htons.s	1.1 (Berkeley) 1/25/87\0>
       9:         .even
      10: #endif LIBC_SCCS
      11:
      12: /*
      13:  * netshort = htons(hostshort);
      14:  *	u_short	netshort,
      15:  *		hostshort;
      16:  *
      17:  * hostshort = ntohs(netshort);
      18:  *	u_short	hostshort,
      19:  *		netshort;
      20:  *
      21:  * Translate from host unsigned short representation to network unsigned
      22:  * short representation and back.  On the PDP-11 all this requires is
      23:  * swapping the bytes of a short, so the two routines are really one ...
      24:  */
      25: #include "DEFS.h"
      26:
      27: .globl  _htons, _ntohs
      28: _htons:
      29: _ntohs:
      30:         PROFCODE(_htons)
      31:         mov     2(sp),r0
      32:         swab    r0
      33:         rts     pc

#### Defined functions

_htons declared in line 27; defined in line 28; used 83 times

- in line 27-30(2)
- in /usr/src/games/hunt/driver.c line 222, 254
- in /usr/src/games/hunt/hunt.c line 298, 321, 339, 353, 366, 381, 428, 438
- in /usr/src/lib/libc/net/getsent.c line 75
- in /usr/src/lib/libc/net/res_init.c line 68, 100
- in /usr/src/lib/libc/net/res_mkquery.c line 52, 96, 115, 137, 172, 194
- in /usr/src/lib/libc/ns/ns_addr.c line 108-109(3)
- in /usr/src/lib/libc/ns/ns_ntoa.c line 22
- in /usr/src/libexec/identd/src/crypto.c line 99, 111-112(2)
- in /usr/src/libexec/identd/src/itest.c line 157(2)
- in /usr/src/libexec/identd/src/parse.c line 499(2)
- in /usr/src/libexec/identd/testdir/test1.c line 92
- in /usr/src/libexec/talkd/process.c line 85
- in /usr/src/libexec/tcpd/rfc931.c line 116-118(2)
- in /usr/src/libexec/tftpd/tftpd.c line 319-320(2), 383-384(2), 426-427(2), 472-473(2)
- in /usr/src/new/nntp/common/clientlib.c line 199
- in /usr/src/new/nntp/xmit/get_tcp_conn.c line 30, 250, 257
- in /usr/src/sbin/routed/input.c line 78
- in /usr/src/sbin/routed/main.c line 130
- in /usr/src/sbin/routed/output.c line 105
- in /usr/src/sbin/routed/timer.c line 62
- in /usr/src/sys/netinet/in.h line 172
- in /usr/src/sys/netns/ns.h line 115
- in /usr/src/ucb/talk/invite.c line 44
- in /usr/src/ucb/talk/look_up.c line 23
- in /usr/src/ucb/telnet.c line 2068
- in /usr/src/ucb/tftp/main.c line 193
- in /usr/src/ucb/tftp/tftp.c line 102-103(2), 198-199(2), 265-266(2), 282, 323-324(2)
- in /usr/src/ucb/tn3270/tn3270.c line 254
- in /usr/src/usr.bin/uucp/aculib/bsdtcp.c line 30
- in /usr/src/usr.lib/libident/id_open.c line 105
- in /usr/src/usr.sbin/named/named/ns.h line 209
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 236, 275, 388, 752
- in /usr/src/usr.sbin/named/tools/nstest.c line 43, 64
- in /usr/src/usr.sbin/sendmail.MX/aux/mconnect.c line 71
- in /usr/src/usr.sbin/sendmail.MX/src/daemon.c line 355
- in /usr/src/usr.sbin/sendmail/aux/4.1a_daemon.c line 177, 311
- in /usr/src/usr.sbin/sendmail/aux/mconnect.c line 75
- in /usr/src/usr.sbin/sendmail/src/daemon.c line 355

_ntohs declared in line 27; defined in line 29; used 85 times

- in line 27
- in /usr/src/lib/libc/net/res_debug.c line 95, 110-117(5), 133, 145, 157
- in /usr/src/lib/libc/net/rexec.c line 80
- in /usr/src/libexec/identd/src/crypto.c line 219-229(3)
- in /usr/src/libexec/identd/testdir/test1.c line 107
- in /usr/src/libexec/popper/pop_init.c line 105
- in /usr/src/libexec/talkd/process.c line 48, 55
- in /usr/src/libexec/tcpd/rfc931.c line 132-133(2), 147-148(2)
- in /usr/src/libexec/tftpd/tftpd.c line 160, 338-339(2), 401-402(2)
- in /usr/src/sbin/routed/af.c line 83
- in /usr/src/sbin/routed/input.c line 53, 144
- in /usr/src/sbin/routed/trace.c line 232-235(2)
- in /usr/src/sys/netinet/in.h line 172
- in /usr/src/sys/netns/ns.h line 115
- in /usr/src/ucb/talk/ctl_transact.c line 80
- in /usr/src/ucb/tftp/tftp.c line 132-133(2), 231-232(2), 348, 366-374(3)
- in /usr/src/usr.bin/uucp/aculib/bsdtcp.c line 38
- in /usr/src/usr.lib/libident/ident-tester.c line 96-101(4), 230(2)
- in /usr/src/usr.lib/libident/ident.c line 47(2)
- in /usr/src/usr.sbin/named/named/ns.h line 209
- in /usr/src/usr.sbin/named/tools/nslookup/debug.c line 91, 109-112(4), 118, 136, 148, 160
- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 154-157(4)
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 431, 476-477(3), 555-558(2)
- in /usr/src/usr.sbin/named/tools/nslookup/res_debug.c line 98, 113-120(5), 136, 148, 160
- in /usr/src/usr.sbin/named/tools/nslookup/skip.c line 91, 105, 116, 127

Last modified: 1987-05-09 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1205 |