k_hasafs initializes some library internal structures, and tests for the presence of AFS in the kernel, none of the other functions should be called before k_hasafs is called, or if it fails.
kafs_set_verbose set a log function that will be called each time the kafs library does something important so that the application using libkafs can output verbose logging. Calling the function kafs_set_verbose with the function argument set to NULL will stop libkafs from calling the logging function (if set).
kafs_settoken_rxkad set rxkad with the token and ticket (that have the length ticket_len) for a given cell.
kafs_settoken and kafs_settoken5 work the same way as kafs_settoken_rxkad but internally converts the Kerberos 4 or 5 credential to a afs cleartoken and ticket.
krb_afslog, and krb_afslog_uid obtains new tokens (and possibly tickets) for the specified cell and realm. If cell is NULL, the local cell is used. If realm is NULL, the function tries to guess what realm to use. Unless you have some good knowledge of what cell or realm to use, you should pass NULL. krb_afslog will use the real user-id for the ViceId field in the token, krb_afslog_uid will use uid.
krb5_afslog, and krb5_afslog_uid are the Kerberos 5 equivalents of krb_afslog, and krb_afslog_uid.
krb5_afslog, kafs_settoken5 can be configured to behave diffrently via a krb5_appdefault option afs-use-524 in krb5.conf. Possible values for afs-use-524 are: