WhiteBoard Project using C RPC
A Project in Distributed Computing at IIIT-Delhi
server.c File Reference
#include "wb.h"
Include dependency graph for server.c:

Go to the source code of this file.

Data Structures

struct  ListNode
 
struct  AClient
 
struct  ABoard
 

Typedefs

typedef struct ListNode ListNode
 
typedef struct AClient AClient
 
typedef struct ABoard ABoard
 

Functions

static void insert (ListNode **hdr, ListNode *p)
 
static void delete (ListNode **hdr, ListNode *d)
 
static ABoardfind_wbp (char *nm)
 
int * addclient_1_svc (ClientData *cd, struct svc_req *srq)
 
static void die (int dummy)
 
static void delboard (ABoard *ab)
 
int * delclient_1_svc (ClientData *cd, struct svc_req *srq)
 
int * addline_1_svc (AddLineArg *ap, struct svc_req *srq)
 
Linep * sendallmylines_1_svc (ClientData *cd, struct svc_req *srq)
 

Variables

static ABoardboards = NULL
 

Typedef Documentation

◆ ABoard

typedef struct ABoard ABoard

◆ AClient

typedef struct AClient AClient

◆ ListNode

typedef struct ListNode ListNode

Function Documentation

◆ addclient_1_svc()

int* addclient_1_svc ( ClientData *  cd,
struct svc_req *  srq 
)

Definition at line 68 of file server.c.

References AClient::callback, AClient::clientdata, ABoard::clients, find_wbp(), insert(), and ABoard::lines.

Here is the call graph for this function:

◆ addline_1_svc()

int* addline_1_svc ( AddLineArg *  ap,
struct svc_req *  srq 
)

Definition at line 166 of file server.c.

References AClient::callback, callbackfromwbs_1(), ABoard::clients, find_wbp(), insert(), ABoard::lines, and AClient::next.

Here is the call graph for this function:

◆ delboard()

static void delboard ( ABoard ab)
static

Definition at line 111 of file server.c.

References ABoard::lines.

Referenced by delclient_1_svc().

Here is the caller graph for this function:

◆ delclient_1_svc()

int* delclient_1_svc ( ClientData *  cd,
struct svc_req *  srq 
)

◆ delete()

static void delete ( ListNode **  hdr,
ListNode d 
)
static

Definition at line 21 of file server.c.

References ListNode::next.

◆ die()

static void die ( int  dummy)
static

Definition at line 105 of file server.c.

References pmap_unset().

Referenced by delclient_1_svc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_wbp()

static ABoard* find_wbp ( char *  nm)
static

Definition at line 53 of file server.c.

References AClient::clientdata, ABoard::clients, and ABoard::next.

Referenced by addclient_1_svc(), addline_1_svc(), delclient_1_svc(), and sendallmylines_1_svc().

Here is the caller graph for this function:

◆ insert()

static void insert ( ListNode **  hdr,
ListNode p 
)
static

Definition at line 13 of file server.c.

References ListNode::next.

Referenced by addclient_1_svc(), and addline_1_svc().

Here is the caller graph for this function:

◆ sendallmylines_1_svc()

Linep* sendallmylines_1_svc ( ClientData *  cd,
struct svc_req *  srq 
)

Definition at line 195 of file server.c.

References find_wbp(), and ABoard::lines.

Here is the call graph for this function:

Variable Documentation

◆ boards

ABoard* boards = NULL
static

Definition at line 49 of file server.c.