The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

realhostname_sa (3)
  • >> realhostname_sa (3) ( FreeBSD man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    realhostname_sa
    
     - convert a
    
    Vt struct sockaddr
    
    to the real host name
     
    

    LIBRARY

    Lb libutil
    
     
    

    SYNOPSIS

       #include <sys/types.h>
       #include <netinet/in.h>
       #include <libutil.h>
    int realhostname_sa (char *host size_t hsize struct sockaddr *addr int addrlen);
     

    DESCRIPTION

    The function realhostname_sa ();
    converts addr to the corresponding host name. This is done by resolving addr to a host name and then ensuring that the host name resolves back to addr

    host must point to a buffer of at least hsize bytes, and will always be written to by this function.

    If the name resolution does not work both ways or if the host name is longer than hsize bytes, getnameinfo(3) with NI_NUMERICHOST specified, is used to convert addr to an ASCII form.

    If the string written to host is hsize bytes long, host will not be NUL terminated.  

    RETURN VALUES

    The realhostname_sa ();
    function will return one of the following constants which are defined in In libutil.h :

    HOSTNAME_FOUND
    A valid host name was found.
    HOSTNAME_INCORRECTNAME
    A host name was found, but it did not resolve back to the passed ip host now contains the numeric value of ip
    HOSTNAME_INVALIDADDR
    ip could not be resolved. host now contains the numeric value of ip
    HOSTNAME_INVALIDNAME
    A host name was found, but it could not be resolved back to any ip number. host now contains the numeric value of ip

     

    SEE ALSO

    getaddrinfo(3), getnameinfo(3), realhostname(3)


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру