Commit 1ce65068 authored by Bhavesh Yadav's avatar Bhavesh Yadav

Added few datastructures

parent d0bc0917
......@@ -72,15 +72,15 @@ main (int argc, char **argv)
pmap_unset (PRINTER, PRINTER_V1);
// transp = svcudp_create(RPC_ANYSOCK);
// if (transp == NULL) {
// fprintf (stderr, "%s", "cannot create udp service.");
// exit(1);
// }
// if (!svc_register(transp, PRINTER, PRINTER_V1, printer_1, IPPROTO_UDP)) {
// fprintf (stderr, "%s", "unable to register (PRINTER, PRINTER_V1, udp).");
// exit(1);
// }ma
transp = svcudp_create(RPC_ANYSOCK);
if (transp == NULL) {
fprintf (stderr, "%s", "cannot create udp service.");
exit(1);
}
if (!svc_register(transp, PRINTER, PRINTER_V1, printer_1, IPPROTO_UDP)) {
fprintf (stderr, "%s", "unable to register (PRINTER, PRINTER_V1, udp).");
exit(1);
}
int sock_fd, addrlen;
struct sockaddr_in socketAddr;
......
#include"llist.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int result;
typedef struct sockaddr_in socket_addr_t;
struct node {
unsigned int id;
socket_addr_t socket;
};
typedef struct node node;
node *finger_table[16];
node successor;
node predecessor;
int *print_list_1_svc(list *lst, struct svc_req *req)
{
list *ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment