home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / acorn / 10155 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  2.4 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!glasgow!unix.brighton.ac.uk!rjb12
  2. From: rjb12@unix.brighton.ac.uk (Titch)
  3. Newsgroups: comp.sys.acorn
  4. Subject: Re: I can view MPEG movies!
  5. Message-ID: <1992Dec17.093509.1530@unix.brighton.ac.uk>
  6. Date: 17 Dec 92 09:35:09 GMT
  7. References: <memo.814376@cix.compulink.co.uk>
  8. Organization: University of Brighton, UK
  9. Lines: 72
  10.  
  11. plebeau@cix.compulink.co.uk (Paul Lebeau) writes:
  12. > ***************
  13. > Finally a request for any UNIX experts out there...
  14. > The sources call the following routine:
  15. > int  htonl(int)
  16. > It's not in the sources, so it must be some sort of library call.
  17. > I have the PD Unix library replacement, but it's not in there.
  18. > Can anybody tell me what this function does?
  19. > ***************
  20.  
  21. Here's what the Uni's SUN says about it ...
  22. -=-=-=-=-=-=-=-=-= CUT HERE -=-=-=-=-=-=-=-=-=
  23. BYTEORDER(3N)           NETWORK FUNCTIONS           BYTEORDER(3N)
  24.  
  25.  
  26.  
  27. NAME
  28.      byteorder, htonl,  htons,  ntohl,  ntohs  -  convert  values
  29.      between host and network byte order
  30.  
  31. SYNOPSIS
  32.      #include <sys/types.h>
  33.      #include <netinet/in.h>
  34.  
  35.      netlong = htonl(hostlong);
  36.      u_long netlong, hostlong;
  37.  
  38.      netshort = htons(hostshort);
  39.      u_short netshort, hostshort;
  40.  
  41.      hostlong = ntohl(netlong);
  42.      u_long hostlong, netlong;
  43.  
  44.      hostshort = ntohs(netshort);
  45.      u_short hostshort, netshort;
  46.  
  47. DESCRIPTION
  48.      These routines convert 16 and 32 bit quantities between net-
  49.      work  byte  order  and host byte order.  On Sun-2, Sun-3 and
  50.      Sun-4 systems, these routines are defined as NULL macros  in
  51.      the  include file <netinet/in.h>.  On Sun386i systems, these
  52.      routines are functional since its host byte  order  is  dif-
  53.      ferent from network byte order.
  54.  
  55.      These routines are  most  often  used  in  conjunction  with
  56.      Internet  addresses  and ports as returned by gethostent(3N)
  57.      and getservent(3N).
  58.  
  59. SEE ALSO
  60.      gethostent(3N), getservent(3N)
  61.  
  62.  
  63. Sun Release 4.1   Last change: 18 February 1988                 1
  64. -=-=-=-=-=-=-=-= CUT HERE -=-=-=-=-=-=-=
  65.  
  66.  
  67. > Cheers
  68. > Paul
  69.  
  70. Cheers,
  71.  
  72. Rich.
  73. -- 
  74. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  75. Rich Browning (rjb12@bton.unix)   * The Intel Plentium: Ethernet controller  
  76. Department of Computer Science    * or fiendish knitting pattern?          
  77. University of Brighton            * What!? It's a PROCESSOR???            
  78. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  79.