Check these out from authd-framework-2.
This commit is contained in:
parent
9b24cbdecc
commit
cdf1592915
2 changed files with 1 additions and 23 deletions
|
@ -50,15 +50,10 @@ struct dns_query
|
||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
extern void format_address(struct rb_sockaddr_storage *addr, char *buffer, size_t length);
|
|
||||||
extern bool sockcmp(struct rb_sockaddr_storage *addr, struct rb_sockaddr_storage *addr2, int family);
|
|
||||||
=======
|
|
||||||
extern struct dns_query *lookup_hostname(const char *ip, DNSCB callback, void *data);
|
extern struct dns_query *lookup_hostname(const char *ip, DNSCB callback, void *data);
|
||||||
extern struct dns_query *lookup_ip(const char *host, int aftype, DNSCB callback, void *data);
|
extern struct dns_query *lookup_ip(const char *host, int aftype, DNSCB callback, void *data);
|
||||||
extern void cancel_query(struct dns_query *query);
|
extern void cancel_query(struct dns_query *query);
|
||||||
|
|
||||||
>>>>>>> authd-framework-2
|
|
||||||
extern void resolve_dns(int parc, char *parv[]);
|
extern void resolve_dns(int parc, char *parv[]);
|
||||||
extern void enumerate_nameservers(const char *rid, const char letter);
|
extern void enumerate_nameservers(const char *rid, const char letter);
|
||||||
extern void reload_nameservers(const char letter);
|
extern void reload_nameservers(const char letter);
|
||||||
|
|
|
@ -39,10 +39,6 @@ struct auth_client
|
||||||
{
|
{
|
||||||
uint16_t cid; /* Client ID */
|
uint16_t cid; /* Client ID */
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
struct rb_sockaddr_storage l_addr; /* Listener IP address */
|
|
||||||
struct rb_sockaddr_storage c_addr; /* Client IP address */
|
|
||||||
=======
|
|
||||||
char l_ip[HOSTIPLEN + 1]; /* Listener IP address */
|
char l_ip[HOSTIPLEN + 1]; /* Listener IP address */
|
||||||
uint16_t l_port; /* Listener port */
|
uint16_t l_port; /* Listener port */
|
||||||
struct rb_sockaddr_storage l_addr; /* Listener address/port */
|
struct rb_sockaddr_storage l_addr; /* Listener address/port */
|
||||||
|
@ -50,23 +46,10 @@ struct auth_client
|
||||||
char c_ip[HOSTIPLEN + 1]; /* Client IP address */
|
char c_ip[HOSTIPLEN + 1]; /* Client IP address */
|
||||||
uint16_t c_port; /* Client port */
|
uint16_t c_port; /* Client port */
|
||||||
struct rb_sockaddr_storage c_addr; /* Client address/port */
|
struct rb_sockaddr_storage c_addr; /* Client address/port */
|
||||||
>>>>>>> authd-framework-2
|
|
||||||
|
|
||||||
char hostname[HOSTLEN + 1]; /* Used for DNS lookup */
|
char hostname[HOSTLEN + 1]; /* Used for DNS lookup */
|
||||||
char username[USERLEN + 1]; /* Used for ident lookup */
|
char username[USERLEN + 1]; /* Used for ident lookup */
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
unsigned int providers; /* Providers at work,
|
|
||||||
* none left when set to 0 */
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef bool (*provider_init_t)(void);
|
|
||||||
typedef bool (*provider_perform_t)(struct auth_client *);
|
|
||||||
typedef void (*provider_complete_t)(struct auth_client *, provider_t provider);
|
|
||||||
typedef void (*provider_cancel_t)(struct auth_client *);
|
|
||||||
typedef void (*provider_destroy_t)(void);
|
|
||||||
|
|
||||||
=======
|
|
||||||
uint32_t providers; /* Providers at work,
|
uint32_t providers; /* Providers at work,
|
||||||
* none left when set to 0 */
|
* none left when set to 0 */
|
||||||
uint32_t providers_done; /* Providers completed */
|
uint32_t providers_done; /* Providers completed */
|
||||||
|
@ -81,7 +64,6 @@ typedef bool (*provider_start_t)(struct auth_client *);
|
||||||
typedef void (*provider_cancel_t)(struct auth_client *);
|
typedef void (*provider_cancel_t)(struct auth_client *);
|
||||||
typedef void (*provider_complete_t)(struct auth_client *, provider_t);
|
typedef void (*provider_complete_t)(struct auth_client *, provider_t);
|
||||||
|
|
||||||
>>>>>>> authd-framework-2
|
|
||||||
struct auth_provider
|
struct auth_provider
|
||||||
{
|
{
|
||||||
rb_dlink_node node;
|
rb_dlink_node node;
|
||||||
|
@ -118,6 +100,7 @@ void reject_client(struct auth_client *auth, provider_t id, const char *reason);
|
||||||
|
|
||||||
void handle_new_connection(int parc, char *parv[]);
|
void handle_new_connection(int parc, char *parv[]);
|
||||||
|
|
||||||
|
/* Provider is operating on this auth_client (set this if you have async work to do) */
|
||||||
static inline void set_provider_on(struct auth_client *auth, provider_t provider)
|
static inline void set_provider_on(struct auth_client *auth, provider_t provider)
|
||||||
{
|
{
|
||||||
auth->providers |= (1 << provider);
|
auth->providers |= (1 << provider);
|
||||||
|
|
Loading…
Reference in a new issue