You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
410 B
32 lines
410 B
#ifndef __CREDENTIAL_H__
|
|
#define __CREDENTIAL_H__
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include "class.h"
|
|
|
|
#define CRED_PWD(c) (((c)->cred).pwd)
|
|
|
|
typedef enum e_CredentialType {
|
|
CRED_PASSWORD = 0
|
|
} CredentialType;
|
|
|
|
|
|
CLASS(Credential) {
|
|
CredentialType type;
|
|
|
|
union {
|
|
|
|
struct {
|
|
char * user;
|
|
size_t nuser;
|
|
char * pass;
|
|
size_t npass;
|
|
} pwd;
|
|
|
|
} cred;
|
|
};
|
|
|
|
#endif // __CREDENTIAL_H__
|
|
|
|
// vim: set ts=4 sw=4:
|