krb5_auth_con_genaddrs()--Generate Local and Remote Addresses
Syntax
#include <krb5.h> krb5_error_code krb5_auth_con_genaddrs( krb5_context context, krb5_auth_context auth_context, int fd, int flags);
Service Program Name: QSYS/QKRBGSS
Default Public Authority: *USE
Threadsafe: Conditional. See Usage Notes.
The krb5_auth_con_genaddrs() function generates local and remote network addresses from a socket descriptor and places them in an authentication context.
Authorities
No authorities are required.
Parameters
- context (Input)
- The Kerberos context.
- auth_context (Input)
- The authentication context.
- fd (Input)
- The socket descriptor to be used.
- flags (Input)
- The address generation flags as follows:
KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR (x'00000001') Generate the local network address. KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR ('x00000004') Generate the local network address and the local port. KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR (x'00000002') Generate the remote network address. KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR (x'00000008') Generate the remote network address and the remote port.
Return Value
If no errors occur, the return value is 0. Otherwise, a Kerberos error code is returned.
Error Messages
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
Usage Notes
- The addresses generated by this routine can be retrieved by the application
by calling krb5_auth_con_getaddrs() and
krb5_auth_con_getports().
- The socket must have been created using the AF_INET
address family. The socket must be in the connected state if the remote network
address is to be generated.
- The Kerberos protocol runtime provides no concurrency control for the authentication context. If the application wants to use the same authentication context in multiple threads, it is the responsibility of the application to serialize access to the authentication context so that only a single thread is accessing the authentication context at any time.
API introduced: V5R1
[ Back to top | Security APIs | UNIX-Type APIs | APIs by category ]