1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-26 22:26:27 +02:00
openwrt-xburst/package/ead/src/tinysrp/tinysrp.h
nbd 85f89d5d09 add the 'ead' package (emergency access daemon),
which can provide remote access to your device, even if the ip
and firewall settings are broken

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13738 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-12-24 10:42:12 +00:00

19 lines
575 B
C

/* Simple API for the tinysrp library. */
#ifndef T_PWD_H
#define MAXUSERLEN 32
#define SESSION_KEY_LEN 40 /* 320-bit session key */
#endif
typedef struct {
char username[MAXUSERLEN + 1];
unsigned char key[SESSION_KEY_LEN];
} TSRP_SESSION;
/* These functions are passed a connected socket, and return true for a
successful authentication. If tsrp is not NULL, the username and key
fields are filled in. */
extern int tsrp_server_authenticate(int s, TSRP_SESSION *tsrp);
extern int tsrp_client_authenticate(int s, char *user, char *pass, TSRP_SESSION *tsrp);