/*******************************************************************
 *                  Light Weight Chord Library 1.0                 *
 *  CopyRight(C) Yoshihide Matsumoto IDEON WorkingGroup 2003,2004  *
 *      matsumoto333@yahoo.co.jp (http://www.matchan.mydns.jp)     *
 *                                                                 *
 * Implementation of chord (Distributed Hash Table)                *
 * This program is distributed under GPL                           *
 * Light Weight Chord Library comes with ABSOLUTELY NO WARRANTY.   *
 * This is free software, and you are welcome to redistribute it   *
 * under certain conditions; read `COPYING' for details.           *
 *******************************************************************/

#ifndef __APPLIST
#define __APPLIST

typedef struct _APPLIST {

  int  ip;
  int  port;
  char *name;
  struct _APPLIST *prev;
  struct _APPLIST *next;
}APPLIST;

#endif

APPLIST *app_insert(APPLIST **phead, int ip, int port, char *name);
APPLIST *app_delete_key(APPLIST **phead, int ip, int port);
APPLIST *app_delete(APPLIST **phead, APPLIST *pdel);


APPLIST *app_search(APPLIST *plist, int ip);
int  app_size(APPLIST *plist);
void app_print(APPLIST **plist);

