Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


inet.h
001: /* Copyright (C) 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
002:    This file is part of the GNU C Library.
003: 
004:    The GNU C Library is free software; you can redistribute it and/or
005:    modify it under the terms of the GNU Lesser General Public
006:    License as published by the Free Software Foundation; either
007:    version 2.1 of the License, or (at your option) any later version.
008: 
009:    The GNU C Library is distributed in the hope that it will be useful,
010:    but WITHOUT ANY WARRANTY; without even the implied warranty of
011:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:    Lesser General Public License for more details.
013: 
014:    You should have received a copy of the GNU Lesser General Public
015:    License along with the GNU C Library; if not, write to the Free
016:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
017:    02111-1307 USA.  */
018: 
019: #ifndef _ARPA_INET_H
020: #define _ARPA_INET_H    1
021: 
022: #include <features.h>
023: #include <netinet/in.h>         /* To define `struct in_addr'.  */
024: 
025: /* Type for length arguments in socket calls.  */
026: #ifndef __socklen_t_defined
027: typedef __socklen_t socklen_t;
028: # define __socklen_t_defined
029: #endif
030: 
031: __BEGIN_DECLS
032: 
033: /* Convert Internet host address from numbers-and-dots notation in CP
034:    into binary data in network byte order.  */
035: extern in_addr_t inet_addr (__const char *__cp) __THROW;
036: 
037: /* Return the local host address part of the Internet address in IN.  */
038: extern in_addr_t inet_lnaof (struct in_addr __in) __THROW;
039: 
040: /* Make Internet host address in network byte order by combining the
041:    network number NET with the local address HOST.  */
042: extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
043:      __THROW;
044: 
045: /* Return network number part of the Internet address IN.  */
046: extern in_addr_t inet_netof (struct in_addr __in) __THROW;
047: 
048: /* Extract the network number in network byte order from the address
049:    in numbers-and-dots natation starting at CP.  */
050: extern in_addr_t inet_network (__const char *__cp) __THROW;
051: 
052: /* Convert Internet number in IN to ASCII representation.  The return value
053:    is a pointer to an internal array containing the string.  */
054: extern char *inet_ntoa (struct in_addr __in) __THROW;
055: 
056: /* Convert from presentation format of an Internet number in buffer
057:    starting at CP to the binary network format and store result for
058:    interface type AF in buffer starting at BUF.  */
059: extern int inet_pton (int __af, __const char *__restrict __cp,
060:                       void *__restrict __buf) __THROW;
061: 
062: /* Convert a Internet address in binary network format for interface
063:    type AF in buffer starting at CP to presentation form and place
064:    result in buffer of length LEN astarting at BUF.  */
065: extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
066:                                 char *__restrict __buf, socklen_t __len)
067:      __THROW;
068: 
069: 
070: /* The following functions are not part of XNS 5.2.  */
071: #ifdef __USE_MISC
072: /* Convert Internet host address from numbers-and-dots notation in CP
073:    into binary data and store the result in the structure INP.  */
074: extern int inet_aton (__const char *__cp, struct in_addr *__inp) __THROW;
075: 
076: /* Format a network number NET into presentation format and place result
077:    in buffer starting at BUF with length of LEN bytes.  */
078: extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
079: 
080: /* Convert network number for interface type AF in buffer starting at
081:    CP to presentation format.  The result will specifiy BITS bits of
082:    the number.  */
083: extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
084:                             char *__buf, size_t __len) __THROW;
085: 
086: /* Convert network number for interface type AF from presentation in
087:    buffer starting at CP to network format and store result int
088:    buffer starting at BUF of size LEN.  */
089: extern int inet_net_pton (int __af, __const char *__cp,
090:                           void *__buf, size_t __len) __THROW;
091: 
092: /* Convert ASCII representation in hexadecimal form of the Internet
093:    address to binary form and place result in buffer of length LEN
094:    starting at BUF.  */
095: extern unsigned int inet_nsap_addr (__const char *__cp,
096:                                     unsigned char *__buf, int __len) __THROW;
097: 
098: /* Convert internet address in binary form in LEN bytes starting at CP
099:    a presentation form and place result in BUF.  */
100: extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
101:                              char *__buf) __THROW;
102: #endif
103: 
104: __END_DECLS
105: 
106: #endif /* arpa/inet.h */
107: 


for client 52.14.130.13
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/