VMS Help
TCPIP Services, Programming Interfaces, Sockets API, getprotobyname()

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Searches the protocols database until a matching protocol name is
    found or until end of file is encountered.
    Format
      #include  <netdb.h>
      struct protoent *getprotobyname  ( char *name );

  1 - Argument

 name
    A pointer to a string containing the desired protocol name.

  2 - Description

    This function returns a pointer to a protoent structure
    containing data from the protocols database:
    struct  protoent {
            char   *p_name;       /* official name of protocol */
            char   **p_aliases;   /* alias list */
            long   p_proto;       /* protocol number */
    };
    The members of this structure are:
    p_name             The official name of the protocol.
    p_aliases          A zero-terminated list of alternate names for
                       the protocol.
    p_proto            The protocol number.
    All information is contained in a static area, so it must be
    copied to be saved.
    Related Functions
    See also getprotoent() and getprotobynumber().

  3 - Return Values

    NULL               Indicates end of file or an error; errno is
                       set to one of the following values.
    x                  A pointer to a protoent structure.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.