getsockname man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

getsockname(2)							getsockname(2)

       getsockname - get socket address

   AF_CCITT Only
   UNIX 03 Only (X/Open Sockets)
   Obsolescent UNIX 95 Only (X/Open Sockets)
       returns	the  local  address of the socket indicated by s, where s is a
       socket descriptor.  addr points to a socket address structure in	 which
       this  address is returned.  addrlen points to a variable that should be
       initialized to indicate the size of the address structure.   On	return
       it  contains  the  actual  size of the address returned (in bytes).  If
       addr does not point to enough space to contain the whole address of the
       socket, only the first addrlen bytes of the address are returned.

   AF_CCITT Only
       The field of the addr struct returns the X.25 addressing information of
       the local socket s.  The field of the addr struct contains the name  of
       the local X.25 interface through which the call arrived.

   X/Open Sockets Compilation Environment
       See xopen_networking(7).

       Upon  successful	 completion,  returns  0; otherwise, it returns −1 and
       sets to indicate the error.

       fails if any of the following conditions are encountered:

	      s		     is not a valid file descriptor.

	      s		     is a valid file  descriptor,  but	it  is	not  a

	      No buffer space is available to perform the operation.

	      addr	     or addrlen are not valid pointers.

	      The socket has been shut down.

	      Operation not supported for
			     AF_UNIX sockets.

	      The operation was interrupted by a signal.
			     Application  needs	 to retry the operation to get
			     the local address.

       Not all possible values are documented in this manpage due to dependen‐
       cies from the underlying protocol modules.

       Currently,  the	and  types are the same size.  This is compatible with
       the UNIX 95 and UNIX 03 profiles.  However, in a future release,	 might
       be  a  different size.  In that case, passing a pointer will evoke com‐
       pile-time warnings, which must be corrected in order for	 the  applica‐
       tion  to	 behave correctly.  Applications that use now, where appropri‐
       ate, will avoid such migration problems.	 On the other  hand,  applica‐
       tions that need to be portable to the UNIX 95 profile should follow the
       X/Open specification (see xopen_networking(7)).

       Linking binary objects compiled to  specification  and  binary  objects
       compiled	 to  specification  to the same executable may result in unex‐
       pected behavior, including application abnormal termination  and	 unex‐
       pected socket errors.  See xopen_networking(7) for details and remedy.

       Currently,  the default behavior is the however, it might be changed to
       in a future release.  At that time, any behavior that  is  incompatible
       with might be obsoleted.	 Applications that conform to the X/Open spec‐
       ification now will avoid migration problems (see xopen_networking(7)).

       was developed by HP and the University of California, Berkeley.

       bind(2),	  socket(2),   getpeername(2),	 thread_safety(5),   inet(7F),


List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net