Grep Cookies
[the Webserver part]


Defines

#define TRUE   1
#define FALSE   0

Typedefs

typedef unsigned char byte

Functions

void stuff_to_cookie (char *cookie, int session, char *user, char *pass, char *room)
 find cookie Pack all session info into one easy-to-digest cookie. Healthy and delicious!
int xtoi (char *in, size_t len)
 Convert unpacked hex string to an integer.
void cookie_to_stuff (char *cookie, int *session, char *user, size_t user_len, char *pass, size_t pass_len, char *room, size_t room_len)
 Extract all that fun stuff out of the cookie.

Detailed Description

Utility functions which convert the HTTP cookie format we use to and from user/password/room strings.

Define Documentation

#define TRUE   1

for sure?

Definition at line 15 of file cookie_conversion.c.

Referenced by CtdlDecodeBase64(), and CtdlEncodeBase64().

#define FALSE   0

nope.

Definition at line 16 of file cookie_conversion.c.

Referenced by CtdlEncodeBase64().


Typedef Documentation

typedef unsigned char byte

Byte type

Definition at line 18 of file cookie_conversion.c.


Function Documentation

void stuff_to_cookie ( char *  cookie,
int  session,
char *  user,
char *  pass,
char *  room 
)

find cookie Pack all session info into one easy-to-digest cookie. Healthy and delicious!

Parameters:
cookie cookie string to create???
session the session we want to convert into a cookie
user the user to be associated with the cookie
pass his passphrase
room the room he wants to enter

Definition at line 29 of file cookie_conversion.c.

Referenced by output_headers().

int xtoi ( char *  in,
size_t  len 
)

Convert unpacked hex string to an integer.

Parameters:
in Input hex string
len the length of the string
Returns:
the corrosponding integer value

Definition at line 48 of file cookie_conversion.c.

Referenced by cookie_to_stuff().

void cookie_to_stuff ( char *  cookie,
int *  session,
char *  user,
size_t  user_len,
char *  pass,
size_t  pass_len,
char *  room,
size_t  room_len 
)

Extract all that fun stuff out of the cookie.

Parameters:
cookie the cookie string
session the corrosponding session to return
user the user string
user_len the user stringlength
pass the passphrase
pass_len length of the passphrase string
room the room he is in
room_len the length of the room string

Definition at line 74 of file cookie_conversion.c.

References extract_int(), extract_token(), and xtoi().

Referenced by context_loop(), and session_loop().


Generated on Wed Jun 20 23:13:12 2007 for webcit by  doxygen 1.5.2