anet-checkins Mailing List for ANet
Status: Abandoned
Brought to you by:
benad
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(17) |
Dec
(29) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(29) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Benoit N. <be...@us...> - 2002-05-06 23:19:47
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux In directory usw-pr-cvs1:/tmp/cvs-serv4430 Modified Files: Makefile Removed Files: Makefile.in build_exclusion.txt build_locations.txt build_makefile.pl Log Message: Cleaned up Makefile Index: Makefile =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 1 Dec 2001 21:59:38 -0000 1.6 --- Makefile 6 May 2002 23:19:45 -0000 1.7 *************** *** 1,30 **** ! SHELL = /bin/sh ! all: build ! Makefile_real.out: ! perl build_makefile.pl > Makefile.in2 ! cat Makefile.in Makefile.in2 > Makefile_real.out ! rm -f Makefile.in2 ! build: Makefile_real.out ! @$(MAKE) -j --no-print-directory -f Makefile_real.out ! build_clean: ! rm -f *.o ! clean: ! rm -f anetd ! rm -f *.o ! rm -f Makefile.in2 ! rm -f Makefile_real.out ! rebuild: ! rm -f Makefile.out ! perl build_makefile.pl > Makefile.in2 ! cat Makefile.in Makefile.in2 > Makefile_real.out ! rm -f Makefile.in2 ! @$(MAKE) -j --no-print-directory -f Makefile_real.out ! .PHONY: all build clean rebuild --- 1,38 ---- ! # Change SOURCE for the source files and PATHS to where the source files ! # and the header files will be searched. The file names MUST be unique ! # throughout the project. ! SOURCE = main.c XMLParser.c Args.c Memory.c LinkedLists.c BinaryTrees.c DoubleLinkedLists.c ! PATHS = . .. ../Common ../Core ../Client_Interface ../Common/Lists ! # Compiler and linker settings. ! EXECUTABLE_NAME = anetd ! CC = gcc ! CFLAGS = -g -I/usr/include/gnome-xml ! LDLIBS = -lm -lxml ! # Everything below is automatic. ! # Yep. The cleanest, smartest Makefile I've seen. ! # Only one dependency file ("deps"), all the binaries stay in the ! # current directory, everything is clean, NO shell script... ! all: deps $(EXECUTABLE_NAME) ! OBJECTS = $(SOURCE:%.c=%.o) ! CFLAGS += $(patsubst %, -I%, $(PATHS)) ! vpath %.h $(PATHS) ! vpath %.c $(PATHS) ! deps: $(OBJECTS) $(SOURCE) ! $(CC) -MM $(CFLAGS) $(filter %.c, $^) > deps ! include deps ! $(EXECUTABLE_NAME): $(OBJECTS) ! $(CC) $(LDFLAGS) -o $(EXECUTABLE_NAME) $(LOADLIBES) $(LDLIBS) $^ + clean: + rm -f *.o + rm -f $(EXECUTABLE_NAME) + rm -f deps + + .PHONY: all clean \ No newline at end of file --- Makefile.in DELETED --- --- build_exclusion.txt DELETED --- --- build_locations.txt DELETED --- --- build_makefile.pl DELETED --- |
From: Prasanna G. <gpr...@us...> - 2002-01-29 22:21:38
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux/Samples In directory usw-pr-cvs1:/tmp/cvs-serv31581 Added Files: AsyncTCPServer.c AsyncUDPServer.c SyncTCPServer.c SyncUDPServer.c TCPClient.c UDPClient.c Log Message: "" --- NEW FILE: AsyncTCPServer.c --- #include <stdio.h> /* for printf() and fprintf() */ #include <sys/socket.h> /* for socket(), bind(), and connect() */ #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */ #include <stdlib.h> /* for atoi() */ #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #define MAXPENDING 5 /* Maximum outstanding connection requests */ #define RCVBUFSIZE 11 /* Size of receive buffer */ void DieWithError(char *errorMessage) { /* Error handling function */ perror(errorMessage); exit(1); } int main(int argc, char *argv[]) { int servSock; /* Socket descriptor for server */ int clntSock; /* Socket descriptor for client */ struct sockaddr_in servAddr; /* Local address */ struct sockaddr_in clntAddr; /* Client address */ fd_set rset,wset; /* File Descriptor for read and write */ unsigned short servPort; /* Server port */ unsigned int clntLen; /* Length of client address data structure */ struct timeval tv = {0,0}; /* Timeout value for select */ char sendBuffer[RCVBUFSIZE]; /* Buffer for send string */ int recvMsgSize; /* Size of received message */ int noOfPacktoSend; /* No of Packet to send */ char recvBuffer[RCVBUFSIZE]; /* Buffer for receving string */ if (argc != 2) /* Test for correct number of arguments */ { fprintf(stderr, "Usage: %s <Server Port>\n", argv[0]); exit(1); } servPort = atoi(argv[1]); /* First arg: local port */ /* Create socket for incoming connections */ if ((servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) DieWithError("socket() failed"); /* Construct local address structure */ memset(&servAddr, 0, sizeof(servAddr)); /* Zero out structure */ servAddr.sin_family = AF_INET; /* Internet address family */ servAddr.sin_addr.s_addr = htonl(INADDR_ANY); /* Any incoming interface */ servAddr.sin_port = htons(servPort); /* Local port */ /* Bind to the local address */ if (bind(servSock, (struct sockaddr *) &servAddr, sizeof(servAddr)) < 0) DieWithError("bind() failed"); /* Mark the socket so it will listen for incoming connections */ if (listen(servSock, MAXPENDING) < 0) DieWithError("listen() failed"); /* Set the size of the in-out parameter */ clntLen = sizeof(clntAddr); /* Wait for a client to connect */ if ((clntSock = accept(servSock, (struct sockaddr *) &clntAddr, &clntLen)) < 0) DieWithError("accept() failed"); /* clntSock is connected to a client! */ /* Receive message from client */ if ((recvMsgSize = recv(clntSock, recvBuffer, RCVBUFSIZE, 0)) < 0) DieWithError("recv() failed"); noOfPacktoSend = (int) atoi(recvBuffer); printf("No of Packets to send = %d\n",noOfPacktoSend); /* Send received string and receive again until end of transmission */ while(1) { FD_ZERO(&rset); FD_ZERO(&wset); FD_SET(clntSock,&rset); FD_SET(clntSock,&wset); select(clntSock+1,&rset,&wset,NULL,&tv); if (FD_ISSET(clntSock,&rset)) { /* See if there is more data to receive */ if ((recvMsgSize = recv(clntSock, recvBuffer, RCVBUFSIZE,0)) < 0) DieWithError("recv() failed"); recvBuffer[recvMsgSize] ='\0'; sleep(5); printf("receiving : %s\n",recvBuffer); if (!strcmp(recvBuffer,"Closed") || recvMsgSize > 3) break; } if (FD_ISSET(clntSock,&wset)) { if (noOfPacktoSend >= 0) { memset(sendBuffer,0,RCVBUFSIZE); if (!noOfPacktoSend) { strcpy(sendBuffer,"Disconnect"); } else { sprintf(sendBuffer,"%10d",rand() % 1000); } if (send(clntSock, sendBuffer, strlen(sendBuffer), 0) != strlen(sendBuffer)) DieWithError("send() failed"); noOfPacktoSend--; printf("Sending : %s\n",sendBuffer); } } } close(clntSock); } --- NEW FILE: AsyncUDPServer.c --- #include <stdio.h> /* for printf() and fprintf() */ #include <sys/socket.h> /* for socket() and bind() */ #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */ #include <stdlib.h> /* for atoi() */ #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #define STRMAX 10 /* Longest string to send or receive */ void DieWithError(char *errorMessage) /* External error handling function */ { perror(errorMessage); exit(1); } int main(int argc, char *argv[]) { int sock; /* Socket */ struct sockaddr_in servAddr; /* Local address */ struct sockaddr_in clntAddr; /* Client address */ fd_set rset,wset; /* File Descriptor for read and write */ unsigned int cliAddrLen; /* Length of incoming message */ char sendBuffer[STRMAX]; /* Buffer for send and receiving string */ unsigned short servPort; /* Server port */ int recvMsgSize; /* Size of received message */ int noOfPacktoSend; /* No of Pack to be send */ struct timeval tv = {0,0}; /* Timeout value for select */ if (argc != 2) /* Test for correct number of parameters */ { fprintf(stderr,"Usage: %s <UDP SERVER PORT>\n", argv[0]); exit(1); } servPort = atoi(argv[1]); /* First arg: local port */ /* Create socket for sending/receiving datagrams */ if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) DieWithError("socket() failed"); /* Construct local address structure */ memset(&servAddr, 0, sizeof(servAddr)); /* Zero out structure */ servAddr.sin_family = AF_INET; /* Internet address family */ servAddr.sin_addr.s_addr = htonl(INADDR_ANY); /* Any incoming interface */ servAddr.sin_port = htons(servPort); /* Local port */ /* Bind to the local address */ if (bind(sock, (struct sockaddr *) &servAddr, sizeof(servAddr)) < 0) DieWithError("bind() failed"); /* Set the size of the in-out parameter */ cliAddrLen = sizeof(clntAddr); /* Block until receive message from a client */ if ((recvMsgSize = recvfrom(sock, sendBuffer, STRMAX, 0, (struct sockaddr *) &clntAddr, &cliAddrLen)) < 0) DieWithError("recvfrom() failed"); printf("Handling client %s\n", inet_ntoa(clntAddr.sin_addr)); noOfPacktoSend = (int) atoi(sendBuffer); printf("No of UDP Packets to send = %d\n",noOfPacktoSend); while(1) { FD_ZERO(&rset); FD_ZERO(&wset); FD_SET(sock,&rset); FD_SET(sock,&wset); select(sock+1,&rset,&wset,NULL,&tv); if (FD_ISSET(sock,&wset)) { if (noOfPacktoSend >= 0) { if (!noOfPacktoSend) { strcpy(sendBuffer,"Disconnect"); } else { sprintf(sendBuffer,"%9d",rand() % 1000); } /* Send received datagram back to the client */ if (sendto(sock, sendBuffer, strlen(sendBuffer), 0, (struct sockaddr *) &clntAddr, sizeof(clntAddr)) != strlen(sendBuffer)) DieWithError("sendto() sent a different number of bytes than expected"); printf("Sending : %s\n",sendBuffer); noOfPacktoSend--; } } if (FD_ISSET(sock,&rset)) { if ((recvMsgSize = recvfrom(sock, sendBuffer, STRMAX, 0, (struct sockaddr *) &clntAddr, &cliAddrLen)) < 0) DieWithError("recvfrom() failed"); sendBuffer[recvMsgSize] = '\0'; printf("Receiving : %s\n",sendBuffer); if (!strcmp(sendBuffer,"Closed")) break; } } close(sock); /* NOT REACHED */ } --- NEW FILE: SyncTCPServer.c --- #include <stdio.h> /* for printf() and fprintf() */ #include <sys/socket.h> /* for socket(), bind(), and connect() */ #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */ #include <stdlib.h> /* for atoi() */ #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #define MAXPENDING 5 /* Maximum outstanding connection requests */ #define RCVBUFSIZE 11 /* Size of receive buffer */ void DieWithError(char *errorMessage) { /* Error handling function */ perror(errorMessage); exit(1); } int HandleTCPClient(int clntSocket) { /* TCP client handling function */ char sendBuffer[RCVBUFSIZE]; /* Buffer for send string */ int recvMsgSize; /* Size of received message */ int noOfPacktoSend; /* No of Packet to send */ char recvBuffer[RCVBUFSIZE]; /* Buffer for receving string */ /* Receive message from client */ if ((recvMsgSize = recv(clntSocket, recvBuffer, RCVBUFSIZE, 0)) < 0) DieWithError("recv() failed"); noOfPacktoSend = (int) atoi(recvBuffer); printf("No of Packets to send = %d\n",noOfPacktoSend); /* Send received string and receive again until end of transmission */ while (1) /* zero indicates end of transmission */ { memset(sendBuffer,0,RCVBUFSIZE); if (!noOfPacktoSend) { strcpy(sendBuffer,"Disconnect"); } else { sprintf(sendBuffer,"%5d",rand() % 1000 ); } if (send(clntSocket, sendBuffer, strlen(sendBuffer), 0) != strlen(sendBuffer)) DieWithError("send() failed"); /* See if there is more data to receive */ if ((recvMsgSize = recv(clntSocket, recvBuffer, RCVBUFSIZE,0)) < 0) DieWithError("recv() failed"); recvBuffer[recvMsgSize] ='\0'; printf("Sending : %s\tReceiving : %s\n",sendBuffer,recvBuffer); if (!strcmp(recvBuffer,"Closed")) break; noOfPacktoSend--; } close(clntSocket); /* Close client socket */ return 1; } int main(int argc, char *argv[]) { int servSock; /* Socket descriptor for server */ int clntSock; /* Socket descriptor for client */ struct sockaddr_in servAddr; /* Local address */ struct sockaddr_in clntAddr; /* Client address */ unsigned short servPort; /* Server port */ unsigned int clntLen; /* Length of client address data structure */ if (argc != 2) /* Test for correct number of arguments */ { fprintf(stderr, "Usage: %s <Server Port>\n", argv[0]); exit(1); } servPort = atoi(argv[1]); /* First arg: local port */ /* Create socket for incoming connections */ if ((servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) DieWithError("socket() failed"); /* Construct local address structure */ memset(&servAddr, 0, sizeof(servAddr)); /* Zero out structure */ servAddr.sin_family = AF_INET; /* Internet address family */ servAddr.sin_addr.s_addr = htonl(INADDR_ANY); /* Any incoming interface */ servAddr.sin_port = htons(servPort); /* Local port */ /* Bind to the local address */ if (bind(servSock, (struct sockaddr *) &servAddr, sizeof(servAddr)) < 0) DieWithError("bind() failed"); /* Mark the socket so it will listen for incoming connections */ if (listen(servSock, MAXPENDING) < 0) DieWithError("listen() failed"); for (;;) /* Run forever */ { /* Set the size of the in-out parameter */ clntLen = sizeof(clntAddr); /* Wait for a client to connect */ if ((clntSock = accept(servSock, (struct sockaddr *) &clntAddr, &clntLen)) < 0) DieWithError("accept() failed"); /* clntSock is connected to a client! */ printf("Handling client %s\n", inet_ntoa(clntAddr.sin_addr)); if (HandleTCPClient(clntSock)) break; } /* NOT REACHED */ } --- NEW FILE: SyncUDPServer.c --- #include <stdio.h> /* for printf() and fprintf() */ #include <sys/socket.h> /* for socket() and bind() */ #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */ #include <stdlib.h> /* for atoi() */ #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #define STRMAX 255 /* Longest string to send or receive */ void DieWithError(char *errorMessage) /* External error handling function */ { perror(errorMessage); exit(1); } int main(int argc, char *argv[]) { int sock; /* Socket */ struct sockaddr_in servAddr; /* Local address */ struct sockaddr_in clntAddr; /* Client address */ unsigned int cliAddrLen; /* Length of incoming message */ char sendBuffer[STRMAX]; /* Buffer for send and receiving string */ unsigned short servPort; /* Server port */ int recvMsgSize; /* Size of received message */ int noOfPacktoSend; /* No of Pack to be send */ if (argc != 2) /* Test for correct number of parameters */ { fprintf(stderr,"Usage: %s <UDP SERVER PORT>\n", argv[0]); exit(1); } servPort = atoi(argv[1]); /* First arg: local port */ /* Create socket for sending/receiving datagrams */ if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) DieWithError("socket() failed"); /* Construct local address structure */ memset(&servAddr, 0, sizeof(servAddr)); /* Zero out structure */ servAddr.sin_family = AF_INET; /* Internet address family */ servAddr.sin_addr.s_addr = htonl(INADDR_ANY); /* Any incoming interface */ servAddr.sin_port = htons(servPort); /* Local port */ /* Bind to the local address */ if (bind(sock, (struct sockaddr *) &servAddr, sizeof(servAddr)) < 0) DieWithError("bind() failed"); for (;;) /* Run forever */ { /* Set the size of the in-out parameter */ cliAddrLen = sizeof(clntAddr); /* Block until receive message from a client */ if ((recvMsgSize = recvfrom(sock, sendBuffer, STRMAX, 0, (struct sockaddr *) &clntAddr, &cliAddrLen)) < 0) DieWithError("recvfrom() failed"); printf("Handling client %s\n", inet_ntoa(clntAddr.sin_addr)); noOfPacktoSend = (int) atoi(sendBuffer); printf("No of UDP Packets to send = %d\n",noOfPacktoSend); while(1) { if (!noOfPacktoSend) { strcpy(sendBuffer,"Disconnect"); if (sendto(sock, sendBuffer, strlen(sendBuffer), 0, (struct sockaddr *) &clntAddr, sizeof(clntAddr)) != strlen(sendBuffer)) DieWithError("sendto() sent a different number of bytes than expected"); } else { sprintf(sendBuffer,"%d",rand()); /* Send received datagram back to the client */ if (sendto(sock, sendBuffer, strlen(sendBuffer), 0, (struct sockaddr *) &clntAddr, sizeof(clntAddr)) != strlen(sendBuffer)) DieWithError("sendto() sent a different number of bytes than expected"); printf("Sending : %s\t",sendBuffer); noOfPacktoSend--; } if ((recvMsgSize = recvfrom(sock, sendBuffer, STRMAX, 0, (struct sockaddr *) &clntAddr, &cliAddrLen)) < 0) DieWithError("recvfrom() failed"); sendBuffer[recvMsgSize] = '\0'; printf("Receiving : %s\n",sendBuffer); if (!strcmp(sendBuffer,"Closed")) exit(0); } } /* NOT REACHED */ } --- NEW FILE: TCPClient.c --- #include <stdio.h> /* for printf() and fprintf() */ #include <sys/socket.h> /* for socket(), connect(), send(), and recv() */ #include <arpa/inet.h> /* for sockaddr_in and inet_addr() */ #include <stdlib.h> /* for atoi() */ #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #define RCVBUFSIZE 11 /* Size of receive buffer */ void DieWithError(char *errorMessage) { /* Error handling function */ perror(errorMessage); exit(1); } int main(int argc, char *argv[]) { int sock; /* Socket descriptor */ struct sockaddr_in servAddr; /* Server address */ unsigned short servPort; /* Server port */ char *servIP; /* Server IP address (dotted quad) */ char *sendString; /* String to send to server */ char recvString[RCVBUFSIZE]; /* Buffer for recv string */ unsigned int sendStringLen; /* Length of send string */ int bytesRcvd, totalBytesRcvd; /* Bytes read in single recv() and total bytes read */ if ((argc < 3) || (argc > 4)) /* Test for correct number of arguments */ { fprintf(stderr, "Usage: %s <Server IP> <No Packet to Send> [<Echo Port>]\n", argv[0]); exit(1); } servIP = argv[1]; /* First arg: server IP address (dotted quad) */ sendString = argv[2]; /* Second arg: Number of Packet to send and receive */ if (argc == 4) servPort = atoi(argv[3]); /* Use given port, if any */ else servPort = 7; /* 7 is the well-known port for the echo service */ /* Create a reliable, stream socket using TCP */ if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) DieWithError("socket() failed"); /* Construct the server address structure */ memset(&servAddr, 0, sizeof(servAddr)); /* Zero out structure */ servAddr.sin_family = AF_INET; /* Internet address family */ servAddr.sin_addr.s_addr = inet_addr(servIP); /* Server IP address */ servAddr.sin_port = htons(servPort); /* Server port */ /* Establish the connection to the echo server */ if (connect(sock, (struct sockaddr *) &servAddr, sizeof(servAddr)) < 0) DieWithError("connect() failed"); // strcpy(sendString,"5"); sendStringLen = strlen(sendString); /* Determine input length */ /* Send the string to the server */ if (send(sock, sendString, sendStringLen, 0) != sendStringLen) DieWithError("send() sent a different number of bytes than expected"); /* Receive the same string back from the server */ totalBytesRcvd = 0; strcpy(sendString,"Ok"); sendStringLen = strlen(sendString); /* Determine input length */ while (1) { memset(recvString,0,RCVBUFSIZE); /* Set the Buffer with 0 */ /* Receive up to the buffer size (minus 1 to leave space for a null terminator) bytes from the sender */ if ((bytesRcvd = recv(sock, recvString, RCVBUFSIZE - 1, 0)) <= 0) DieWithError("recv() failed or connection closed prematurely"); if (!strcmp(recvString,"Disconnect")) { strcpy(sendString,"Closed"); sendStringLen = strlen(sendString); /* Determine input length */ if (send(sock, sendString, sendStringLen, 0) != sendStringLen) DieWithError("send() sent a different number of bytes than expected"); printf("Reveiving: %s\tSending: %s\n",recvString,sendString); break; } sleep(5); if (send(sock, sendString, sendStringLen, 0) != sendStringLen) DieWithError("send() sent a different number of bytes than expected"); totalBytesRcvd += bytesRcvd; /* Keep tally of total bytes */ recvString[bytesRcvd] = '\0'; /* Terminate the string! */ printf("Reveiving: %s\tSending: %s\n",recvString,sendString); } close(sock); exit(0); } --- NEW FILE: UDPClient.c --- #include <stdio.h> /* for printf() and fprintf() */ #include <sys/socket.h> /* for socket(), connect(), sendto(), and recvfrom() */ #include <arpa/inet.h> /* for sockaddr_in and inet_addr() */ #include <stdlib.h> /* for atoi() */ #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #define STRMAX 255 /* Longest string to handled */ void DieWithError(char *errorMessage) { perror(errorMessage); exit(1); } int main(int argc, char *argv[]) { int sock; /* Socket descriptor */ struct sockaddr_in servAddr; /* Server address */ struct sockaddr_in fromAddr; /* Source address of echo */ unsigned short servPort; /* server port */ unsigned int fromSize; /* In-out of address size for recvfrom() */ char *servIP; /* IP address of server */ char *sendString; /* String to send to server */ char recvBuffer[STRMAX+1]; /* Buffer for receiving string */ int sendStringLen; /* Length of send string*/ int respStringLen; /* Length of received response */ if ((argc < 3) || (argc > 4)) /* Test for correct number of arguments */ { fprintf(stderr,"Usage: %s <Server IP> <Num packet Recv> [<Echo Port>]\n", argv[0]); exit(1); } servIP = argv[1]; /* First arg: server IP address (dotted quad) */ sendString = argv[2]; /* Second arg: No of Packets to Receive */ if ((sendStringLen = strlen(sendString)) > STRMAX) /* Check input length */ DieWithError("Echo word too long"); if (argc == 4) servPort = atoi(argv[3]); /* Use given port, if any */ else servPort = 7; /* 7 is the well-known port for the echo service */ /* Create a datagram/UDP socket */ if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) DieWithError("socket() failed"); /* Construct the server address structure */ memset(&servAddr, 0, sizeof(servAddr)); /* Zero out structure */ servAddr.sin_family = AF_INET; /* Internet addr family */ servAddr.sin_addr.s_addr = inet_addr(servIP); /* Server IP address */ servAddr.sin_port = htons(servPort); /* Server port */ // strcpy(sendString,"5"); sendStringLen = strlen(sendString); /* Determine input length */ /* Send the string to the server */ if (sendto(sock, sendString, sendStringLen, 0, (struct sockaddr *) &servAddr, sizeof(servAddr)) != sendStringLen) DieWithError("sendto() sent a different number of bytes than expected"); strcpy(sendString,"Ok"); sendStringLen = strlen(sendString); /* Determine input length */ while (1) { memset(recvBuffer,0,STRMAX); /* Set the Buffer with 0 */ /* Recv a response */ fromSize = sizeof(fromAddr); if ((respStringLen = recvfrom(sock, recvBuffer, STRMAX, 0, (struct sockaddr *) &fromAddr, &fromSize)) != strlen(recvBuffer)) { printf("Recived %s\n",recvBuffer); DieWithError("recvfrom() failed"); } if (!strcmp(recvBuffer,"Disconnect")) { strcpy(sendString,"Closed"); sendStringLen = strlen(sendString); /* Determine input length */ if (sendto(sock, sendString, sendStringLen, 0, (struct sockaddr *) &servAddr, sizeof(servAddr)) != sendStringLen) DieWithError("sendto() sent a different number of bytes than expected"); break; } if (servAddr.sin_addr.s_addr != fromAddr.sin_addr.s_addr) { fprintf(stderr,"Error: received a packet from unknown source.\n"); exit(1); } sleep(5); /* Send the string to the server */ if (sendto(sock, sendString, sendStringLen, 0, (struct sockaddr *) &servAddr, sizeof(servAddr)) != sendStringLen) DieWithError("sendto() sent a different number of bytes than expected"); /* null-terminate the received data */ recvBuffer[respStringLen] = '\0'; printf("Received: %s\tSending : %s\n", recvBuffer,sendString); /* Print the echoed arg */ } close(sock); exit(0); } |
From: Prasanna G. <gpr...@us...> - 2002-01-29 21:54:14
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux In directory usw-pr-cvs1:/tmp/cvs-serv21575 Removed Files: main Log Message: "" --- main DELETED --- |
From: Prasanna G. <gpr...@us...> - 2002-01-29 21:52:50
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux In directory usw-pr-cvs1:/tmp/cvs-serv20902 Added Files: main Log Message: "" --- NEW FILE: main --- tsdjfjsdf |
From: Prasanna G. <gpr...@us...> - 2002-01-29 07:22:50
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux/Samples In directory usw-pr-cvs1:/tmp/cvs-serv24366/Samples Log Message: Directory /cvsroot/anet/ANet/ANet_Daemon/Linux/Samples added to the repository |
From: Benoit N. <be...@us...> - 2002-01-20 00:37:12
|
Update of /cvsroot/anet/Documentation/user/html In directory usw-pr-cvs1:/tmp/cvs-serv23023 Modified Files: userIntro.html Log Message: "" Index: userIntro.html =================================================================== RCS file: /cvsroot/anet/Documentation/user/html/userIntro.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** userIntro.html 2002/01/20 00:22:04 1.1 --- userIntro.html 2002/01/20 00:37:09 1.2 *************** *** 88,92 **** <P>Flexibility and ease of use is the major advantage ANet has over any other protocol for Distributed Networking that currently exist. If it's a distributed network, it can be done in ANet.</P> ! <P>The term "Anonymous", which is the "A" in ANet, represents that flexibility, or more precisely, its "lack of assumption" about how it will be used by the network developers. This "Anonymity" is characteristic to some Distributed Networks, actually all "Anonymous Networks" must be "Distributed Networks". More detailled information about this is in the "<A HREF="/docs/devel/intro/anet.html">Developer Introduction to ANet</A>".</P> <H2>Why Do We Need ANet?</H2> --- 88,92 ---- <P>Flexibility and ease of use is the major advantage ANet has over any other protocol for Distributed Networking that currently exist. If it's a distributed network, it can be done in ANet.</P> ! <P>The term "Anonymous", which is the "A" in ANet, represents that flexibility, or more precisely, its "lack of assumption" about how it will be used by the network developers. This "Anonymity" is characteristic to some Distributed Networks, actually all "Anonymous Networks" must be "Distributed Networks". More detailled information about this is in the "<A HREF="/docs/devel/intro/">Developer Introduction to ANet</A>".</P> <H2>Why Do We Need ANet?</H2> |
From: Benoit N. <be...@us...> - 2002-01-20 00:22:07
|
Update of /cvsroot/anet/Documentation/user/text In directory usw-pr-cvs1:/tmp/cvs-serv20186/text Modified Files: userIntro.txt Log Message: "" Index: userIntro.txt =================================================================== RCS file: /cvsroot/anet/Documentation/user/text/userIntro.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** userIntro.txt 2002/01/19 00:44:26 1.3 --- userIntro.txt 2002/01/20 00:22:05 1.4 *************** *** 1,11 **** ******User Introduction to ANet. ! ***Client/Server ! - What is a server When you use a Web Browser (Microsoft Internet Explorer or Netscape, for example), the pages and images that you see are taken from computers that are called "servers". A server is a computer that allows other computers to retreive data from them, in this case Web pages. ! - What is a client On your side, you mostly retreive data from the server when you browse the Web. Your computer is thus a "client" in the communication. Usually several clients can use the same server at the same time. The different clients cannot exchange data directly with each other, they can only exchange data with the server. --- 1,13 ---- + This document is an introduction to ANet, the Anoymous Distributed Networking Protocol, from the users' point of view. It explains the theory which forms the basis of the ANet project, what specifically is ANet and how ANet can be used. + ******User Introduction to ANet. ! ***Client/Server Networks ! - What is a Server? When you use a Web Browser (Microsoft Internet Explorer or Netscape, for example), the pages and images that you see are taken from computers that are called "servers". A server is a computer that allows other computers to retreive data from them, in this case Web pages. ! - What is a Client? On your side, you mostly retreive data from the server when you browse the Web. Your computer is thus a "client" in the communication. Usually several clients can use the same server at the same time. The different clients cannot exchange data directly with each other, they can only exchange data with the server. *************** *** 13,16 **** --- 15,20 ---- - Examples + [Figure 1] + Here's an example. Let's look at the server sourceforge.net. As you can see in Figure 1, several computers, with a Web browser, can retreive at the same time the web pages stored in the server. *************** *** 24,30 **** Now, let's say that you want to send a message to a group of 10 people. Obviously, you can send the message to server which, in turn, will send the message to each person in the group. But would there be another way? - - - How a connection between a client and a server is made Think about the Internet as a whole. Your computer, when it is connected to the Internet, can communicate with almost any other computer on the Internet. But how the Internet works anyways? Is it some kind of big server? --- 28,33 ---- Now, let's say that you want to send a message to a group of 10 people. Obviously, you can send the message to server which, in turn, will send the message to each person in the group. But would there be another way? + - How a connection between a client and a server is made? Think about the Internet as a whole. Your computer, when it is connected to the Internet, can communicate with almost any other computer on the Internet. But how the Internet works anyways? Is it some kind of big server? *************** *** 37,42 **** - Graph example If you look at Figure 2, you will see an example of a Network. ! Each dot (node) represents a computer, and each line represents a "connection" between two computers. Two computers can exchange data with each other only if there is a connection between them. Thus, A and Z cannot exchange directly data with each other. - Different ways to send data from A to Z --- 40,47 ---- - Graph example + [Figure 2] + If you look at Figure 2, you will see an example of a Network. ! Each circle (node) represents a computer, and each line represents a "connection" between two computers. Two computers can exchange data with each other only if there is a connection between them. Thus, A and Z cannot exchange directly data with each other. - Different ways to send data from A to Z *************** *** 69,73 **** The term "Anonymous", which is the "A" in ANet, represents that flexibility, or more precisely, its "lack of assumption" about how it will be used by the network developers. This "Anonymity" is characteristic to some Distributed Networks, actually all "Anonymous Networks" must be "Distributed Networks". More detailled information about this is in the "Developer Introduction to ANet". ! ***Why We Need ANet? Since ANet can implement any Distributed Network, ANet is useful if we need to implement a Distributed Network. So, why do we need an Distributed Network? Why is it so useful? --- 74,78 ---- The term "Anonymous", which is the "A" in ANet, represents that flexibility, or more precisely, its "lack of assumption" about how it will be used by the network developers. This "Anonymity" is characteristic to some Distributed Networks, actually all "Anonymous Networks" must be "Distributed Networks". More detailled information about this is in the "Developer Introduction to ANet". ! ***Why Do We Need ANet? Since ANet can implement any Distributed Network, ANet is useful if we need to implement a Distributed Network. So, why do we need an Distributed Network? Why is it so useful? *************** *** 85,93 **** The topology of the Network can be changed, and this change is transparent to most of the applications that use the Network. ! ***How ANet works - Client VS. Daemon ! To become part of a Distributed Network, you first need to install the ANet 'daemon'. It is a program that will run in the background, without taking any space on your screen. The settings of the ANet Daemon can be changed by changing an XML file. But, since you might want to use the Distributed Network yourself, you can use an ANet Client to change the settings in the Daemon. --- 90,98 ---- The topology of the Network can be changed, and this change is transparent to most of the applications that use the Network. ! ***How ANet Works - Client VS. Daemon ! To become part of a Distributed Network, you first need to install the ANet 'daemon'. It is a program that will run in the background, without taking any space on your screen. The settings of the ANet Daemon can be changed by changing an XML file. But, since you might want to use the Distributed Network yourself, you can use an ANet Client to change the settings in the Daemon. |
From: Benoit N. <be...@us...> - 2002-01-20 00:22:07
|
Update of /cvsroot/anet/Documentation/user/html In directory usw-pr-cvs1:/tmp/cvs-serv20186/html Added Files: fig1.png fig2.png userIntro.html Log Message: "" --- NEW FILE: fig1.png --- PNG Eâ1%AÖ®ËãòóóSSS£Óét:}ß¾}QQQwuu¯¯Ç ¬¬¬r÷îÝ¥K __CCC¿aÆ,×EÖÖÖt:ÝØØ8;;ÛÜÜüï¿ÿÆîùûï¿ÍÍͳ³³étºµµ5îDÒEðÑÊ çúúú=òõõ½ví³³sxx8Iq '4c±X[·n]µjÁøæoâââà/Aå F¥R:ôûï¿Óh´£Gzxx466â`G¥Ñh¿ÿþû¡C>w²À0Ë-KJJÒÐиyó¦Uaa!îD &Ð#=z´hÑ¢7nÌ9óßÿþ÷òåË% ¼._¾±páB!ëäää<þÜßßÉdæååM2EøÈÚÚÚÞÞ¾+{Ç® ÀÝÝ=''gÈ!W¯^Úù8èC=zäííýþýûqãÆ]»vmÔ¨Q¸uÉßÿÝÅszÕÕÕaaa¦¦¦ãƲÚÅçÏÿøñceeåñãÇYB¡<Ì÷ߺØhZºté¥K._¾,døøøÓ§Oçää;V$;* >>>ýû÷ÿå_:½/# ÒéjdchhâääTYYiooáÂÜè]¸pÁÞÞ¾²²ÒÉÉ)%%ú«7Dú¢c,nh᫪ªjbbâÚµk[[[ýüüvíÚã_ÁápvíÚåçç×ÚÚºvíÚÄÄD¾Û¦.ÉõFϾ§Æ%p|{¿28~ü8ñM£yóæµ´´àz«¹¹yÞ¼y!yyùãÇã#]0öåñmoIÇÀçܹsçË/¿¬¯¯2eJ||ü°aÃp'=TZZêééùâÅèèè3gâN$]0öØO_@åuKnn®»»{~~¾¶¶v\\îD ÛRSS½¼¼***®]»6fÌܤÆÞýéÞoÌÆâèèXQQaooéÒ%Ü@÷\ºtÉÞÞ¾¢¢ÂÑÑ1%%úîspõ|ûBê<811qÍ5>}Z´hQ`` ü é8N``à¢E>}ú´fÍÄÄÄÁã:èå±À®l¡÷{!§cÇ'4,X ÷N§Cßɨ<¡®®~çÎåË·ôØ·oß{ÃáüôÓOÄ l/_~çÎuuuÜ¡à=DîðáÃÄ âÆm¸ãô=Äm BrrrÆËA7nÜX¸paSS¹¹y\\îD}Fee¥NWRRºpáÂ9sp'"'233=<<tuu&M;QæééYRR2bÄ &àNDåɦ &ÐétØØXܤ]ll¬-ñÇE§Ó¡ïdTÌÒÐÐHJJúúë¯[ZZæÏ#z8Nppðüùó[ZZ¾þú뤤$ Ü¡Øà=$ààÁT*!äçç'4ø|úôÉÏÏ!D¥R<;;8G ×®]óõõmjj²´´ÕÔÔÄH*TUUÍ;÷É'çÏwwwÇTYdddxxx¼}ûVOO/!!aâĸaöêÕ+ââb}}ýcccÜ$À±<²066¦ÓéÖÖÖÅÅÅ666ñññ¸ágccS\\lmmM§Ó¡ïÈ*Dr÷îÝ%K477{{{àNGHHȼyó,Yr÷îÝ!CàN$÷ÁDAHHqBcÉ%¸ãHNkkëâÅBT*5$$wË#©øøx??¿ææf++«ØØX2tÞ¿?wîÜÇ4è?þðôôÄ` ÃfùòåD®_¿nmmýöí[:÷ ÿwç©óéÓ'___Ü¡C¸Ëß¼y#''7`ÀÓ^,ªªª ''WPPÀ]xèÐ!â ¤¯¯/Ü6t`³Ù?ýôÑË-kkk#³íÞ½o<ÂîÝ»B^^^Ä/ÛÚÚ-[¢R©ûöíc³Ùxãé>ëÊ+ ![[Û÷ïßs8û÷ï#´´´°_íÑÚÚJ<Óãþýûçýû÷¶¶¶! +W®àͤTæÅººº¡#Fdffr8â:ÞÈÈH¼Á"##B&Mâp8#F@éêê¾xño0 åà;¶ %44ôÓ§OT*B¡¼yó¸âW8Íþâ/6oÞÌáp>}ÚÖÖÆ]M__ßæFFFDY KÒÔÔ¤ÝÒÒBürÀÄðÓÆÆÆÊÊo>@GPy {ÚÚÚ={öàÁ«W¯ìÞ½{ãÆÛûñãÇF1oÞ<;;»©S§öïß_b{2 úç*h eèС¦¦¦"ÉÙQAAEO8+,,üöÛo¯]»ÖÞÞN¥R]]]W®\©§§×ØØH檪ª¡¡¡©©©¿üòË«W¯~øá+VÉ^ñÉZå:thÿþýuuuÜ%¯^½²¢ÕÞÞ~õêÕk×®-_¾üøñãýúõÃHÚÛÛ7nÜøûï¿···KØlöÍ7oÞ¼7tª¯¯?räÈï¿ÿðí·ßâ#J²Vy~~~eee'N .4WUUÕÖÖþâ/pç"L&³ªªêýû÷l6ýsé²l÷B¨_¿~«V*..þóÏ?BT*uÈ!òò²öèO>UTT#âø¦îP"&kßÚÚÚ¡¡¡ß}÷Ý~ýõ׺ººyóæýøã&LÀ³êêêÃ<y²¹¹B¡¸»»o6*mLMMoÞ¼ùüùóÝ»w_¿~½²²²¹¹yýúõß|óºº:îteffîÙ³çÊ+l6{À«W¯þþûïuttpç=Ù¼HEGG',,¬ `Ó¦M4-&&fâÄ_~ùeff&îhx|øðá~9räÁ[ZZÜÝÝ>}@¾ã255MHHHMMusskii9pàÀ#~øáYúÒa·dff~õÕW'N¡Ñh6m*((ɾC²ZyÅ÷ÕW_ªø²1bÄZZZÜÜÜRSSÉYv¼¦NzíÚ5¾â#.ÛÄMr²²²²&CÙd¹òÜâÛ¸q#F&/++w4ñ"®2å+»k×®M:w4iÁW|¼×«ã&^DÙe·qãF2Aö+ ££sìØ±7oÞpÏÄÄDV[v!!!---sæÌ²(>:>gξ/êà&zYYY>>>|ewìØ12,G:thÇâóññÉÏÏÇM4êëëôõõïÍ3N§_¿~Ê®SÓ¦M»~ýzjj*·øôõõ·oßN\Ý)òóó²ûÏþCÝ7oHUvY;cÛDñ}ÿý÷!!!ÿùÏæÏ/ßüø144´µµuÎ9Ó¦MÌ~)JMMÍ¥KÄ´ýºº:\Ü)¢ø>}tóæÍ£GnذAEEE»·/_þç?ÿ0`ÀÊ+øá¡CâN+0tèÐãÇÏ7wÑÐÑÑ9zô¨J¥®]»V[f±X°Ù´iÓnܸ÷î]Í?ëÖÛ·oWSSÃ'òVAMMíÈ#¸SÒ¿þõ/ÉïÍf<y¸º¸Â¹ë=<<´´´:¾ÔÒÒ8EgÊ"çE¢ Ú²1ö'P(û§Þ3d¯< gÈ!={¨#Nÿøñ£ÀOçÅå½ýõíäüÉãÆõ.# ===îÂS§N¡ÿ½ÏUqqñéÓ§½½½'NÈ]¿}ûvdÝ;pà@Þ% Ä3pŤªªF£©ªªvº&Jåý÷F ²É#RSSSSSÅMFFß±ÚÚÚ´´´Þ ¹¹¹|oliiIKK³··ç]XTT!¤ ·öìÙ#á=***655õr#òQQQ_¸páBbbâ+ o¢7·HLLÌÉÉY´h¦¦¦Õ233ÃÃÃ;¾:~üøîî ¥ë¾çååeggi||üóçÏÿõ¯Ïè@6M>}úôé]Yóõë×aaa&Mòôô²Ztt´É;D¯wEþå_^¿~Í»äéÓ§]|oHHßWF6lØ0jÔ¨% æââRQQ+è%\½!úcqC_ H?6½eË%%%;;;¼IìììàÌXoà<sÛ>â-X°;ÄÛ±c$§Ü#z111111_}õÄ b³ÙºººÍÍÍûöí£Ñht:½ë÷ -333333±cÇAÀ½¾co`Ç7ÎU111åååÜ!¹¹¹¹¹9Æ<4ÍÙÙùòåË/_þ põèGyÝ]ô |C<Üqþz}ÆÞ% K._¾\^^îìì,=}þè_¾|wÐ7}×Åu4Î!z}ÆÞÀùO.Ré+¤sGÙô²7$1ÊCÿ¤3¹}4ñmmm;vìPTT^_±7$Tyܹÿ}×WÄÄÄôó¡ÑÑÑ,Àtcoôö"n%ëJKKEøÈ±*++Ãt ÆÞÙ% ¨<Rãë¢:.á}Ù¨'ª7Eü»\ø¼+[ èuw/½Ï HFy «øÊo<(ä%>Ä«[¡Ç{á¾±ë[ K<À%p G¸s禦&1ɽÿ>tà³ ò¤ÅÚ³gw2[^^ÞqâIÏ ôåååÜIî={`+= ò¤BUUÕÌ3Éì®]»6Z{{»ñ¤1Ð300è8Ðãp8L&s×®]Ä$wæÌUUUO:ÊÃïþýû:::¡!Cܾ}ûs«EFFÂOª0LâPddäçÖ¹}ûö!CB:::ýõ$ãà®È8±Ùì~úiÆåååöööiiiÄXO yyùîܹ¾^&%ääävîÜ9pà@yùÏ~W}æÌiiiöööåååNNNûöíc³Ù øáî\òªªªrvvFQ©Ô;wveìVWWÇf³% tÍ®««ët5&¹sçNbëìì\à¶xüý÷ß-*//2dȹsçî²íöíÛ/~ÿþ½ÎÅíììp'"#ØJÍÞ·o1>}zZZôI8;;§¥¥M>äÃ$ÜÃLryÿþ½BJ¥îرNDÉܱc1Éuqqyÿþ=îDä[ÉyðàÁ¢EÊÊÊ444Î;Gt §[·n-^¼¸ººzèС/^´µµÅ,`b+ l6{ÿþýNNNeeevvviiiÐw$çââfggWVVæèè¸ÿ~äJîa¦ì{ÿþý¬Y³BT*uûöí/[äÔÞÞ¾}ûvb;kÖ,äJ &¶âÂf³CBBËÊÊlmmÓÒÒ ï@³fÍJKK³µµ---utt I®áfʦêêêÙ³g#¨Tj@@ BÈÕÕ&¹"[ÑxôèÑ KJJÔÕÕ###î 7nÞ¼¹téÒ>èêê^¼xÑÚÚw"Y òÍ7ßÀd`Ç`0¾ùæbëîî^SS;Qß ²uëVÌ>Á`lݺäzzzÖÖÖ _¿¾¾~×®]É& ÈRy·nÝB©©©±X¬Ï¢¯¯RUUd< D}üø133û³?##£¾¾w999UUÕ>¿ã~dwî¸ÜÌÌìéÓ§Ü_R©ÔÑ£GóæõôôÓó eøðáÃ'ñjiiÉÌÌLOOOIIyöìY^^ÞÝ»w¾ÝÑѱ_¿~ÌÛ[ÙÙÙ%%%ò¡ñãǯ[·wnhjjú\åM4o¬ Ê T \AÞÏÏOàüóÏ?555-,,zN¸/_æääL:UII©¸¸!4nÜ8¾A2BèÚâO½÷ nmmµ··Ç~O>®®>vìØââb99¹ööv¾ÞHIIAZµÊÛÛ[àF>{úÂÊÊ !%ÒÌü^¿~Í÷RkkkQQX Ò××ï¸#¢²úè³§¥¥¥#ª ÝÇb±¬q "|kÂFyݲtéÒK.]¾|YÈ:ñññ§OÎÉÉ;v¬Hv Ymþüù>>>"Ùiçß÷è_~ÉÍÍåËgÏuñ½!!!|_Ù°aèQ£z Eø[ÜÜÜfÍÅ»$999,,¬Ç 'Ròí¸ --- NEW FILE: fig2.png --- PNG ÅÃÃcëÖúúú¼6±nݺ7np8++«K."Z¬pÎÅ0ItóæMggçîÝ»GFF4HÖ¢¢¢F-¬81^á&q®\¹âääÔÐÐàîîþñãG. 7ù²í>|ø`jjjllzüøñÕ«WWUUuîÜùСC®®®<5 µÎ¹Ø¯ zyyQ(S§NÍ3Gèí¯]»vçβ²²Ï?ÿZ, å¶Aee%J¥Ñhµµµ¼ ínݺELxx¸º !BVVöÉ'6U^^Î]hee%æÒ¿Â9kZþ0sæL>®maù¸UÛ¿ RVV.]º\ºtìç\ UQQqàÀcccjååå½¼¼^¼xAbH(í¢ZPjÇ#GÄ ûììl;;;ôªsrrúúõ+٠ιçýû÷/Fïð qíÚµQ£F¡¦ 3fLXXÉ$;´ÿϧO¸{å4(66§ËÙlvXXX=PcÇ%eLºäååÙÛÛ£×ÌäÉ¿|ùBvDüÃ9|ÅÅÅÛ¶mC§U¯¯¯WÜò¤®®nïÞ½Üzúúú;vìh}_T6¿fÍÎ;£« Ï;'øÂ ¬ãVWWGSÑO>Íf³EÚݧO;6wîÜßÿ½GjjjAhjjöîÝ{øðá>>>¡¡¡wn##¤1>$%%]¹r/hbbâëë;{öl´úKÂÕÖÖnÙ²åðáÃt:}F£M6sçÎ:::µµµeeeÅÅÅéééÏ=c2ÜkUUUß½{§¯¯ORì´*,,\²dIdd$ 7åéé IIIMþç\¡)--ݹs'÷nÒ¢Eð¡^¿´~ýz 3f©©é#Gª««G}ýúõÏ?¯_¿'ÜöáðáÃ'O.--8q"zcX¡ÍB_½zÅÓU?+5ð õÛ¯_¿ösKJJvìØÑ£G''§())-Y²$%%åþýûNNNèC¬} R©.]277ÏÊÊ:ujMM ÙaR@+#Äï+2ø©'KçÏÏ=;U¾O>ç.m)ШS§Nmã ¯ "ã\6ýàÁÆÅÙÁ:uª¦¦ìÐ02]½zB¡qñâE²cÁ¤ iGK,Þ½{ÿøñûMȹ¯_¿7oʶ={öÜ»woyy9ÙqaÒ¤¤¤F÷¦ÉhW®\A÷bccEÔºÓ //ßä4E2sn}}ýÅQª¥P(öööQQQ,Ĩ0é©¥¥ b2 å¿{+véÒå?þHJJB@3Y/^<hÐ î=.yyùaÃ-_¾üƳfÍÝ1kî§97>>¬¬¬|ôèQÁȤ¤¤ · ãÇÞ µENN8{öl¼ÃrÇd2oß¾íîîÎ=M^^ÞÅÅ%22²õ[g?~üøüùsrrrnnnrí!C KLL 8Npp0 AÜr¿¿¿ØÊµC³===yº 8Ú¤íë îÓ§O Ò:¢´´TF0o ¸ã7Û vÑ[zzzº ` >|ø ®®"ØÈ4''ÇÝÝûNGGgÖ¬Yû÷ïüøqzzzii)Å*))IKKKHHسg³³3Zã íß¿_ÂçbÖõë×) AçÏÿÙc¦L k{õêµe˼kû/ýõ×_ Ú¨§!zIIIpp°££#ZçòråʶLYÇ0¡ÈÊÊB;x{{s8I&À¥Kxm§yå#ç?~ ØÉ_±bEãóN¦MvæÌ¡Ä,]233-ZdmmÝ«W/ ÔÕÕ{öì9lذùóç<y2--ì0ÛÈÈH*JÚÑe¸ -ÿÑÑ.]ºTWW;w®q¹VCCk èܹs eËápÐÍ1 vôèQ\®4S°µ¿ÔÚsî(**nܸï}Y,Ö#GÐb âçç'¶¬÷ãÇK.¹ºº6Yjáëë{çÎv°ÔÅb ·YYY¨¨¨¶ÜKd±X±±±nnnhd$##³e˾otpß¿N:ñq yÅb¡uÉâ\×1õë× ý绺ºú?þ@©ªK.k×®åi@Ä`0¹È[ZZþrZÔ××ß¹sÇ××·ÉRWW×K.IéRììl´»+AÎÎÎüM^ÉÉÉñðð@?ÈßÍ!wq¡äܲ²2 ±YÒ}øð! ÀÒÒ²ñR#FìÝ»WÌ+)׬Y &qNÑa¡ß¾}¤óóÍøpèСeËÉÊÊFEE7N-KÂÂÂÈÈÈÖ××£oöïßßÁÁÁÁÁaèСܤ, 999&&& /_¾2dè:B>}ú¦v¼{÷®oß¾¢îNÒ°X¬¼¼¼¼¼¼ÜÜ\îyyyUUU-^BÃÑÖÖÎÎÎæ®µÊÊJCCÃïß¿?þÜÜÜ\<vL_¿~ÕÕÕÕÔÔ,--¨!áäÿFÐXLEEååËBo\BüøñãòåËnnnjjjÜÿI===ØØX¶úÉW¿äëë ?â{ýúõСC»téRPP +++ή[QQQÑâ µ¨¨Íf·x¦¦fV---áVá \RR°nÝ:!¶ÜÄÚµkwîÜ©§§Ü¹sgÑu!cǽwïÞ[·&N(H;¢Ê¹ ¥M¬-? GQQ±Éô å/(( ³{÷nOOO&¹iÓ¦ 6¥Y^B¿s`òäÉG =ZFhlÚ´iá 555S¦LA?<ÖØèÑ£ÓÒÒ<==+++7lØ2oÛg7ÿþ}Ï=&&&+V¬(//=ztzzúäÉE3I¡O cÏr0Ì©S§¡¡aaa!ÙáH¨¡ É D/8²cÁ¤Ltt4*ànذA¸-³Ùì%K ò.~e KZZ ,fff7I'ÁXºté_~yóæÍÞÙmmm999ÑÑÑK,õ]<yò7TçX,F9#&&FuÔwß} ?~üòåKDR__ÿèÑ£¼¼¼ ¢x4 ,°X,¶ªU7.\¸ÊP3WvWsâââPSµððp*÷"B¡0** 666^»ví[· SSSgÎwÈ!±±±ªKlÀ«yìÛ· k®ö ¼0þ¼Ãâåå X5WAí|¹\îòåË% Ý t£A__ÿ/¾è1°²²ÒÓÓýþûïÉI&66U"ß°a¬©Zuu5 æ|úôéÊ+ÑgÃÃÃCvôiiivaäÖ{ÆèçÏGMÕæÎÛÚÚJJ|444T`6RÑPÖÄ)SpàO»ÊÆh]]]ï¾û. ̦|ÊÖ¥K ýÓ ec4ööv`Â/^L&¶´´ ;ÇHmY,Vtt4NÃ(¬©ì ÀIDATÓo¿ýn%ÐUÅ Åè"##ßÐ!vîÜÉd2 øøãÓÒÒPpå155MNNÞµkT*e0û÷ïRàªÓQ£FøúúVUUùúú¢:JÞS odü¾ .àu®.PQQáîînhhXVVQ ¨6Ã9zô¨²ý£t û«FU{ë)z`oo¯æªúFÂÃÃöìÙ³jÕªÊÊʨ¨(Rb»aaa/^444ÌÈÈðõõU~N8¶ å¼õÖ[eee $ô¹¤wûøñc777GGǪª*¹¬ëA455õw ®®N$õ7Á`XZZöWEªJY+9räÓO?%ÂÛÛ;==ÝÖÖVÙîÝ»·p᪪*6}åÊàà`²üD`ÍÕr¬äM©W^û¤³³ÓÈÈÈÐÐð=´µ¤ªýÅUkkkVUþâª:¢ªo$;;ûý÷߯¯¯755ݶm[DD±±±¼TWWïÙ³'))I"xzz¦¤¤¸ººî*Ö\mF*¢H$ë¾3HHÑ\ öööÍÍÍ¿ýöÛ;ï¼C¥é'O¸¹¹&&&Ên I}ñâÅÀkUccãâªÁô ^çj9Ë-;vìØ3g:D¥éï¿ÿ ÎÎÎ5kÖôþ«QÛ¬ªm¯sµTÎÑÒÒòÙ³gí»;;;]\\ø|þ¸qãÆÓ[^J'Z×¹Ú×ôéÓóòòbbbþùÏRc466ÏçO:Çã©If.£àu®NpûömÃf³<y2ÈèÊP__ïââÒÑÑA}s FÍQa!ú0uêÔ¡P¸|ùòZT* ëèè?>\¦Xsu o¿ývøðáùùùþ¹J ÅÄÄdeeÙØØ?~\¥0MÇtüüüÀÀ@©TDn#ééé!!!A\»vmæÌª0Áh4x«Cøùù:u íýO>MúügÏ H$Xp1>Á«[¬^½ú믿J¥~øadd¤T*%eZ <&HöíÛNÊ´öcºH||ü'|B¿¿jjªý£-[ --- NEW FILE: userIntro.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <TITLE>ANet - Introduction to ANet</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"><!--#include virtual="/cgi-bin/menu.cgi" --> <TABLE width="600"><TR><TD> <H1 align="center">Introduction to ANet</H1> <P>This document is an introduction to ANet, the Anoymous Distributed Networking Protocol, from the users' point of view. It explains the theory which forms the basis of the ANet project, what specifically is ANet and how ANet can be used.</P> <H2>Client/Server Networks</H2> <H3>What is a Server?</H3> <P>When you use a Web Browser (Microsoft Internet Explorer or Netscape, for example), the pages and images that you see are taken from computers that are called "servers". A server is a computer that allows other computers to retreive data from them, in this case Web pages.</P> <H3>What is Client?</H3> <P>On your side, you mostly retreive data from the server when you browse the Web. Your computer is thus a "client" in the communication. Usually several clients can use the same server at the same time. The different clients cannot exchange data directly with each other, they can only exchange data with the server.</P> <H3>Examples</H3> <P align="center"> <img src="fig1.png" width="422" height="404" alt="Clients/Server Network Graph"><BR> Figure 1: Clients/Server Network Graph</P> <P>Here's an example. Let's look at the server sourceforge.net. As you can see in Figure 1, several computers, with a Web browser, can retreive at the same time the web pages stored in the server. The clients are not connected to each other, but each client can use the "Discussion Boards" available at sourceforge.net to store some information which can be read, through the server, by other clients.</P> <P>Another example is AIM (America Online Instant Messenger). If user Bob wants to send a message to user Alice, then the message will go from Bob, to the AIM server, to Alice. The advantage of doing so, instead of Bob sending the message directly to Alice, is that Alice could be using any computer to receive the message, as long as Alice is connected to the AIM server with the same user name. Then, Bob only has to know what is the user name of Alice, without knowing where Alice is, and Bob will be able to send a message to Alice when Alice is connected to the AIM server.</P> <H2>Distributed Networks</H2> <H3>What happens if you want to send data to more than one computer?</H3> <P>Now, let's say that you want to send a message to a group of 10 people. Obviously, you can send the message to server which, in turn, will send the message to each person in the group. But would there be another way?</P> <H3>How a connection between a client and a server is made?</H3> <P>Think about the Internet as a whole. Your computer, when it is connected to the Internet, can communicate with almost any other computer on the Internet. But how the Internet works anyways? Is it some kind of big server?</P> <P>Obviously, it is impossible that the Internet is a single, big computer that has a single connection with all the computers on this planet. Obviously, several connections can be shared with a single but faster connection, a bit like highways. But if you look at roads, you can easily see that there are several roads, interconnected to each other, and some roads are fater than other.</P> <P>Computers are interconnected in a similar way to make the Internet. They produce, as a whole, a Network.</P> <P>(The Internet is, actually, a "Network of Networks", hence the name Internet)</P> <H3>Graph Example</H3> <P align="center"> <img src="fig2.png" width="465" height="345" alt="Distributed Network Graph"><BR> Figure 2: Distributed Network Graph</P> <P>If you look at Figure 2, you will see an example of a Network. Each circle (node) represents a computer, and each line represents a "connection" between two computers. Two computers can exchange data with each other only if there is a connection between them. Thus, A and Z cannot exchange directly data with each other.</P> <H3>Different ways to send data from A to Z</H3> <P>But what if A wanted to send a message to Z? The message could take a path through B and F, or through E and H, or though many other possible paths.</P> <P>Or it could do what we call a "broadcast": A attaches the name "Z" to the message as the destination, A sends the message to B and, in turn, everyone that receives a copy of that message will make a copy of it to all the other computers they are connected to until everyone received it. This can be visualized as ssome kind of chain reaction, or some "ripple effect". Then, once all computers has a copy of the message, each computer looks at the destination name attached to the message (Z) and discards it if the computer's name does not match the destination name. Obviously, this is much slower that taking a direct path, since several copies are made, but it can have several advantages, as you will see later.</P> <H3>Distributed Networks</H3> <P>As you can now see, several things can be made to transfer some data from a computer to another in a Network. But which computer makes the decision?</P> <P>In the previous example, A could make the whole decision. If a path has to be taken, the complete path information is attached to the message. But, in another way, A could tell B: "I want you to send that message to Z". Then, B will do its best to bring the data closer to Z. As you can see, A has no control to what happens to the message once it is in B's hands. But we just split up the problem of sending the message from A to Z into smaller, easier ones.</P> <P>Here, we can say that the "logic" used to send some message from a point to another is duplicated across the different computers. The logic is now Distributed. This is why this kind of network is called a Distributed Network.</P> <P>One particularity of Distributed Networks is that since the logic is "split up" to different computers, it is more difficult to know what happens in the network as a whole. For example, if A forgets to write "This message came from A" in the message, it will be very difficult for Z to know where the message came from. Z would need to ask F: "Where this came from?", and so on until it is traced back to the source. And that method doesn't work if one computer says: "I forgot", which makes everything harder.</P> <P>Another particularity of Distributed Networks is that if one computer cannot be accessed anymore, the network will still be able, as a whole, to transport messages between computers. For example, with AIM, if the AIM server cannot be accessed anymore, than no one can use AIM to exchange messages. Same thing for Web sites: if the Web serve cannot be accessed anymore (is "down"), then no one will be able to browse the Web site anymore. But with a Distributed Network, the service (instant messaging, web browsing) remains as a whole, even if the information maintained by the computer that is "down" cannot be accessed anymore. For example, if F is "down" in Figure 2, then A can still send messages to Z through the path A-E-H-Z, even if no messages can be sent to F anymore.</P> <H2>ANet</H2> <P>The goal of the ANet project is to help developers to implement and use Distributed Networks. This is because Distributed Networks share some common ideas and ANet tries to implement these ideas.</P> <P>ANet can be seen as a canvas: all the ideas about Distributed Networks are already there, you just need to "fill in the blanks". Thus, ANet should be easy to use and very flexible.</P> <P>Flexibility and ease of use is the major advantage ANet has over any other protocol for Distributed Networking that currently exist. If it's a distributed network, it can be done in ANet.</P> <P>The term "Anonymous", which is the "A" in ANet, represents that flexibility, or more precisely, its "lack of assumption" about how it will be used by the network developers. This "Anonymity" is characteristic to some Distributed Networks, actually all "Anonymous Networks" must be "Distributed Networks". More detailled information about this is in the "<A HREF="/docs/devel/intro/anet.html">Developer Introduction to ANet</A>".</P> <H2>Why Do We Need ANet?</H2> <P>Since ANet can implement any Distributed Network, ANet is useful if we need to implement a Distributed Network. So, why do we need an Distributed Network? Why is it so useful?</P> <H3>Availability</H3> <P>The Network, as a means of data transportation, remains avalable, even if some of the computers that make the network stop working.</P> <H3>Data distribution</H3> <P>Data sent in the Network can be eaily sent to many computers in the Network.</P> <H3>Flexibility</H3> <P>The topology of the Network can be changed, and this change is transparent to most of the applications that use the Network.</P> <H2>How ANet Works</H2> <H3>Client VS. Daemon</H3> <P>To become part of a Distributed Network, you first need to install the ANet 'daemon'. It is a program that will run in the background, without taking any space on your screen.</P> <P>The settings of the ANet Daemon can be changed by changing an XML file. But, since you might want to use the Distributed Network yourself, you can use an ANet Client to change the settings in the Daemon.</P> <P>An ANet Client is an application that communicates with the Daemon to configure and monitor the Daemon, or most of the time, to receive and send data to the Distributed Network.</P> <H3>Clusters</H3> <P>Let's say that there is one Distributed Network for instant messaging (similar to ICQ) and another one for discussion groups, and you want your computer to participate in both of these networks. What can you do?</P> <P>ANet works with the idea of "Clusters". A cluster is a Distributed Network that share the same "rules". The network for instant messaging might not allow files to be transfered, while it is allowed for the discussion group network. A Cluster might have some special rules, like the speed of the connections, to geographical location (the average round-trip time), and so on.</P> <P>Also, ANet uses what is called a "Cluster Group". A cluster group is just several clusters grouped together because they are alike, yet distinct. As an example, there are several instant messaging protocols (AIM, Yahoo, Jabber, ICQ, MSN...). They are icompatible with each other, but you just use them all at the same time, so you can be reached through those various services.</P> <P>Cluster groups are usually made to group together clusters that allow the same service. A "service" is some kind of application you can use on a Distributed Network (chat, instant messaging, discussion groups, file sharing...). Not all services are allowed or supported on all networks, but several networks might support the same service.</P> <P>As a result, the clients send or receive data from a cluster group. You want to use a chat client for ANet? You find one or more clusters that allow the chat service, you make a cluster group called "Chat" that groups together those clusters, and you tell the client to use the cluster group "Chat".</P> <H3>Transparent ANet</H3> <P>There is still another way to use ANet without having to install any ANet Daemon or Client at all.</P> <P>Remember, ANet is used to implement a Distributed Network. But you don't have to be in the network to use it. Likewise, your personal computer at home is most likely to use the internet, not be part of its structure.</P> <P>This approach is very similar to what you already know about "using the internet". You launch an application and somehow, it connects "somewhere".</P> <H2>Conclusion</H2> <H3>Development Status</H3> <P>The development of ANet has just started. As a result, ANet is not available in a stable form yet. Check out the <A HREF="/">ANet web site</A> (http://anet.sourceforge.net/) often as it is regularly updated.</P> <P>So this concludes the introduction of ANet, the Anonymous Distributed Networking Protocol. If you have any question about this document or about ANet in general, feel free to contact me (Benad). You can view my contact information in the "<A HREF="/contact.html">Contact</A>" page.</P> </TD></TR></TABLE> <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=15189" width="88" height="31" border="0" alt="SourceForge Logo"></a></p> </BODY> </HTML> |
From: Benoit N. <be...@us...> - 2002-01-20 00:22:07
|
Update of /cvsroot/anet/Documentation/user/latex In directory usw-pr-cvs1:/tmp/cvs-serv20186/latex Modified Files: fig1.dia Log Message: "" Index: fig1.dia =================================================================== RCS file: /cvsroot/anet/Documentation/user/latex/fig1.dia,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvs0PlN7b and /tmp/cvsq8jwQd differ |
From: Benoit N. <be...@us...> - 2002-01-20 00:19:20
|
Update of /cvsroot/anet/Documentation/user/html In directory usw-pr-cvs1:/tmp/cvs-serv19591/html Log Message: Directory /cvsroot/anet/Documentation/user/html added to the repository |
From: Benoit N. <be...@us...> - 2002-01-19 23:36:38
|
Update of /cvsroot/anet/Documentation/user/latex In directory usw-pr-cvs1:/tmp/cvs-serv10178 Modified Files: fig1.dia Log Message: "" Index: fig1.dia =================================================================== RCS file: /cvsroot/anet/Documentation/user/latex/fig1.dia,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvslnRFRw and /tmp/cvssMFRoT differ |
From: Benoit N. <be...@us...> - 2002-01-19 23:21:19
|
Update of /cvsroot/anet/Documentation/user/latex In directory usw-pr-cvs1:/tmp/cvs-serv5051 Modified Files: fig1.dia Log Message: "" Index: fig1.dia =================================================================== RCS file: /cvsroot/anet/Documentation/user/latex/fig1.dia,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsaRM75h and /tmp/cvsq6kYUp differ |
From: Benoit N. <be...@us...> - 2002-01-19 22:46:38
|
Update of /cvsroot/anet/Documentation/user/latex In directory usw-pr-cvs1:/tmp/cvs-serv29748 Modified Files: fig1.dia Log Message: "" Index: fig1.dia =================================================================== RCS file: /cvsroot/anet/Documentation/user/latex/fig1.dia,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsgYi7Aq and /tmp/cvs67653G differ |
From: Benoit N. <be...@us...> - 2002-01-19 00:44:29
|
Update of /cvsroot/anet/Documentation/user/text In directory usw-pr-cvs1:/tmp/cvs-serv22192 Modified Files: userIntro.txt Log Message: "" Index: userIntro.txt =================================================================== RCS file: /cvsroot/anet/Documentation/user/text/userIntro.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** userIntro.txt 2002/01/08 21:34:28 1.2 --- userIntro.txt 2002/01/19 00:44:26 1.3 *************** *** 115,116 **** --- 115,123 ---- This approach is very similar to what you already know about "using the internet". You launch an application and somehow, it connects "somewhere". + ***Conclusion + + - Development Status + + The development of ANet has just started. As a result, ANet is not available in a stable form yet. Check out http://anet.sourceforge.net/ often as it is regularly updated. + + So this concludes the introduction of ANet, the Anonymous Distributed Networking Protocol. If you have any question about this document or about ANet in general, feel free to contact me (Benad). You can view my contact information in the "Contact" page (http://anet.sourceforge.net/contact.html). \ No newline at end of file |
From: Benoit N. <be...@us...> - 2002-01-08 21:34:31
|
Update of /cvsroot/anet/Documentation/user/text In directory usw-pr-cvs1:/tmp/cvs-serv12497 Modified Files: userIntro.txt Log Message: "" Index: userIntro.txt =================================================================== RCS file: /cvsroot/anet/Documentation/user/text/userIntro.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** userIntro.txt 2002/01/01 22:55:53 1.1 --- userIntro.txt 2002/01/08 21:34:28 1.2 *************** *** 65,68 **** --- 65,70 ---- ANet can be seen as a canvas: all the ideas about Distributed Networks are already there, you just need to "fill in the blanks". Thus, ANet should be easy to use and very flexible. + Flexibility and ease of use is the major advantage ANet has over any other protocol for Distributed Networking that currently exist. If it's a distributed network, it can be done in ANet. + The term "Anonymous", which is the "A" in ANet, represents that flexibility, or more precisely, its "lack of assumption" about how it will be used by the network developers. This "Anonymity" is characteristic to some Distributed Networks, actually all "Anonymous Networks" must be "Distributed Networks". More detailled information about this is in the "Developer Introduction to ANet". *************** *** 82,83 **** --- 84,116 ---- The topology of the Network can be changed, and this change is transparent to most of the applications that use the Network. + + ***How ANet works + + - Client VS. Daemon + + To become part of a Distributed Network, you first need to install the ANet 'daemon'. It is a program that will run in the background, without taking any space on your screen. + + The settings of the ANet Daemon can be changed by changing an XML file. But, since you might want to use the Distributed Network yourself, you can use an ANet Client to change the settings in the Daemon. + + An ANet Client is an application that communicates with the Daemon to configure and monitor the Daemon, or most of the time, to receive and send data to the Distributed Network. + + - Clusters + + Let's say that there is one Distributed Network for instant messaging (similar to ICQ) and another one for discussion groups, and you want your computer to participate in both of these networks. What can you do? + + ANet works with the idea of "Clusters". A cluster is a Distributed Network that share the same "rules". The network for instant messaging might not allow files to be transfered, while it is allowed for the discussion group network. A Cluster might have some special rules, like the speed of the connections, to geographical location (the average round-trip time), and so on. + + Also, ANet uses what is called a "Cluster Group". A cluster group is just several clusters grouped together because they are alike, yet distinct. As an example, there are several instant messaging protocols (AIM, Yahoo, Jabber, ICQ, MSN...). They are icompatible with each other, but you just use them all at the same time, so you can be reached through those various services. + + Cluster groups are usually made to group together clusters that allow the same service. A "service" is some kind of application you can use on a Distributed Network (chat, instant messaging, discussion groups, file sharing...). Not all services are allowed or supported on all networks, but several networks might support the same service. + + As a result, the clients send or receive data from a cluster group. You want to use a chat client for ANet? You find one or more clusters that allow the chat service, you make a cluster group called "Chat" that groups together those clusters, and you tell the client to use the cluster group "Chat". + + - Transparent ANet + + There is still another way to use ANet without having to install any ANet Daemon or Client at all. + + Remember, ANet is used to implement a Distributed Network. But you don't have to be in the network to use it. Likewise, your personal computer at home is most likely to use the internet, not be part of its structure. + + This approach is very similar to what you already know about "using the internet". You launch an application and somehow, it connects "somewhere". + |
From: Christopher J. <cwj...@us...> - 2002-01-06 19:54:04
|
Update of /cvsroot/anet/Documentation/design/latex In directory usw-pr-cvs1:/tmp/cvs-serv4539 Modified Files: anetdesign.tex Log Message: Don't worry I need to fix the dtd figure. Fixed a couple of formatting problems with the description environment. The contents of an item can start on a new line with the following hack: \item[foo]\mbox{}\\ This will be on a separate line. :) Index: anetdesign.tex =================================================================== RCS file: /cvsroot/anet/Documentation/design/latex/anetdesign.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** anetdesign.tex 2002/01/05 16:46:35 1.5 --- anetdesign.tex 2002/01/06 19:54:01 1.6 *************** *** 85,89 **** \tableofcontents \listoffigures ! \listoftables % do we need an abstract? %\clearpage --- 85,90 ---- \tableofcontents \listoffigures ! ! % \listoftables % we don't have tables yet... % do we need an abstract? %\clearpage *************** *** 400,404 **** \begin{description} ! \item[Register/Unregister service] Given some service number, it registers that service for its calling module instance. You can also --- 401,405 ---- \begin{description} ! \item[Register/Unregister service]\mbox{}\\ Given some service number, it registers that service for its calling module instance. You can also *************** *** 410,414 **** command. ! \item[Send packet] Sends an ANet packet, query[3] or static data[4], to the ANet network. The cluster group[5] where the packet will be --- 411,415 ---- command. ! \item[Send packet]\mbox{}\\ Sends an ANet packet, query[3] or static data[4], to the ANet network. The cluster group[5] where the packet will be *************** *** 417,421 **** ANet packet" will be described in "Cluster Group Modules"[5]. ! \item[Get Status] Will make the ANet daemon return a packet describing its current status. The contents of this packet will be implementation --- 418,422 ---- ANet packet" will be described in "Cluster Group Modules"[5]. ! \item[Get Status]\mbox{}\\ Will make the ANet daemon return a packet describing its current status. The contents of this packet will be implementation *************** *** 424,428 **** going on in the daemon. ! \item[Get Status -- Start/Stop polling] From the time the daemon gets the "Start Polling" command to the time it gets the "Stop Polling" --- 425,429 ---- going on in the daemon. ! \item[Get Status -- Start/Stop polling]\mbox{}\\ From the time the daemon gets the "Start Polling" command to the time it gets the "Stop Polling" *************** *** 434,447 **** ignored. ! \item[Get Static Data] Given a primary and/or the secondary key, this will make ANet return all the static packets currectly stored locally that matches the key (or keys). ! \item[Change/Delete Static Data] Those commands will allow the module to change or delete some static packets currently stored locally. ! \item[Open TWDTC] Given the protocol, the ``unique address'' and the "subnet" of the other node, ANet will try to establish a Two-Way Data --- 435,448 ---- ignored. ! \item[Get Static Data]\mbox{}\mbox{}\\ Given a primary and/or the secondary key, this will make ANet return all the static packets currectly stored locally that matches the key (or keys). ! \item[Change/Delete Static Data]\mbox{}\\ Those commands will allow the module to change or delete some static packets currently stored locally. ! \item[Open TWDTC]\mbox{}\\ Given the protocol, the ``unique address'' and the "subnet" of the other node, ANet will try to establish a Two-Way Data *************** *** 453,466 **** can be used to identify the TWDTC with the other TWDTC commands. ! \item[Read/Write TWDTC] Read or write some data in the TWDTC. This is similar to reading or writing data in a TCP socket. ! \item[Close TWDTC] Given an open TWDTC ID\footnote{If you know what "TWDTC ID" means, then you're ready to be a developer for ANet!}, closes the identified channel. ! \item[Get Config] Returns the readeable tags in the configuration files \xs{sec:rtw}. Each tag in the configuration files can have --- 454,467 ---- can be used to identify the TWDTC with the other TWDTC commands. ! \item[Read/Write TWDTC]\mbox{}\\ Read or write some data in the TWDTC. This is similar to reading or writing data in a TCP socket. ! \item[Close TWDTC]\mbox{}\\ Given an open TWDTC ID\footnote{If you know what "TWDTC ID" means, then you're ready to be a developer for ANet!}, closes the identified channel. ! \item[Get Config]\mbox{}\\ Returns the readeable tags in the configuration files \xs{sec:rtw}. Each tag in the configuration files can have *************** *** 469,473 **** contain. Otherwise, they remain to their default value. ! \item[Change Config] Allows the client connection module to change tags in the configuration file, it it has the right to do so. The --- 470,474 ---- contain. Otherwise, they remain to their default value. ! \item[Change Config]\mbox{}\\ Allows the client connection module to change tags in the configuration file, it it has the right to do so. The *************** *** 644,648 **** \section{Cluster Group Modules} \label{sec:cgm} The Cluster Group Modules are used to duplicate, when needed, data ! between different clusters[1]. \subsection{Design} --- 645,649 ---- \section{Cluster Group Modules} \label{sec:cgm} The Cluster Group Modules are used to duplicate, when needed, data ! between different clusters \xs{sec:rtw}. \subsection{Design} *************** *** 659,663 **** \subsubsection{Input/Output for the Cluster Group Modules} ! As input, the Cluster Groups need two things each time their "main" function is called. First, they need a list of cluster IDs. Those are unique numbers that identify all the clusters you have to receive or --- 660,664 ---- \subsubsection{Input/Output for the Cluster Group Modules} ! As input, the Cluster Groups need two things each time their \texttt{main} function is called. First, they need a list of cluster IDs. Those are unique numbers that identify all the clusters you have to receive or *************** *** 690,694 **** follows byte-ordering and memory alignment of the compiled deamon. Also, the structure is much more flexible than the External ! one\footnote{}. The AIPs are broken into two: the header and the data. The size of --- 691,696 ---- follows byte-ordering and memory alignment of the compiled deamon. Also, the structure is much more flexible than the External ! one\footnote{What I mean is that, most of the time, doing a simple ! typecasting is enough to retrieve the data you want.}. The AIPs are broken into two: the header and the data. The size of *************** *** 737,742 **** \begin{fmpage}{\textwidth} \begin{verbatim} ! <!-- Cluster Group. Contains references to Clusters that compose ! that Cluster Group. --> <!ELEMENT ClusterGroup (ClusterRef)+> <!ATTLIST ClusterGroup %name; %moduleName; %args; %security;> --- 739,743 ---- \begin{fmpage}{\textwidth} \begin{verbatim} ! <!-- Cluster Group. Contains references to Clusters that compose that Cluster Group. --> <!ELEMENT ClusterGroup (ClusterRef)+> <!ATTLIST ClusterGroup %name; %moduleName; %args; %security;> *************** *** 790,794 **** "definition kind" and the definition itself. The definition will be used be the Handshaking Protocol Modules to tell to the other node ! what are the security requirements of the cluster. The second function, the optional one, is used to do ``forced'' --- 791,795 ---- "definition kind" and the definition itself. The definition will be used be the Handshaking Protocol Modules to tell to the other node ! what are the security xrequirements of the cluster. The second function, the optional one, is used to do ``forced'' *************** *** 852,856 **** be sent in a similar manner to the other Core Modules. Unused commands will be finally deleted if they were unused by all the Core ! Modules.(1) The input packets are AIPs. There is one buffer for all the cluster, --- 853,859 ---- be sent in a similar manner to the other Core Modules. Unused commands will be finally deleted if they were unused by all the Core ! Modules.\footnote{The Run-Time wrapper \xs{sec:rtw} will allow you to create as ! many new commands as you want. Actually, commands that are ! unrecognized by the wrapper will be sent to the Core Modules.} The input packets are AIPs. There is one buffer for all the cluster, *************** *** 862,873 **** which are totally platform independant. The deamon will provide some functions to transform an AIP to an AEP, though the modules might have ! to set some values by themselves(2). \subsubsection{Core Modules} Here is a high-level description of the Core Modules that will be ! implemented for the first versions of ANet.(3) ! ! Query Module This module will implement queries[1] for ANet. A query packet is sent to a connection only if the same packet was not sent recently and if --- 865,885 ---- which are totally platform independant. The deamon will provide some functions to transform an AIP to an AEP, though the modules might have ! to set some values by themselves.\footnote{For example, the ! \emph{Time-to-Live} exists only in the AEPs (for query AEPs), so it is up ! to the Query Module to fill the value. Note that the format or the ! AEPs will be very similar to the format of the AIP, though without ! memory alignment and with strict rules for byte ordering.} \subsubsection{Core Modules} Here is a high-level description of the Core Modules that will be ! implemented for the first versions of ANet.\footnote{The modules were ! already described in the development introduction. They don't really ! have a high-level design, and the low-level design will be covered ! during development. That's because it's too simple (Query Module) or ! too complex (Static Data and TWDT Module) to be worth the time ! investment. Don't worry, the modules will be thoroughly documented ! once a stable implementation will be done.} + \paragraph{Query Module} This module will implement queries[1] for ANet. A query packet is sent to a connection only if the same packet was not sent recently and if *************** *** 878,884 **** sent, in the form of a simple checksum(4) and the origin of each packet. - - Static Data Module This module will implement Static Data[2] in ANet. It will mostly use the hard disk to store the data, though it might need a larger cache --- 890,895 ---- sent, in the form of a simple checksum(4) and the origin of each packet. + \paragraph{Static Data Module} This module will implement Static Data[2] in ANet. It will mostly use the hard disk to store the data, though it might need a larger cache *************** *** 886,891 **** packets. ! TWDT Module ! This module will implement Anonymous Two-Way Data Transfers (TWDT[3]) in ANet. Its input come only from the client commands[4] made for the --- 897,901 ---- packets. ! \paragraph{TWDT Module} This module will implement Anonymous Two-Way Data Transfers (TWDT[3]) in ANet. Its input come only from the client commands[4] made for the *************** *** 895,912 **** Communication[5], even though the caching of the queries it needs to produce is handled by the TWDT Module itself. - - Managing Connections As input, the modules will always have a list of the connections, and their state. That list is kept in the parsed configuration file[5]. Here are the possible states. - - Open - The connection is open, thus it will accept input data and produce output data. - On Hold - The connection cannot do any input or output, but will soon become either Open again or be Closed. - Closed - The connection is forever closed. The connection will soon be removed from the connection list. The Core Modules cannot, by themselves, change the state of a connection. Only Cluster Filter Modules[6] and by Handshaking Protocol Modules. --- 905,922 ---- Communication[5], even though the caching of the queries it needs to produce is handled by the TWDT Module itself. + \subsubsection{Managing Connections} As input, the modules will always have a list of the connections, and their state. That list is kept in the parsed configuration file[5]. Here are the possible states. + \begin{description} + \item[Open]\mbox{}\\ + The connection is open, thus it will accept input data and produce output data. + \item[On Hold]\mbox{}\\ + The connection cannot do any input or output, but will soon become either Open again or be Closed. + \item[Closed]\mbox{}\\ + The connection is forever closed. The connection will soon be removed from the connection list. + \end{description} The Core Modules cannot, by themselves, change the state of a connection. Only Cluster Filter Modules[6] and by Handshaking Protocol Modules. *************** *** 1090,1093 **** --- 1100,1217 ---- \end{center} \label{fig:daemon} \caption{High-Level Structure of the ANet Daemon} + \end{figure} + + \begin{figure} + \begin{verbatim} + <!-- ******** Generic Entities ******** --> + <!ENTITY ANet.XMLVersion % 1.0a1> + + <!-- ******* Attribute Entities ******* --> + + <!-- Unique name for the element type. --> + <!ENTITY name % "name ID #REQUIRED"> + + <!-- Module name corresponding to that element. + A Module Instance will be created for each element with a module name. --> + <!ENTITY moduleName % "module CDATA #REQUIRED"> + + <!-- Arguments given to the module. They are POSIX-style arguments. + One-letter arguments: "-c -v" or "-cv". + String arguments: "-_-file="a.txt" (mentally delete underscore; + XML doesn't allow me to write that directly in XML comments). + You can mix both style of arguments. --> + <!ENTITY args % "args CDATA #IMPLIED"> + + <!-- Element security. This limits access for the Client Connection + Modules. The security attribute of an element is the one it has, if it's + not "no_change", otherwise it is the one from its closest ancestor with a + value other than "no_change". --> + <!ENTITY security % "access (r | w | rw | no_access | no_change) no_change"> + + <!-- ************ Elements ************ --> + + <!-- #FIXED attributes are values that can be changed only at run-time. + Their default are discarded when parsing and replaced with the generated + value. --> + + <!-- Root element --> + <!ELEMENT ANet (ClientConnection)+, BandwidthManager, (ClusterGroup)+, CoreModules, (Cluster)+> + <!ATTLIST ANet %security;> + + <!-- Cluster Group. Contains references to Clusters that compose + that Cluster Group. --> + <!ELEMENT ClusterGroup (ClusterRef)+> + <!ATTLIST ClusterGroup %name; %moduleName; %args; %security;> + + <!-- Cluster. Contains a Handshake Protocol and if needed + a Cluster Filter. --> + <!ELEMENT Cluster HandshakeProtocol, (ClusterFilter)?> + <!ATTLIST Cluster %id; %security; + id CDATA #FIXED> + + <!-- Handshake Protocol. Contains a list of initial connections + (live connections once opened) --> + <!ELEMENT HandshakeProtocol (Connection)*> + <!ATTLIST HandshakeProtocol %moduleName; %args; %security; + minConnections CDATA "0" + maxConnections CDATA "-1"> + + <!-- Connection. Has a Connection Protocol and, if needed, + a Packet Protocol. --> + <!ELEMENT Connection (PacketProtocol)?, ConnectionProtocol, (DataTransform)*> + <!ATTLIST Connection %security; + status (open | on_hold | closed) #FIXED + id CDATA #FIXED + inBuffer CDATA #FIXED + outBuffer CDATA #FIXED> + + <!-- Core Modules. Simply contains a list of CoreModule elements. --> + <!ELEMENT CoreModules (CoreModule)+> + <!ATTLIST CoreModules %security;> + + <!-- Those are empty elements. If you want those elements to contain an XML + structure, then define an attribute that contains a reference to an external + XML document. --> + + <!-- Client Connection Module --> + <!ELEMENT ClientConnection EMPTY> + <!ATTLIST ClientConnection %moduleName; %args; %security;> + + <!-- Bandwidth Manager Module --> + <!ELEMENT BandwidthManager EMPTY> + <!ATTLIST BandwidthManager %moduleName; %args; %security;> + + <!-- Core Module --> + <!ELEMENT CoreModule EMPTY> + <!ATTLIST CoreModule %moduleName; %args; %security;> + + <!-- Cluster Filter Module --> + <!ELEMENT ClusterFilter EMPTY> + <!ATTLIST ClusterFilter %moduleName; %args; %security;> + + <!-- Reference to a Cluster element --> + <!ELEMENT ClusterRef EMPTY> + <!ATTLIST ClusterRef + name IDREF #REQUIRED> + + <!-- Packet Protocol Module --> + <!ELEMENT PacketProtocol EMPTY> + <!ATTLIST PacketProtocol %moduleName; %args; %security;> + + <!-- Connection Protocol Module --> + <!ELEMENT ConnectionProtocol EMPTY> + <!ATTLIST ConnectionProtocol %moduleName; %args; %security; + id CDATA #FIXED + peerID CDATA #REQUIRED + subnet CDATA "Internet"> + + <!-- Data Transformation Module. Data Transformation Modules will be used + in ascending order of "order" for output (to the network), in descending + order for input (from the network). --> + <!ELEMENT DataTransform EMPTY> + <!ATTLIST DataTransform %moduleName; %args; %security; + order CDATA "-1"> + \end{verbatim} + \label{fig:completedtd} \caption{ANet Complete DTD} \end{figure} |
From: Christopher J. <cwj...@us...> - 2002-01-05 16:47:23
|
Update of /cvsroot/anet/Documentation/design/latex In directory usw-pr-cvs1:/tmp/cvs-serv26652 Modified Files: anet.bib Log Message: added some items in the bibliography Index: anet.bib =================================================================== RCS file: /cvsroot/anet/Documentation/design/latex/anet.bib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** anet.bib 2002/01/02 20:40:36 1.2 --- anet.bib 2002/01/05 16:47:20 1.3 *************** *** 7,11 **** % The makefile should take care of generating the bibliography correctly. ! @Misc{w3xml, OPTkey = {}, OPTauthor = {}, --- 7,11 ---- % The makefile should take care of generating the bibliography correctly. ! @Misc{w3-xml, OPTkey = {}, OPTauthor = {}, *************** *** 19,23 **** ! @Misc{applemem, OPTkey = {}, OPTauthor = {}, --- 19,23 ---- ! @Misc{apple-mem, OPTkey = {}, OPTauthor = {}, *************** *** 43,47 **** ! @Misc{uscip, OPTkey = {}, OPTauthor = {}, --- 43,47 ---- ! @Misc{usc-ip, OPTkey = {}, OPTauthor = {}, *************** *** 54,58 **** } ! @Misc{applehyp, OPTkey = {}, OPTauthor = {}, --- 54,58 ---- } ! @Misc{apple-hyp, OPTkey = {}, OPTauthor = {}, *************** *** 65,69 **** } ! @Misc{fsftar, OPTkey = {}, OPTauthor = {}, --- 65,69 ---- } ! @Misc{fsf-tar, OPTkey = {}, OPTauthor = {}, *************** *** 76,80 **** } ! @Misc{nwgmime, OPTkey = {}, OPTauthor = {}, --- 76,102 ---- } ! @Misc{fsf-lgpl, ! OPTkey = {}, ! OPTauthor = {}, ! title = {Free Software Foundation: ``GNU Lesser Generic Public License''}, ! howpublished = {\url"http://www.gnu.org/copyleft/lesser.html"}, ! OPTmonth = {}, ! OPTyear = {}, ! OPTnote = {}, ! OPTannote = {} ! } ! ! @Misc{fsf-gpl, ! OPTkey = {}, ! OPTauthor = {}, ! title = {Free Software Foundation: ``GNU General Public License''}, ! howpublished = {\url"http://www.gnu.org/copyleft/gpl.html"}, ! OPTmonth = {}, ! OPTyear = {}, ! OPTnote = {}, ! OPTannote = {} ! } ! ! @Misc{nwg-mime, OPTkey = {}, OPTauthor = {}, *************** *** 87,91 **** } ! @Misc{nwgmimec, OPTkey = {}, OPTauthor = {}, --- 109,113 ---- } ! @Misc{nwg-mimec, OPTkey = {}, OPTauthor = {}, |
From: Christopher J. <cwj...@us...> - 2002-01-05 16:46:38
|
Update of /cvsroot/anet/Documentation/design/latex In directory usw-pr-cvs1:/tmp/cvs-serv26461 Modified Files: anetdesign.tex Log Message: Added 2 more sections. Need to add the footnotes and references, though... Using the fancyhdr package for the headers, looks great!!! Index: anetdesign.tex =================================================================== RCS file: /cvsroot/anet/Documentation/design/latex/anetdesign.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** anetdesign.tex 2002/01/03 19:02:39 1.4 --- anetdesign.tex 2002/01/05 16:46:35 1.5 *************** *** 26,30 **** \usepackage{url} \usepackage{appendix} ! %\usepackage{fancyhdr} %\usepackage{pandora} % use the pandora fonts, they seem more modern \usepackage{concrete} --- 26,30 ---- \usepackage{url} \usepackage{appendix} ! \usepackage{fancyhdr} %\usepackage{pandora} % use the pandora fonts, they seem more modern \usepackage{concrete} *************** *** 44,48 **** % Let Latex write the pages headings. ! \pagestyle{headings} % Number all sections, but include only section and subsections in the ToC. \setcounter{secnumdepth}{5} \setcounter{tocdepth}{2} --- 44,49 ---- % Let Latex write the pages headings. ! %\pagestyle{headings} ! \pagestyle{fancy} % Number all sections, but include only section and subsections in the ToC. \setcounter{secnumdepth}{5} \setcounter{tocdepth}{2} *************** *** 742,776 **** \end{verbatim} \end{fmpage} ! \caption{The Cluster Group Modules DTD} \label{fig:cgdtd} \end{figure} \section{Cluster Filter Modules} \label{sec:clus} ! Define data filtering for a cluster. \section{ANet Core} \label{sec:ac} ! Does the actual data duplication within a cluster. Contains the ! query, static data and TWDT modules. \section{Handshaking Protocol Modules} \label{sec:hpm} ! Define what and how connections should be made and manage resumed ! connections. \section{Packet Protocol Modules} \label{sec:ppm} - Define the way the data will be streamed between two nodes. \section{Connection Protocol Modules} \label{sec:cpm} - Define how network connections, from a low-level point of view, should - be made between two nodes. \section{Bandwidth Manager Module} \label{sec:bbm} - Monitors the network connections to maintain bandwidth statistics. \section{Document Type Definition (DTD)} \label{sec:dtd} - This is the DTD file for the ANet configuration files. - \clearpage - \part{Low Level Design} \clearpage ! \pagenumbering{roman} \appendix \appendixpage --- 743,1083 ---- \end{verbatim} \end{fmpage} ! \caption{The Cluster Group Modules DTD} \label{fig:cgmdtd} \end{figure} \section{Cluster Filter Modules} \label{sec:clus} ! The Cluster Filter Modules are used to filter incoming and outgoing ! data in a cluster. ! ! \subsection{Design} ! \subsubsection{Role of the Filter Modules} ! The Cluster Filter Modules simply filters data coming in or out of a ! cluster. There could be various reasons why one would want to filter ! some packets, and this kind of module easily allows developers to do ! that. ! ! The filtering can be based on the data contained in the packets, the ! service number, or based on the information given by the Bandwidth ! Manager. ! ! Also, a Filter Module can decide to force disconnection of an ANet ! connection to the network if the same connection is not ``following ! the rules'' defined by the Filter Module\footnote{The ``origin or ! destination'' part of the AIP, when inside a Filter Module, is a ! connection ID.}. Thus, the Filter Modules have to very important role ! of defining the security requirements of a cluster; any connection ! that does not follow the security requirements of the Filter Module ! should eventually be disconnected. ! ! \subsubsection{Input/Output for the Filter Modules} ! As input, the Filter Modules will have a list of the AIPs \xs{sec:cgm} that can ! be filtered and a list of the connection IDs that want to send or ! receive that data. ! ! As output, you have to produce two lists. The first list is a list of ! indexes of the AIPs you want to delete. For example, if the fifth AIP ! in the input list of AIPs has to be deleted, then you add "5" to the ! list of AIP indexed to be deleted\footnote{Thus, you don't have to ! fill an list of the unfiltered AIPs. Anyways, that would be too ! awkward.}. The second list is a list of connection IDs to be deleted. ! ! \subsubsection{Other Functions} ! One other function has to be implemented in the Filter Modules, while ! another one is optional, but can be very useful for the deamon. ! ! The first function, the required one, gives as output its own ! definition of the security requirements. This definition consists of a ! "definition kind" and the definition itself. The definition will be ! used be the Handshaking Protocol Modules to tell to the other node ! what are the security requirements of the cluster. ! ! The second function, the optional one, is used to do ``forced'' ! filtering. The function will be called by the deamon when it finds out ! that to much data is trying get out at the same time. Without this ! function, the deamon will delete random packets, which might not be ! very good if some packets can be considered as more important than ! others. The input and output for this function is similar to the ! "main" function of the Filter Modules, but it additionally has both ! the total size of the AIP list, and the size, in bytes, of what needs ! to be deleted. ! ! \subsection{Implementation Notes} ! The Filter Modules do not have to be very complex. The easiest example ! is filtering by the service number. Actually, it is recommended that ! all Filter Modules implement this kind of filtering. Since Filter ! Modules can filter based on more than one logic, the security ! requirements is actually a list of the definition kind and the ! definition itself. Don't put too much information in the security ! requirements. For example, if you filter using keywords, giving a list ! of hundred of thousands of "banned" words would be a bad idea. The ! deamon will impose a tight limit on the total size of all security ! requirements of a Filter Module. ! ! \subsection{DTD} ! See the complete DTD for more information. ! \begin{figure}[!h] ! \begin{fmpage}{\textwidth} ! \begin{verbatim} ! <!-- Cluster Filter Module --> ! <!ELEMENT ClusterFilter EMPTY> ! <!ATTLIST ClusterFilter %moduleName; %args; %security;> ! \end{verbatim} ! \end{fmpage} ! \caption{The Cluster Filter Modules DTD} \label{fig:cfmdtd} ! \end{figure} \section{ANet Core} \label{sec:ac} ! The Core Modules are doing the actual data distribution within a ! network. ! ! \subsection{Design} ! \subsubsection{Why Core Modules?} ! We need to distribute data somewhere, so we need the Core Modules, ! right? Actually, if data distribution is so important, how come the ! most important part of the ANet Protocol resides in external modules? ! ! There is a simple answer: the rules of distribution themselves can be ! changed, and new distribution methods could be added. For example, ! let's say that we just found a way to optimize the distribution of ! Static Data. Then, the only thing we need to install is a newer ! version of the Static Data Module. No painful version upgrade is ! needed. ! ! \subsubsection{Input/Output of the Core Modules} ! The ``main'' function of each module is called with both a list of ! packets to distribute and a list of commands that were called by the ! clients. The list of packets is destroyed between each function ! call. Commands will also be deleted, but only if you mark them as "was ! used". All "used" commands will be deleted, while the other ones will ! be sent in a similar manner to the other Core Modules. Unused commands ! will be finally deleted if they were unused by all the Core ! Modules.(1) ! ! The input packets are AIPs. There is one buffer for all the cluster, ! thus it is up to the Core Module to figure out to which connections ! the packets should be re-transmitted. ! ! As output, the Core Module will have to produce one buffer per ! connection ID. The output packets must be ANet External Packets (AEP), ! which are totally platform independant. The deamon will provide some ! functions to transform an AIP to an AEP, though the modules might have ! to set some values by themselves(2). ! ! \subsubsection{Core Modules} ! Here is a high-level description of the Core Modules that will be ! implemented for the first versions of ANet.(3) + Query Module + + This module will implement queries[1] for ANet. A query packet is sent + to a connection only if the same packet was not sent recently and if + the "Time-to-Live" value of the packet is not 0. Also, the packet must + not be re-sent to the connection that originally sent the packet. + + To do that, the Query Module will keep a list of the packets recently + sent, in the form of a simple checksum(4) and the origin of each + packet. + + Static Data Module + + This module will implement Static Data[2] in ANet. It will mostly use + the hard disk to store the data, though it might need a larger cache + than the Query Module to keep its indexes and recently used static + packets. + + TWDT Module + + This module will implement Anonymous Two-Way Data Transfers (TWDT[3]) + in ANet. Its input come only from the client commands[4] made for the + TWDT module. + + This module will need to use the Query Module through Inter-Module + Communication[5], even though the caching of the queries it needs to + produce is handled by the TWDT Module itself. + + Managing Connections + + As input, the modules will always have a list of the connections, and + their state. That list is kept in the parsed configuration + file[5]. Here are the possible states. + + Open + The connection is open, thus it will accept input data and produce output data. + On Hold + The connection cannot do any input or output, but will soon become either Open again or be Closed. + Closed + The connection is forever closed. The connection will soon be removed from the connection list. + + The Core Modules cannot, by themselves, change the state of a connection. Only Cluster Filter Modules[6] and by Handshaking Protocol + Modules. + + \subsection{Implementation Notes} + Be careful implementing Core Modules. If they don't work, nothing will + happen. The entire ANet deamon depends on the implementation of the + Core Modules (hence the name ``Core''). The Core Modules are not + limited to the three basic Core Modules that will be first implemented + (Query, Static and TWDT). If you want the distribution to be based on + other rules, then you should implement new Core Modules. + + \subsection{DTD} + See the complete DTD for more information. + + \begin{figure}[!h] + \begin{fmpage}{\textwidth} + \begin{verbatim} + <!-- Core Modules. Simply contains a list of CoreModule elements. --> + <!ELEMENT CoreModules (CoreModule)+> + <!ATTLIST CoreModules %security;> + + <!-- Core Module --> + <!ELEMENT CoreModule EMPTY> + <!ATTLIST CoreModule %moduleName; %args; %security;> + \end{verbatim} + \end{fmpage} + \caption{The Cluster Filter Modules DTD} \label{fig:cfmdtd} + \end{figure} + + + + % Notes + + % (1) The Run-Time wrapper[5] will allow you to create as many new commands as you want. Actually, commands that are unrecognized by the + % wrapper will be sent to the Core Modules. + + % (2) For example, the "Time-to-Live" exists only in the AEPs (for query AEPs), so it is up to the Query Module to fill the value. Note that the + % format or the AEPs will be very similar to the format of the AIP, though without memory alignment and with strict rules for byte ordering. + + % (3) The modules were already described in the development introduction. They don't really have a high-level design, and the low-level design + % will be covered during development. That's because it's too simple (Query Module) or too complex (Static Data and TWDT Module) to be + % worth the time investment. Don't worry, the modules will be thoroughly documented once a stable implementation will be done. + + % (4) By simple, I mean easy to compute. For example, MD5[7] checksums would take too much CPU, and isn't very good for small data anyways. + + + % References + + % About the references... + + % [1] Benad: "Queries". Local link. + % [2] Benad: "Static Data". Local link. + % [3] Benad: "Anonymous Two-Way Data Transfers". Local link. + % [4] Benad: "Client Connection Modules". Local link. + % [5] Benad: "Run-Time Wrapper". Local link. + % [6] Benad: "Cluster Filter Modules". Local link. + % [7] Network Working Group: "The MD5 Message-Digest + % Algorithm". External link. + \section{Handshaking Protocol Modules} \label{sec:hpm} ! The goal of the Handshaking Protocol Modules is to provide and ! maintain network connections to the Core Modules[1]. ! ! \subsection{Design} ! \subsubsection{Role of the Handshaking Protocol Modules} ! The Handshaking Protocol Modules are there to provide an abstraction ! of network connections. From the point of view of the Core Modules, ! connections are identified by an ID, and Input/Output is done through ! buffers that will be given to the Handshaking Protocol Modules. So, it ! is up to the Handshaking Protocol Module to provide the IDs and to ! figure out to what actual protocol they point to. + Thus, it is up to the Handshaking Module to initaite and close the + actual connections. This includes the need to exchange information + about the distribution protocol itself, including the information + taken from the Filter Modules[2], hence the name \emph{Handshaking + Protocol}. + + It is important to note that it is not the role of the Handshaking + Protocol to define how the connections are identified, both internally + and in the configuration file. This is required, as many modules + require to "know" what the connections are, without forcing them to + "know" how the Hanshaking Protocol works. + + \subsubsection{Input/Output for the Handshaking Protocol Modules} + Basically, the entire Input and Output is in the parsed configuration + file[3]. The goal of the Hanshaking Protocol is to try to make + connections as in the current configuration, and update the + configuration to the current state of the connections (Open, Closed + and On Hold[1]). + + The current configuration also contains Memory Tags[3] for both Input + and Output buffers for each connection. This might be needed for some + Handshaking Protocols, though it is not the goal of the Handshaking + Protocol to produce or filter data in those buffers. + + \subsubsection{Connections} + So, what the connections consist of? To be able to properly identify + and use a connection in ANet, here's what is needed. + + Connection ID: The unique ID that identifies this connection. Read + only for all modules except the Handshaking Modules. Connection + State: The current state of the connection. It can be ``Open'', "Closed" + or "On Hold"[1]. Input Buffer: A buffer of AEPs that came from the + network on that connection. Output Buffer: A buffer of AEPs that will + go to the network on that connection. Packet Protocol Name: The name + of the Packet Protocol Module for that connection. Connection + Protocol Name: The name of the Connection Protocol Module for that + connection. Network ID: A unique identifier for the Connection + Protocol that identifies the other end of the connection. For example, + using TCP/IP[4], this is the IP address and port of the other + computer. Subnet: This is the "network subnet" of the + connection. Usually, this has a value representing "the + internet". This is useful only when the Connection Protocol can handle + routers and ``knows'' the difference between an internet and an + intranet connection. + + All of these values will be inside the current configuration settings. + + \subsection{Implementation Notes} + Use the "On Hold" status value when you are in the process of starting + or resuming a connection. Otherwise, the rest of the deamon and the + clients will keep sending data to the connection. You're not forced + to send the security rules to establish a connection, though not doing + so might result in unexpected disconnections, instead of initially + deciding to not connect because the current security rules cannot be + followed. You can write the Handshaking Protocol to ask, before the + beginning of the connection, a list of the Network IDs that are + connected to the other side of the connection to do some "network + discovery", though it is not required. If you do that, you can + implement a connection system similar to Gnutella[5] or Freenet[6]. + + \subsection{DTD} + See the complete DTD for more information. + + \begin{figure}[!h] + \begin{fmpage}{\textwidth} + \begin{verbatim} + <!-- Handshaking Protocol. Contains a list of inital connections + (live connections once opened) --> + <!ELEMENT HandshakingProtocol (Connection)*> + <!ATTLIST HandshakingProtocol %moduleName; %args; %security; minConnections CDATA "0" + maxConnections CDATA "-1"> + \end{verbatim} + \end{fmpage} + \caption{The Handshake Protocol Modules DTD} \label{fig:hpmdtd} + \end{figure} + + % References + + % About the references... + + % [1] Benad: "Core Modules". Local link. + % [2] Benad: "Cluster Filter Modules". Local link. + % [3] Benad: "Run-Time Wrapper". Local link. + % [4] University of Southern California , "Transmission Control Protocol". External link. + % [5] Semi-Official Gnutella Web Site. External link. + % [6] Freenet Web Site. External link. + \section{Packet Protocol Modules} \label{sec:ppm} \section{Connection Protocol Modules} \label{sec:cpm} \section{Bandwidth Manager Module} \label{sec:bbm} \section{Document Type Definition (DTD)} \label{sec:dtd} \clearpage ! %\part{Low Level Design} ! %\clearpage ! %\pagenumbering{Roman} \appendix \appendixpage |
From: Christopher J. <cwj...@us...> - 2002-01-03 19:02:41
|
Update of /cvsroot/anet/Documentation/design/latex In directory usw-pr-cvs1:/tmp/cvs-serv19628 Modified Files: anetdesign.tex Log Message: added 2 other sections Index: anetdesign.tex =================================================================== RCS file: /cvsroot/anet/Documentation/design/latex/anetdesign.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** anetdesign.tex 2002/01/02 20:40:36 1.3 --- anetdesign.tex 2002/01/03 19:02:39 1.4 *************** *** 11,17 **** % - If you add macros document them. % - If you use packages don't forget to add them in the directory. ! % - Please make your editor wrap the text. It's easier to read. I % speak for myself, I like having a split screen with 2 views on the ! % document. Under emacs this easily done with the auto-fill-mode. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- 11,17 ---- % - If you add macros document them. % - If you use packages don't forget to add them in the directory. ! % - Please make your editor wrap the text. It's easier to read. I % speak for myself, I like having a split screen with 2 views on the ! % document. Under emacs this easily done with the auto-fill-mode. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *************** *** 33,37 **** % Dimensions for 8.5" x 11" paper \textwidth 6.5in \textheight 9in ! % The default top margin is 1". The following command adjusts it to 0.5". \topmargin -0.5in % There are two margin widths to allow for two-sided printing. --- 33,37 ---- % Dimensions for 8.5" x 11" paper \textwidth 6.5in \textheight 9in ! % The default top margin is 1". The following command adjusts it to 0.5". \topmargin -0.5in % There are two margin widths to allow for two-sided printing. *************** *** 57,66 **** \newcommand{\la}{\mathopen{<}} \newcommand{\ra}{\mathopen{>}} - % trying to add the part command - %\newcounter{partnum} - %\newcommand{\part}[1]{\clearpage\thispagestyle{empty}% - %\refstepcounter{partnum}\addcontentsline{toc}{partnum}{#1}% - %\Huge{Part}} - % environment used for the DTD's \newsavebox{\fmbox} --- 57,60 ---- *************** *** 69,77 **** {\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}} ! % \newsavebox{\fmbox} ! % \newenvironment{fmpage}[1] ! % {\begin{lrbox}{\fmbox}\begin{minipage}{#1}} ! % {\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}} ! \newcounter{exnum} \newenvironment{example}[1]{\penalty-2000\vskip1.5\parskip --- 63,67 ---- {\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}} ! % Environment used for examples \newcounter{exnum} \newenvironment{example}[1]{\penalty-2000\vskip1.5\parskip *************** *** 95,99 **** \listoffigures \listoftables ! %do we need an abstract? %\clearpage %\begin{abstract} --- 85,89 ---- \listoffigures \listoftables ! % do we need an abstract? %\clearpage %\begin{abstract} *************** *** 189,193 **** memory, mark it as temporary so its memory could be freed if memory is tight, and so on.\footnote{This was ``inspired'' by, you know ! \ldots\cite{applemem}} Second, whenever a function in a module is called, the module instance --- 179,183 ---- memory, mark it as temporary so its memory could be freed if memory is tight, and so on.\footnote{This was ``inspired'' by, you know ! \ldots\cite{apple-mem}} Second, whenever a function in a module is called, the module instance *************** *** 246,250 **** \subsubsection{Configuration Management} The run-time wrapper will also manage the configuration files. The ! configuration files are XML\cite{w3xml} files\footnote{Why XML? The first thing is that I don't want the ANet configuration files to be too difficult to edit. Since ANet needs to have a structured --- 236,240 ---- \subsubsection{Configuration Management} The run-time wrapper will also manage the configuration files. The ! configuration files are XML\cite{w3-xml} files\footnote{Why XML? The first thing is that I don't want the ANet configuration files to be too difficult to edit. Since ANet needs to have a structured *************** *** 335,350 **** \subsubsection{Clients and Daemon} From the point of view of its architecture, ANet is actually several ! programs. Only one program manages the network: the ANet daemon\footnote{You can have more than one ANet daemon in the same machine, but why? ANet is flexible enough to allow isolated network to ! coexist in the same system.}. It is consisting of the run-time wrapper ! \xs{sec:rtw} and of different modules. The daemon itself does not ! ``use'' the network. The programs that want to use an ANet network ! will have to communicate with the daemon in order to do so. Those programs are the ANet Clients. The major advantage of doing so is that each time a developer wants to implement a new application for an anonymous network, that person does ! not need to re-implement the entire protocol again. This is similar to TCP, since it is being implemented in the operating system, the programmers won't have to re-implement TCP for each program that will --- 325,340 ---- \subsubsection{Clients and Daemon} From the point of view of its architecture, ANet is actually several ! programs. Only one program manages the network: the ANet daemon\footnote{You can have more than one ANet daemon in the same machine, but why? ANet is flexible enough to allow isolated network to ! coexist in the same system.}. It is consisting of the run-time wrapper ! \xs{sec:rtw} and of different modules. The daemon itself does not ! ``use'' the network. The programs that want to use an ANet network ! will have to communicate with the daemon in order to do so. Those programs are the ANet Clients. The major advantage of doing so is that each time a developer wants to implement a new application for an anonymous network, that person does ! not need to re-implement the entire protocol again. This is similar to TCP, since it is being implemented in the operating system, the programmers won't have to re-implement TCP for each program that will *************** *** 353,375 **** \subsubsection{Services} Since ANet is a protocol, it doesn't know what kind of data it is ! distributing. So, the same network could be used for completely different things, yet it is not aware of it. But then, the clients ultimately care about what kind of data they are ! going to send and receive. As a result, each packet of information ! will be identified by a Service Number. A Service is a specific use of the network, and as a result, a group of information that can be ! consistently created, analyzed and modified. This is similar to a ! "port" in IP\cite{uscip}. \subsubsection{Interaction Summary} The Clients Connection Modules are modules that fully represent, by ! themselves, entire clients. Downwards \xs{sec:rtw}, they receive commands\footnote{This what inspired by HyperTalk, the programming ! language of HyperCard\cite{applehyp}. Here's an example: ask ``What is your name?'' if the result is "Benad" then answer ``Wow! I have the same name!'' Here, ``ask'' and ``answer'' are commands, while ``the result'' ! is a function and ``is'' is an operator. This is not a joke! } from the ! clients and they transfer them downwards in the daemon. Upwards \xs{sec:rtw}, they receive relevent data from the rest of the daemon and they tranfer that data to the proper clients. --- 343,365 ---- \subsubsection{Services} Since ANet is a protocol, it doesn't know what kind of data it is ! distributing. So, the same network could be used for completely different things, yet it is not aware of it. But then, the clients ultimately care about what kind of data they are ! going to send and receive. As a result, each packet of information ! will be identified by a Service Number. A Service is a specific use of the network, and as a result, a group of information that can be ! consistently created, analyzed and modified. This is similar to a ! "port" in IP\cite{usc-ip}. \subsubsection{Interaction Summary} The Clients Connection Modules are modules that fully represent, by ! themselves, entire clients. Downwards \xs{sec:rtw}, they receive commands\footnote{This what inspired by HyperTalk, the programming ! language of HyperCard\cite{apple-hyp}. Here's an example: ask ``What is your name?'' if the result is "Benad" then answer ``Wow! I have the same name!'' Here, ``ask'' and ``answer'' are commands, while ``the result'' ! is a function and ``is'' is an operator. This is not a joke! } from the ! clients and they transfer them downwards in the daemon. Upwards \xs{sec:rtw}, they receive relevent data from the rest of the daemon and they tranfer that data to the proper clients. *************** *** 380,391 **** \begin{itemize} ! \item The user starts the ANet daemon. Thus, the clent connection module is started. \item The user starts the ANet client. \item The client connects itself to the client connection module. ! \item The client registers the services it will use. The client can receive and send data only for the services it registered for. \item The client connection module sends those registration requests ! to the rest of the daemon. Registration is actually made for the client connection module, so if more than one client connect to the module, then it has to remember which client requested what services. --- 370,381 ---- \begin{itemize} ! \item The user starts the ANet daemon. Thus, the clent connection module is started. \item The user starts the ANet client. \item The client connects itself to the client connection module. ! \item The client registers the services it will use. The client can receive and send data only for the services it registered for. \item The client connection module sends those registration requests ! to the rest of the daemon. Registration is actually made for the client connection module, so if more than one client connect to the module, then it has to remember which client requested what services. *************** *** 395,399 **** \item For all the data received from the network that have service numbers registered by the client connetion module, the daemon makes a ! copy of the data and sends it to the module. Also, for all commands that returns some value, the daemon sends the resulting data to the client connection module. --- 385,389 ---- \item For all the data received from the network that have service numbers registered by the client connetion module, the daemon makes a ! copy of the data and sends it to the module. Also, for all commands that returns some value, the daemon sends the resulting data to the client connection module. *************** *** 411,419 **** \item[Register/Unregister service] Given some service number, it ! registers that service for its calling module instance. You can also ! unregister some service you don't want to use anymore. If you pass a flag saying ``all services'', then the service number given will be ignored and all possible service numbers will be registered or ! unregistered. If you register all services, all other calls to this command will be ignored except the next ``unregister all services'' command. --- 401,409 ---- \item[Register/Unregister service] Given some service number, it ! registers that service for its calling module instance. You can also ! unregister some service you don't want to use anymore. If you pass a flag saying ``all services'', then the service number given will be ignored and all possible service numbers will be registered or ! unregistered. If you register all services, all other calls to this command will be ignored except the next ``unregister all services'' command. *************** *** 421,432 **** \item[Send packet] Sends an ANet packet, query[3] or static data[4], ! to the ANet network. The cluster group[5] where the packet will be ! sent has to be specified. Use the "Get Config" command (read below) to ! know which cluster groups you can use. The format of the "internal ANet packet" will be described in "Cluster Group Modules"[5]. \item[Get Status] Will make the ANet daemon return a packet describing ! its current status. The contents of this packet will be implementation specific and outside the scope of the high-level design, though it will contain enough relevant information to let the user know what's --- 411,422 ---- \item[Send packet] Sends an ANet packet, query[3] or static data[4], ! to the ANet network. The cluster group[5] where the packet will be ! sent has to be specified. Use the "Get Config" command (read below) to ! know which cluster groups you can use. The format of the "internal ANet packet" will be described in "Cluster Group Modules"[5]. \item[Get Status] Will make the ANet daemon return a packet describing ! its current status. The contents of this packet will be implementation specific and outside the scope of the high-level design, though it will contain enough relevant information to let the user know what's *************** *** 437,442 **** the "Start Polling" command to the time it gets the "Stop Polling" command, the daemon will regularly send status packets the the client ! connection module. This is usefull for clients that want to monitor ! the status of the ANet daemon. With the "Start Polling" command, you can also specify what is the delay between when ANet will send the status packets, though if that value is too small, the command will be --- 427,432 ---- the "Start Polling" command to the time it gets the "Stop Polling" command, the daemon will regularly send status packets the the client ! connection module. This is usefull for clients that want to monitor ! the status of the ANet daemon. With the "Start Polling" command, you can also specify what is the delay between when ANet will send the status packets, though if that value is too small, the command will be *************** *** 455,467 **** Given the protocol, the ``unique address'' and the "subnet" of the other node, ANet will try to establish a Two-Way Data ! Transfer [3] Channel (TWDTC) to the other node through the network. If ANet didn't already find which node to use as a proxy (that can have access to the protocol and subnet you specified), it might take some ! time to establich the connection. Use the ``Get status'' commands to ! know what's going on. ANet will return a packet containing an ID that can be used to identify the TWDTC with the other TWDTC commands. \item[Read/Write TWDTC] ! Read or write some data in the TWDTC. This is similar to reading or writing data in a TCP socket. --- 445,457 ---- Given the protocol, the ``unique address'' and the "subnet" of the other node, ANet will try to establish a Two-Way Data ! Transfer [3] Channel (TWDTC) to the other node through the network. If ANet didn't already find which node to use as a proxy (that can have access to the protocol and subnet you specified), it might take some ! time to establich the connection. Use the ``Get status'' commands to ! know what's going on. ANet will return a packet containing an ID that can be used to identify the TWDTC with the other TWDTC commands. \item[Read/Write TWDTC] ! Read or write some data in the TWDTC. This is similar to reading or writing data in a TCP socket. *************** *** 473,484 **** \item[Get Config] Returns the readeable tags in the configuration ! files \xs{sec:rtw}. Each tag in the configuration files can have ! access rights, that is read, write or both. If specified, it affects the tag, and recursively overwriting the access rights of the tags it ! contain. Otherwise, they remain to their default value. \item[Change Config] Allows the client connection module to change ! tags in the configuration file, it it has the right to do so. The change can be saved to the hard disk, instead of being temporary, if the user has configured ANet to do so. --- 463,474 ---- \item[Get Config] Returns the readeable tags in the configuration ! files \xs{sec:rtw}. Each tag in the configuration files can have ! access rights, that is read, write or both. If specified, it affects the tag, and recursively overwriting the access rights of the tags it ! contain. Otherwise, they remain to their default value. \item[Change Config] Allows the client connection module to change ! tags in the configuration file, it it has the right to do so. The change can be saved to the hard disk, instead of being temporary, if the user has configured ANet to do so. *************** *** 487,496 **** \subsection{Implementation Notes} There is no point of making one instance of the client connection ! module per connection to a client. Most instances should be made ! before having any connection to clients. Note that an instance cannot "instantiate itself" as the daemon receives a connection: the instance should exist to make whatever kind of connection it supports. A client connection module doesn't have to allow all the commands ! allowed the the daemon. Actually, those modules can be very sophisticated, for example gateways[7] --- 477,486 ---- \subsection{Implementation Notes} There is no point of making one instance of the client connection ! module per connection to a client. Most instances should be made ! before having any connection to clients. Note that an instance cannot "instantiate itself" as the daemon receives a connection: the instance should exist to make whatever kind of connection it supports. A client connection module doesn't have to allow all the commands ! allowed the the daemon. Actually, those modules can be very sophisticated, for example gateways[7] *************** *** 510,515 **** % maybe add a glossary ! % [1] Benad: "Run-Time Wrapper". Local link. ! % [2] University of Southern California , "Internet Protocol". External link. Cached. % [3] Benad: "Queries". Local link. % [4] Benad: "Static Data". Local link. --- 500,505 ---- % maybe add a glossary ! % [1] Benad: "Run-Time Wrapper". Local link. ! % [2] University of Southern California , "Internet Protocol". External link. Cached. % [3] Benad: "Queries". Local link. % [4] Benad: "Static Data". Local link. *************** *** 525,553 **** \subsection{Design} The goal of the Data Transformation modules is to change some data ! into another form. Their most common use is compression and decompression, but they can also be used for encryption, or for any other function that has an inverse function\footnote{Actually, it ! could be used for things like tar\cite{fsftar}, MIME\cite{nwgmime}, ! binhex\cite{nwgmimec}, or anything you can think of. Also, the input data for a transformation function could point to something outside ! the deamon, for example a database or the hard disk. So, it could be used to generate, if this is what you need.}. ! The data can be identified by a ``format'' tag. This 4-bytes value ! identifies the kind of data once it has been transformed. The "NULL" ! value identifies data that has not been transformed yet. The transformation function for each format use the input data as if it ! was untransformed data. Thus, the format tag has to be stored with the data before it is transformed to another kind of data\footnote{That is, you should store the previous format tag in a place that you can ! retrieve it once the data will be decoded back. Obviously, that's not needed if you assume that you're working with untransformed data.}. ! One instance is created for each Data Transform Module. Its initialization function should return a list of what format tags it supports, with both the actual, 4-byte tag and a Human-readable ! string, to make it easier to make the configuration file. It is assumed that for each supported format tag, both "transform to" and ! ``transform from'' functions are supported. Only one function is needed for each module, as the function will be passed the format tag, the "transformation direction" and a memory tag \xs{sec:rtw} that points to the --- 515,543 ---- \subsection{Design} The goal of the Data Transformation modules is to change some data ! into another form. Their most common use is compression and decompression, but they can also be used for encryption, or for any other function that has an inverse function\footnote{Actually, it ! could be used for things like tar\cite{fsf-tar}, MIME\cite{nwg-mime}, ! binhex\cite{nwg-mimec}, or anything you can think of. Also, the input data for a transformation function could point to something outside ! the daemon, for example a database or the hard disk. So, it could be used to generate, if this is what you need.}. ! The data can be identified by a ``format'' tag. This 4-bytes value ! identifies the kind of data once it has been transformed. The "NULL" ! value identifies data that has not been transformed yet. The transformation function for each format use the input data as if it ! was untransformed data. Thus, the format tag has to be stored with the data before it is transformed to another kind of data\footnote{That is, you should store the previous format tag in a place that you can ! retrieve it once the data will be decoded back. Obviously, that's not needed if you assume that you're working with untransformed data.}. ! One instance is created for each Data Transform Module. Its initialization function should return a list of what format tags it supports, with both the actual, 4-byte tag and a Human-readable ! string, to make it easier to make the configuration file. It is assumed that for each supported format tag, both "transform to" and ! ``transform from'' functions are supported. Only one function is needed for each module, as the function will be passed the format tag, the "transformation direction" and a memory tag \xs{sec:rtw} that points to the *************** *** 560,580 **** The run-time wrapper will allow all modules to call any data ! transformation function. If you need any kind of security system, it has to be implemented within the data transformation module. \subsection{Implementation Notes} I think that relying on Inter-Module Communication for calling Data ! Transformation functions would be too complex. The run-time wrapper could have a single ``TrasformData'' function, to which you give all the needed data, without having to care to which module it relates to. If two different modules can support the same format tag, than the one ! that will be used is undefined. So, if the data format could be implemented into various versions, it is recommended to store the version in the format tag itself\footnote{Please try to make your ! module ``fowards-compatible''. If you always use the same format tag accross versions, then it will be impossible to install two different versions of your module at the same time, which might be needed if your module is not backwards-compatible or if the latest version ! introduces new bug (don't worry, it always happen).}. Note that both the tag itself and its corresponding Human-readable string should be unique. --- 550,570 ---- The run-time wrapper will allow all modules to call any data ! transformation function. If you need any kind of security system, it has to be implemented within the data transformation module. \subsection{Implementation Notes} I think that relying on Inter-Module Communication for calling Data ! Transformation functions would be too complex. The run-time wrapper could have a single ``TrasformData'' function, to which you give all the needed data, without having to care to which module it relates to. If two different modules can support the same format tag, than the one ! that will be used is undefined. So, if the data format could be implemented into various versions, it is recommended to store the version in the format tag itself\footnote{Please try to make your ! module ``fowards-compatible''. If you always use the same format tag accross versions, then it will be impossible to install two different versions of your module at the same time, which might be needed if your module is not backwards-compatible or if the latest version ! introduces new bug (don't worry, it always happen).}. Note that both the tag itself and its corresponding Human-readable string should be unique. *************** *** 582,591 **** \subsection{DTD} See the complete DTD for more information. \begin{figure}[!h] \begin{fmpage}{\textwidth} \begin{verbatim} ! <!-- Data Transformation Module. Data Transformation Modules will be used ! in ascending order of "order" for output (to the network), in descending ! order for input (from the network). --> <!ELEMENT DataTransform EMPTY> <!ATTLIST DataTransform %moduleName; %args; %security; %security; order CDATA "-1"> --- 572,582 ---- \subsection{DTD} See the complete DTD for more information. + \begin{figure}[!h] \begin{fmpage}{\textwidth} \begin{verbatim} ! <!-- Data Transformation Module. Data Transformation Modules will be used ! in ascending order of "order" for output (to the network), in descending ! order for input (from the network). --> <!ELEMENT DataTransform EMPTY> <!ATTLIST DataTransform %moduleName; %args; %security; %security; order CDATA "-1"> *************** *** 599,604 **** ANet. \section{Cluster Group Modules} \label{sec:cgm} ! Define data duplication between different clusters. \section{Cluster Filter Modules} \label{sec:clus} --- 590,747 ---- ANet. + \subsection{Design} + The goal of the ANet Client SDK is simplify to its maximum the + development of ANet clients. It does so by giving several tools within + a library. + + \begin{itemize} + \item The actual connection with the a Client Connection Module in + ANet is done automatically by simply calling the "connect me" + function. Disconnection is also done with a simple function. + \item Sending and receiving data is simplified. You can send or + receive an array of packets with a single function call. + \item Functions are given to manage the stored static data[1] and to + read/change the configuration file. Functions are given to easily get + a list of the available cluster groups and connections without having + to "navigate" in the XML structure of the configuration file. + \item You can easily establish and use TWDT[2] connections, as if they + were BSD sockets. + \item Easily receive though callback functions messages from the + deamon (or actually the SDK itself) about the status of ANet, of the + network and so on. + \end{itemize} + + Obviously, the number of functions implemented in the SDK will + increase, based on suggestions given by the client + developers. Extensive documentation and examples will be also be given + with the SDK. + + \subsection{Implementation Notes} + The SDK functions should be distributed under LPGL[3], in the form of + a dynamic library\footnote{Programs that will use static linking with + the dynamic library from the ANet SDK must be distributed with a + license that ``permit modification of the work for the customer's own + use and reverse engineering for debugging such + modifications''\cite{fsf-lgpl}. What this means is that any part of + the ANet project, including the SDK, cannot be patented in any way... + }. Thus, developers can make clients that are not distributed under + GPL\cite{fsf-gpl} (the ANet deamon is distributed under GPL), for + example shareware or commercial. It is very important for the SDK to + be easy to understand and well documented\footnote{This is something + that is usually lacking in most open-source projects: they are so + difficult to understand (or to simply interface another program with + them) that while their code is ``open'', their logic is ``closed''. + That's why I'm wasting... err...investing a lot of time writing the + documentation. }. This means that examples of clients using the SDK + should be given. A lot of developer will have only the SDK as their + only point of view of ANet, so if it's not a good, it can give a bad + impression about the whole system. + + % [1] Benad: "Static Data". Local link. + % [2] Benad: "Anonymous Two-Way Data Transfers". Local link. + \section{Cluster Group Modules} \label{sec:cgm} ! The Cluster Group Modules are used to duplicate, when needed, data ! between different clusters[1]. ! ! \subsection{Design} ! \subsubsection{Role of the Cluster Group Modules} ! Each module instance represents by itself a cluster group. When ! clients want to send data to the network, they have to send the data ! to one specific cluster group. Thus, one of the things that a Cluster ! Group Module has to do is that, given the packets coming from the ! clients, it has to send the incoming packets to the proper clusters. ! ! Also, it is up to the Cluster Group Module to re-distribute the ! incoming packets from one cluster to another. This allows different ! clusters to exchange information. ! ! \subsubsection{Input/Output for the Cluster Group Modules} ! As input, the Cluster Groups need two things each time their "main" ! function is called. First, they need a list of cluster IDs. Those are ! unique numbers that identify all the clusters you have to receive or ! send data to. You can get additional information about the clusters ! from the parsed configuration file. The IDs are not part of the ! configuration file \xs{sec:rtw}, but are generated as the file is parsed, and ! they are attributes as if they were written in the configuration file ! itself\footnote{So, the IDs must not be saved back to disk. They are ! re-generated each time the deamon is launched, except when it is ! ``resumed''.}. Also, they need an "input buffer", which is a list of ! ANet Internal Packets (AIP). Each packet is identified with the ! cluster ID it came from. ! ! As output, they produce a list of AIPs, each one identified with the ! cluster ID it has to go to. ! ! \subsubsection{The ANet Internal Packets (AIP)} ! Now it's a good time to introduce the most important data structure in ! the ANet deamon: the ANet Internal Packets, AIP in short. ! ! An ANet Packet is very similar to packets in IP\cite{usc-ip}: they ! represent an independent block of information that cannot be broken ! down to be useful. You can split a large block of data into several ! ANet packets, as long as they contain enough information to be able to ! merge them back later in your client. ! ! The ANet Internal Packet is a representation of an actual External ! Packet (AEP), but for use within the deamon. The goal of this ! structure is to make it easy to transform and process. Thus, it ! follows byte-ordering and memory alignment of the compiled ! deamon. Also, the structure is much more flexible than the External ! one\footnote{}. ! ! The AIPs are broken into two: the header and the data. The size of ! both the header and data are not fixed, but may have a limitation in ! size. By allowing the header to be of any size, we allow future ! versions of the ANet deamon to store additional information (at the ! end of the header) that can be safely ignored by previous versions of ! the modules. ! ! So here is a list of what the header will, at minimum, contain: ! \begin{itemize} ! \item The \emph{total size} of the packet. ! \item The \emph{total header size}, which includes the space allocated for ! the value of the total size of the packet. ! \item The \emph{packet type}, which can be query, static, packet for a TWDTC, ! and so on. ! \item The \emph{service number}, which identifies what kind of data is ! contained in the packet (ftp, chat...). ! \item The \emph{origin or destination} of the packet. It's meaning depends on ! the context. Here, with Cluster Group Modules, they represent cluster ! IDs. ! \item \emph{Specific information} related to the packet type. For queries, ! you have a checksum. For static data, you have both the primary and ! secondary keys. ! \end{itemize} ! ! Functions in the run-time wrapper will be given to all the modules to ! simplify access to the data contained in the AIPs. ! ! \subsection{Implementation Notes} ! Even though it is expected that most Cluster Group Modules will work a ! lot with the Bandwidth Manager, I don't see the point of trying to add ! special access functions to the Bandwidth Manager. I'll make sure that ! the Inter-Module Communication \xs{sec:rtw} is simple enough to work with. ! Re-creating a new output buffer each time to fit the size of the ! buffer you want for the current function call might be slow. You ! should try to reuse as much as possible the same Memory Tag \xs{sec:rtw}, and ! resize it only when you find that it is not big enough. The run-time ! wrapper will assume that the data is not modified when it is ! duplicated. Otherwise, the modified data is considered a new data, ! which might cause a slight speed degradation in the ANet Core. ! ! \subsection{DTD} ! See the complete DTD for more information. ! \begin{figure}[!h] ! \begin{fmpage}{\textwidth} ! \begin{verbatim} ! <!-- Cluster Group. Contains references to Clusters that compose ! that Cluster Group. --> ! <!ELEMENT ClusterGroup (ClusterRef)+> ! <!ATTLIST ClusterGroup %name; %moduleName; %args; %security;> ! \end{verbatim} ! \end{fmpage} ! \caption{The Cluster Group Modules DTD} \label{fig:cgdtd} ! \end{figure} \section{Cluster Filter Modules} \label{sec:clus} |
From: Benoit N. <be...@us...> - 2002-01-03 17:27:02
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux In directory usw-pr-cvs1:/tmp/cvs-serv24371 Modified Files: Makefile.in XMLParser.c Log Message: Moved to libxml2 Index: Makefile.in =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.in 2002/01/02 21:48:37 1.3 --- Makefile.in 2002/01/03 17:26:59 1.4 *************** *** 8,12 **** # Change linker options here ! linker = gcc -lm -lxml # Add source and header files paths here --- 8,12 ---- # Change linker options here ! linker = gcc -lm -lxml2 # Add source and header files paths here Index: XMLParser.c =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/XMLParser.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XMLParser.c 2002/01/02 21:48:37 1.1 --- XMLParser.c 2002/01/03 17:26:59 1.2 *************** *** 1,6 **** #define DEFINE_XML_HASH #include "XMLParser.h" ! #include <gnome-xml/xmlmemory.h> ! #include <gnome-xml/parser.h> #include <stdlib.h> #include <string.h> --- 1,6 ---- #define DEFINE_XML_HASH #include "XMLParser.h" ! #include <libxml/xmlmemory.h> ! #include <libxml/parser.h> #include <stdlib.h> #include <string.h> |
From: Benoit N. <be...@us...> - 2002-01-02 21:48:39
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux In directory usw-pr-cvs1:/tmp/cvs-serv20035/ANet/ANet_Daemon/Linux Modified Files: Makefile.in main.c Added Files: XMLParser.c test.xml Log Message: Starting XML parser. --- NEW FILE: XMLParser.c --- #define DEFINE_XML_HASH #include "XMLParser.h" #include <gnome-xml/xmlmemory.h> #include <gnome-xml/parser.h> #include <stdlib.h> #include <string.h> ANetMemoryTag XMLHash; // TODO: Use MemoryTags everywhere // OR something like "XMLHashFlatten/Expand"... typedef struct { struct ANetTagIDListItem *next; struct ANetTagIDListItem *prev; ANetTagID id; ANetTag tag; } ANetTagIDListItem; typedef struct { struct ANetAttributeIDListItem *next; struct ANetAttributeIDListItem *prev; ANetAttributeID id; ANetAttribute attribute; } ANetAttributeIDListItem; typedef struct { ANetTagIDListItem *tags; ANetAttributeIDListItem *attributes; } ANetXMLHash; UInt32 ANetInitXMLParser() { XMLHash = NewMemoryBlock(sizeof(ANetXMLHash), 0); xmlKeepBlanksDefault(0); return 0; } UInt32 ANetCleanupXMLParser() { DeleteMemoryBlock(XMLHash); return 0; } UInt32 ANetParseXMLFile(char *file, ANetTagID *tag) { ANetXMLHash *hash; ANetTagIDListItem *curTag; xmlDocPtr doc; xmlNodePtr curNode; //char *name; if (!(doc = xmlParseFile(file))) return -1; if (!(curNode = xmlDocGetRootElement(doc))) { xmlFreeDoc(doc); return -1; } ResolveMemoryTag(XMLHash, (UInt8**)(&hash)); curTag = (ANetTagIDListItem*)(malloc(sizeof(ANetTagIDListItem))); curTag->tag.name = malloc(strlen(curNode->name)+1); strcpy(curTag->tag.name, curNode->name); curTag->next = NULL; curTag->tag.parent = NULL; curTag->tag.children = NULL; curTag->tag.attributes = NULL; curTag->id = 0; hash->tags = curTag; *tag = (ANetTagID)0; xmlFreeDoc(doc); xmlCleanupParser(); return 0; } UInt32 ANetGetTagName(ANetTagID tagID, UInt8 *nameBuffer, UInt16 maxNameSize) { ANetXMLHash *hash; ANetTagIDListItem *cur; ANetTag *tag; ResolveMemoryTag(XMLHash, (UInt8**)(&hash)); for (cur = hash->tags; cur; cur = (ANetTagIDListItem*)(cur->next)) { if (cur->id == tagID) break; } if (!cur) return -1; tag = &(cur->tag); if (strlen(tag->name)+1 >= maxNameSize) return -1; strcpy(nameBuffer, tag->name); return -1; } --- NEW FILE: test.xml --- <?xml version="1.0"?> <test> <child1/> <child2/> </test> Index: Makefile.in =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.in 2001/11/17 00:06:25 1.2 --- Makefile.in 2002/01/02 21:48:37 1.3 *************** *** 2,6 **** # Add paths to all the headers here. ! header_paths = -I. -I../Common -I../Core -I../Common/Lists # Change compiler options here --- 2,6 ---- # Add paths to all the headers here. ! header_paths = -I. -I../Common -I../Core -I../Common/Lists -I/usr/include # Change compiler options here *************** *** 8,12 **** # Change linker options here ! linker = gcc -lm # Add source and header files paths here --- 8,12 ---- # Change linker options here ! linker = gcc -lm -lxml # Add source and header files paths here Index: main.c =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.c 2001/12/01 01:48:09 1.4 --- main.c 2002/01/02 21:48:37 1.5 *************** *** 3,9 **** --- 3,11 ---- #include "Modules.h" #include "Args.h" + #include "XMLParser.h" void MemoryTest(); void ArgsTest(); + void ParserTest(); int main(int argc, char **argv) *************** *** 13,17 **** //Do some stuff here... //MemoryTest(); ! ArgsTest(); printf("Closing ANet daemon...\n"); --- 15,20 ---- //Do some stuff here... //MemoryTest(); ! //ArgsTest(); ! ParserTest(); printf("Closing ANet daemon...\n"); *************** *** 42,44 **** --- 45,61 ---- printf("%d\n", GetArgument(args, "hello-w", val, 40)); printf("%s\n", val); + } + + void ParserTest() + { + ANetTagID root; + char name[60]; + + ANetInitXMLParser(); + ANetParseXMLFile("test.xml", &root); + + ANetGetTagName(root, name, 60); + printf("Root tag's name is: \'%s\'\n", name); + + ANetCleanupXMLParser(); } |
From: Benoit N. <be...@us...> - 2002-01-02 21:48:19
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Common In directory usw-pr-cvs1:/tmp/cvs-serv19930 Added Files: XMLParser.h Log Message: Starting XML parser. --- NEW FILE: XMLParser.h --- #include "XMLCommon.h" #ifndef DEFINE_XML_HASH extern ANetMemoryTag XMLHash; #endif UInt32 ANetInitXMLParser(); UInt32 ANetCleanupXMLParser(); UInt32 ANetParseXMLBuffer(ANetMemoryTag buf, ANetTagID *root); //! For testing only! UInt32 ANetParseXMLFile(char *file, ANetTagID *root); |
From: Christopher J. <cwj...@us...> - 2002-01-02 20:40:42
|
Update of /cvsroot/anet/Documentation/design/latex In directory usw-pr-cvs1:/tmp/cvs-serv31460 Modified Files: anet.bib anetdesign.tex Log Message: added third section, fixed formating a bit Index: anet.bib =================================================================== RCS file: /cvsroot/anet/Documentation/design/latex/anet.bib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** anet.bib 2001/12/29 00:40:29 1.1 --- anet.bib 2002/01/02 20:40:36 1.2 *************** *** 19,23 **** ! @Misc{macmem, OPTkey = {}, OPTauthor = {}, --- 19,23 ---- ! @Misc{applemem, OPTkey = {}, OPTauthor = {}, *************** *** 42,44 **** --- 42,99 ---- } + + @Misc{uscip, + OPTkey = {}, + OPTauthor = {}, + title = {University of Southern California, ``Internet Protocol''}, + howpublished = {\url"http://www.ietf.org/rfc/rfc0791.txt"}, + OPTmonth = {}, + OPTyear = {}, + OPTnote = {}, + OPTannote = {} + } + + @Misc{applehyp, + OPTkey = {}, + OPTauthor = {}, + title = {Apple: HyperCard}, + howpublished = {\url"http://www.apple.com/hypercard/"}, + OPTmonth = {}, + OPTyear = {}, + OPTnote = {}, + OPTannote = {} + } + + @Misc{fsftar, + OPTkey = {}, + OPTauthor = {}, + title = {Free Software Foundation: ``tar''}, + howpublished = {\url"http://www.gnu.org/software/tar/tar.html"}, + OPTmonth = {}, + OPTyear = {}, + OPTnote = {}, + OPTannote = {} + } + + @Misc{nwgmime, + OPTkey = {}, + OPTauthor = {}, + title = {Networking Working Group: ``Multipurpose Internet Mail Extensions''}, + howpublished = {\url"http://www.ietf.org/rfc/rfc2045.txt,rfc2046.txt,rfc2047.txt, rfc2048.txt, rfc2049.txt"}, + OPTmonth = {}, + OPTyear = {}, + OPTnote = {}, + OPTannote = {} + } + + @Misc{nwgmimec, + OPTkey = {}, + OPTauthor = {}, + title = {Network Working Group: ``MIME Content Type for BinHex Encoded Files''}, + howpublished = {\url"http://www.ietf.org/rfc/rfc1741.txt"}, + OPTmonth = {}, + OPTyear = {}, + OPTnote = {}, + OPTannote = {} + } Index: anetdesign.tex =================================================================== RCS file: /cvsroot/anet/Documentation/design/latex/anetdesign.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** anetdesign.tex 2002/01/01 18:46:10 1.2 --- anetdesign.tex 2002/01/02 20:40:36 1.3 *************** *** 21,25 **** %=====================================================================% ! \documentclass[letterpaper]{article} \usepackage{latexsym} % Use special symbols. \usepackage{makeidx} % Make an index. --- 21,25 ---- %=====================================================================% ! \documentclass[letterpaper,titlepage]{article} \usepackage{latexsym} % Use special symbols. \usepackage{makeidx} % Make an index. *************** *** 57,61 **** \newcommand{\la}{\mathopen{<}} \newcommand{\ra}{\mathopen{>}} ! %environment used for the DTD's \newsavebox{\fmbox} \newenvironment{fmpage}[1] --- 57,67 ---- \newcommand{\la}{\mathopen{<}} \newcommand{\ra}{\mathopen{>}} ! % trying to add the part command ! %\newcounter{partnum} ! %\newcommand{\part}[1]{\clearpage\thispagestyle{empty}% ! %\refstepcounter{partnum}\addcontentsline{toc}{partnum}{#1}% ! %\Huge{Part}} ! ! % environment used for the DTD's \newsavebox{\fmbox} \newenvironment{fmpage}[1] *************** *** 85,89 **** \begin{document} \maketitle - \clearpage \pagenumbering{roman} \tableofcontents --- 91,94 ---- *************** *** 97,100 **** --- 102,106 ---- \clearpage \pagenumbering{arabic} + \part{High Level Design} \label{part:hld} This is the High-Level Design for ANet. It presents a non-technical view of the different components of ANet, how they work, how they *************** *** 200,205 **** system: \begin{description} ! \item[Files]: create, open, read, write, close and delete. ! \item[Directories]: create, read, delete \end{description} Once opened, files and directories are identified by an ID. The files --- 206,211 ---- system: \begin{description} ! \item[Files]: create, open, read, write, close and delete. ! \item[Directories]: create, read, delete \end{description} Once opened, files and directories are identified by an ID. The files *************** *** 207,213 **** of paths: \begin{description} ! \item[UNIX] \verb|/directory/directory/.../file.| \\Up one directory: .. ! \item[MacOS] \verb|Disk:folder:folder:...:file.| \\Up one directory: :: ! \item[Win32] \verb|Disk:\directory\directory\...\file.ext.|\\Up one directory: .. \end{description} --- 213,219 ---- of paths: \begin{description} ! \item[UNIX] \verb|/directory/directory/.../file.| \\Up one directory: .. ! \item[MacOS] \verb|Disk:folder:folder:...:file.| \\Up one directory: :: ! \item[Win32] \verb|Disk:\directory\directory\...\file.ext.|\\Up one directory: .. \end{description} *************** *** 215,229 **** that ANet will support, with the following restrictions: \begin{description} ! \item Win32 systems assume that there is a file extension. If none is given, a generic one will be added when the file is created. The generic file extension for ANet can be changed in the configuration files. ! \item The ``Disk'' part of the Win32 paths will be ignored on UNIX systems, except Mac OS X. ! \item On Mac OS 9, the file type and creator will be based on the file name extension. If the extension is missing, a generic type/creator pair will be given to the file when created. The default pair can be changed in the configuration file. ! \item Files and directories will be created with the default access privileges, which can be changed in the configuration file. \end{description} --- 221,235 ---- that ANet will support, with the following restrictions: \begin{description} ! \item Win32 systems assume that there is a file extension. If none is given, a generic one will be added when the file is created. The generic file extension for ANet can be changed in the configuration files. ! \item The ``Disk'' part of the Win32 paths will be ignored on UNIX systems, except Mac OS X. ! \item On Mac OS 9, the file type and creator will be based on the file name extension. If the extension is missing, a generic type/creator pair will be given to the file when created. The default pair can be changed in the configuration file. ! \item Files and directories will be created with the default access privileges, which can be changed in the configuration file. \end{description} *************** *** 361,368 **** themselves, entire clients. Downwards \xs{sec:rtw}, they receive commands\footnote{This what inspired by HyperTalk, the programming ! language of HyperCard\cite{applehyp}. Here's an example: ask "What is your name?" ! if the result is "Benad" then answer "Wow! I have the same name!" ! Here, "ask" and "answer" are commands, while "the result" is a ! function and "is" is an operator. This is not a joke! } from the clients and they transfer them downwards in the daemon. Upwards \xs{sec:rtw}, they receive relevent data from the rest of the daemon --- 367,374 ---- themselves, entire clients. Downwards \xs{sec:rtw}, they receive commands\footnote{This what inspired by HyperTalk, the programming ! language of HyperCard\cite{applehyp}. Here's an example: ask ``What is ! your name?'' if the result is "Benad" then answer ``Wow! I have the ! same name!'' Here, ``ask'' and ``answer'' are commands, while ``the result'' ! is a function and ``is'' is an operator. This is not a joke! } from the clients and they transfer them downwards in the daemon. Upwards \xs{sec:rtw}, they receive relevent data from the rest of the daemon *************** *** 403,407 **** \begin{description} ! \item[Register/Unregister service] Given some service number, it registers that service for its calling module instance. You can also unregister some service you don't want to use anymore. If you pass a --- 409,414 ---- \begin{description} ! \item[Register/Unregister service] ! Given some service number, it registers that service for its calling module instance. You can also unregister some service you don't want to use anymore. If you pass a *************** *** 411,425 **** command will be ignored except the next ``unregister all services'' command. ! \item[Send packet] Sends an ANet packet, query[3] or static data[4], to the ANet network. The cluster group[5] where the packet will be sent has to be specified. Use the "Get Config" command (read below) to know which cluster groups you can use. The format of the "internal ANet packet" will be described in "Cluster Group Modules"[5]. ! \item[Get Status] Will make the ANet daemon return a packet describing its current status. The contents of this packet will be implementation specific and outside the scope of the high-level design, though it will contain enough relevant information to let the user know what's going on in the daemon. ! \item[Get Status - Start/Stop polling] From the time the daemon gets the "Start Polling" command to the time it gets the "Stop Polling" command, the daemon will regularly send status packets the the client --- 418,438 ---- command will be ignored except the next ``unregister all services'' command. ! ! \item[Send packet] ! Sends an ANet packet, query[3] or static data[4], to the ANet network. The cluster group[5] where the packet will be sent has to be specified. Use the "Get Config" command (read below) to know which cluster groups you can use. The format of the "internal ANet packet" will be described in "Cluster Group Modules"[5]. ! ! \item[Get Status] ! Will make the ANet daemon return a packet describing its current status. The contents of this packet will be implementation specific and outside the scope of the high-level design, though it will contain enough relevant information to let the user know what's going on in the daemon. ! ! \item[Get Status -- Start/Stop polling] ! From the time the daemon gets the "Start Polling" command to the time it gets the "Stop Polling" command, the daemon will regularly send status packets the the client *************** *** 429,438 **** status packets, though if that value is too small, the command will be ignored. ! \item[Get Static Data] Given a primary and/or the secondary key, this will make ANet return all the static packets currectly stored locally that matches the key (or keys). ! \item[Change/Delete Static Data] Those commands will allow the module to change or delete some static packets currently stored locally. ! \item[Open TWDTC] Given the protocol, the ``unique address'' and the "subnet" of the other node, ANet will try to establish a Two-Way Data Transfer [3] Channel (TWDTC) to the other node through the network. If --- 442,457 ---- status packets, though if that value is too small, the command will be ignored. ! ! \item[Get Static Data] ! Given a primary and/or the secondary key, this will make ANet return all the static packets currectly stored locally that matches the key (or keys). ! ! \item[Change/Delete Static Data] ! Those commands will allow the module to change or delete some static packets currently stored locally. ! ! \item[Open TWDTC] ! Given the protocol, the ``unique address'' and the "subnet" of the other node, ANet will try to establish a Two-Way Data Transfer [3] Channel (TWDTC) to the other node through the network. If *************** *** 442,456 **** know what's going on. ANet will return a packet containing an ID that can be used to identify the TWDTC with the other TWDTC commands. ! \item[Read/Write TWDTC] Read or write some data in the TWDTC. This is similar to reading or writing data in a TCP socket. ! \item[Close TWDTC] Given an open TWDTC ID\footnote{If you know what "TWDTC ID" means, then you're ready to be a developer for ANet!}, closes the identified channel. ! \item[Get Config] Returns the readeable tags in the configuration files \xs{sec:rtw}. Each tag in the configuration files can have access rights, that is read, write or both. If specified, it affects the tag, and recursively overwriting the access rights of the tags it contain. Otherwise, they remain to their default value. ! \item[Change Config] Allows the client connection module to change tags in the configuration file, it it has the right to do so. The change can be saved to the hard disk, instead of being temporary, if --- 461,483 ---- know what's going on. ANet will return a packet containing an ID that can be used to identify the TWDTC with the other TWDTC commands. ! ! \item[Read/Write TWDTC] ! Read or write some data in the TWDTC. This is similar to reading or writing data in a TCP socket. ! ! \item[Close TWDTC] ! Given an open TWDTC ID\footnote{If you know what "TWDTC ID" means, then you're ready to be a developer for ANet!}, closes the identified channel. ! ! \item[Get Config] ! Returns the readeable tags in the configuration files \xs{sec:rtw}. Each tag in the configuration files can have access rights, that is read, write or both. If specified, it affects the tag, and recursively overwriting the access rights of the tags it contain. Otherwise, they remain to their default value. ! ! \item[Change Config] ! Allows the client connection module to change tags in the configuration file, it it has the right to do so. The change can be saved to the hard disk, instead of being temporary, if *************** *** 482,489 **** \end{figure} ! % References ! ! % About the references... ! % [1] Benad: "Run-Time Wrapper". Local link. % [2] University of Southern California , "Internet Protocol". External link. Cached. --- 509,513 ---- \end{figure} ! % maybe add a glossary % [1] Benad: "Run-Time Wrapper". Local link. % [2] University of Southern California , "Internet Protocol". External link. Cached. *************** *** 496,501 **** \section{Data Transformation Modules} \label{sec:dtm} ! Transform some data. \section{Client SDK} \label{sec:csdk} Group of libraries to simplify the process of building clients for --- 520,598 ---- \section{Data Transformation Modules} \label{sec:dtm} ! The data transformation modules are use to change data in various ! ways, such as encryption and compression. + \subsection{Design} + The goal of the Data Transformation modules is to change some data + into another form. Their most common use is compression and + decompression, but they can also be used for encryption, or for any + other function that has an inverse function\footnote{Actually, it + could be used for things like tar\cite{fsftar}, MIME\cite{nwgmime}, + binhex\cite{nwgmimec}, or anything you can think of. Also, the input + data for a transformation function could point to something outside + the deamon, for example a database or the hard disk. So, it could be + used to generate, if this is what you need.}. + + The data can be identified by a ``format'' tag. This 4-bytes value + identifies the kind of data once it has been transformed. The "NULL" + value identifies data that has not been transformed yet. The + transformation function for each format use the input data as if it + was untransformed data. Thus, the format tag has to be stored with the + data before it is transformed to another kind of data\footnote{That + is, you should store the previous format tag in a place that you can + retrieve it once the data will be decoded back. Obviously, that's not + needed if you assume that you're working with untransformed data.}. + + One instance is created for each Data Transform Module. Its + initialization function should return a list of what format tags it + supports, with both the actual, 4-byte tag and a Human-readable + string, to make it easier to make the configuration file. It is + assumed that for each supported format tag, both "transform to" and + ``transform from'' functions are supported. Only one function is needed + for each module, as the function will be passed the format tag, the + "transformation direction" and a memory tag \xs{sec:rtw} that points to the + data. + + Since some transformation functions might need to have additionnal + ``contextual'' information, such as compression level or encryption + settings, they can accept a fourth argument, which is a memory tag + that refers to the additional information. + + The run-time wrapper will allow all modules to call any data + transformation function. If you need any kind of security system, it + has to be implemented within the data transformation module. + + \subsection{Implementation Notes} + I think that relying on Inter-Module Communication for calling Data + Transformation functions would be too complex. The run-time wrapper + could have a single ``TrasformData'' function, to which you give all the + needed data, without having to care to which module it relates to. If + two different modules can support the same format tag, than the one + that will be used is undefined. So, if the data format could be + implemented into various versions, it is recommended to store the + version in the format tag itself\footnote{Please try to make your + module ``fowards-compatible''. If you always use the same format tag + accross versions, then it will be impossible to install two different + versions of your module at the same time, which might be needed if + your module is not backwards-compatible or if the latest version + introduces new bug (don't worry, it always happen).}. Note that both + the tag itself and its corresponding Human-readable string should be + unique. + + \subsection{DTD} + See the complete DTD for more information. + \begin{figure}[!h] + \begin{fmpage}{\textwidth} + \begin{verbatim} + <!-- Data Transformation Module. Data Transformation Modules will be used + in ascending order of "order" for output (to the network), in descending + order for input (from the network). --> + <!ELEMENT DataTransform EMPTY> + <!ATTLIST DataTransform %moduleName; %args; %security; %security; order CDATA "-1"> + \end{verbatim} + \end{fmpage} + \caption{The Data Transformation Module DTD} \label{fig:dtmdtd} + \end{figure} + \section{Client SDK} \label{sec:csdk} Group of libraries to simplify the process of building clients for *************** *** 529,532 **** --- 626,631 ---- This is the DTD file for the ANet configuration files. + \clearpage + \part{Low Level Design} \clearpage \pagenumbering{roman} |
From: Benoit N. <be...@us...> - 2002-01-01 22:55:56
|
Update of /cvsroot/anet/Documentation/user/text In directory usw-pr-cvs1:/tmp/cvs-serv12479/user/text Added Files: userIntro.txt Log Message: Starting user documentation. --- NEW FILE: userIntro.txt --- ******User Introduction to ANet. ***Client/Server - What is a server When you use a Web Browser (Microsoft Internet Explorer or Netscape, for example), the pages and images that you see are taken from computers that are called "servers". A server is a computer that allows other computers to retreive data from them, in this case Web pages. - What is a client On your side, you mostly retreive data from the server when you browse the Web. Your computer is thus a "client" in the communication. Usually several clients can use the same server at the same time. The different clients cannot exchange data directly with each other, they can only exchange data with the server. - Examples Here's an example. Let's look at the server sourceforge.net. As you can see in Figure 1, several computers, with a Web browser, can retreive at the same time the web pages stored in the server. The clients are not connected to each other, but each client can use the "Discussion Boards" available at sourceforge.net to store some information which can be read, through the server, by other clients. Another example is AIM (America Online Instant Messenger). If user Bob wants to send a message to user Alice, then the message will go from Bob, to the AIM server, to Alice. The advantage of doing so, instead of Bob sending the message directly to Alice, is that Alice could be using any computer to receive the message, as long as Alice is connected to the AIM server with the same user name. Then, Bob only has to know what is the user name of Alice, without knowing where Alice is, and Bob will be able to send a message to Alice when Alice is connected to the AIM server. ***Distributed Networks - What happens if you want to send data to more than one computer? Now, let's say that you want to send a message to a group of 10 people. Obviously, you can send the message to server which, in turn, will send the message to each person in the group. But would there be another way? - How a connection between a client and a server is made Think about the Internet as a whole. Your computer, when it is connected to the Internet, can communicate with almost any other computer on the Internet. But how the Internet works anyways? Is it some kind of big server? Obviously, it is impossible that the Internet is a single, big computer that has a single connection with all the computers on this planet. Obviously, several connections can be shared with a single but faster connection, a bit like highways. But if you look at roads, you can easily see that there are several roads, interconnected to each other, and some roads are fater than other. Computers are interconnected in a similar way to make the Internet. They produce, as a whole, a Network. (The Internet is, actually, a "Network of Networks", hence the name Internet) - Graph example If you look at Figure 2, you will see an example of a Network. Each dot (node) represents a computer, and each line represents a "connection" between two computers. Two computers can exchange data with each other only if there is a connection between them. Thus, A and Z cannot exchange directly data with each other. - Different ways to send data from A to Z But what if A wanted to send a message to Z? The message could take a path through B and F, or through E and H, or though many other possible paths. Or it could do what we call a "broadcast": A attaches the name "Z" to the message as the destination, A sends the message to B and, in turn, everyone that receives a copy of that message will make a copy of it to all the other computers they are connected to until everyone received it. This can be visualized as ssome kind of chain reaction, or some "ripple effect". Then, once all computers has a copy of the message, each computer looks at the destination name attached to the message (Z) and discards it if the computer's name does not match the destination name. Obviously, this is much slower that taking a direct path, since several copies are made, but it can have several advantages, as you will see later. - Distributed Networks As you can now see, several things can be made to transfer some data from a computer to another in a Network. But which computer makes the decision? In the previous example, A could make the whole decision. If a path has to be taken, the complete path information is attached to the message. But, in another way, A could tell B: "I want you to send that message to Z". Then, B will do its best to bring the data closer to Z. As you can see, A has no control to what happens to the message once it is in B's hands. But we just split up the problem of sending the message from A to Z into smaller, easier ones. Here, we can say that the "logic" used to send some message from a point to another is duplicated across the different computers. The logic is now Distributed. This is why this kind of network is called a Distributed Network. One particularity of Distributed Networks is that since the logic is "split up" to different computers, it is more difficult to know what happens in the network as a whole. For example, if A forgets to write "This message came from A" in the message, it will be very difficult for Z to know where the message came from. Z would need to ask F: "Where this came from?", and so on until it is traced back to the source. And that method doesn't work if one computer says: "I forgot", which makes everything harder. Another particularity of Distributed Networks is that if one computer cannot be accessed anymore, the network will still be able, as a whole, to transport messages between computers. For example, with AIM, if the AIM server cannot be accessed anymore, than no one can use AIM to exchange messages. Same thing for Web sites: if the Web serve cannot be accessed anymore (is "down"), then no one will be able to browse the Web site anymore. But with a Distributed Network, the service (instant messaging, web browsing) remains as a whole, even if the information maintained by the computer that is "down" cannot be accessed anymore. For example, if F is "down" in Figure 2, then A can still send messages to Z through the path A-E-H-Z, even if no messages can be sent to F anymore. ***ANet The goal of the ANet project is to help developers to implement and use Distributed Networks. This is because Distributed Networks share some common ideas and ANet tries to implement these ideas. ANet can be seen as a canvas: all the ideas about Distributed Networks are already there, you just need to "fill in the blanks". Thus, ANet should be easy to use and very flexible. The term "Anonymous", which is the "A" in ANet, represents that flexibility, or more precisely, its "lack of assumption" about how it will be used by the network developers. This "Anonymity" is characteristic to some Distributed Networks, actually all "Anonymous Networks" must be "Distributed Networks". More detailled information about this is in the "Developer Introduction to ANet". ***Why We Need ANet? Since ANet can implement any Distributed Network, ANet is useful if we need to implement a Distributed Network. So, why do we need an Distributed Network? Why is it so useful? - Availability The Network, as a means of data transportation, remains avalable, even if some of the computers that make the network stop working. - Data distribution Data sent in the Network can be eaily sent to many computers in the Network. - Flexibility The topology of the Network can be changed, and this change is transparent to most of the applications that use the Network. |
From: Benoit N. <be...@us...> - 2002-01-01 22:55:56
|
Update of /cvsroot/anet/Documentation/user/latex In directory usw-pr-cvs1:/tmp/cvs-serv12479/user/latex Added Files: fig1.dia fig2.dia Log Message: Starting user documentation. --- NEW FILE: fig1.dia --- xklÆ6¡¹ìgßÇ øm9IQfB£yþÖÛOYDzûîÇÜÓD¹ÝÃHï½»¹z;q7ð; ¹ ü(ywÝÅñâÍ`°Z÷9q"Ï]¢Hþs<Ï@¢AïæJÓöLØI®m®:qº£e,4ßëÞÈÁÒôÖ©6éÆÚã]÷^ݧ?½Á&Ìà ÎØg!ÂlØù"\H?.rIJâ$¯{i6©"HäOo^ýA_oisa«èFKEâ¹N]?¯ Ç[A!d[çKäKxò%Bùnt·Â8tÜ8/3 O8þZ)¢¾N4v<h2DzëG¿wã8¨¸ÿ{ÇNÉÀúòÏÞsnOîäxG<HQeåNâÙÝIŵþ()ú¹#OݽëÇ l¾i=/Ý*jú0MI¤Ù&Ù *ãÙt§æ`})3H¥ó(ÂMø÷»áIÛñ¦ÓïB0úWãMö>xߵߵ? /Bh:·p/ j¯¿+þÖÛ ¸zOs'×½¿õÃ"Ëf 5q8ºÅA¨°pß¡P^sã¤ÈÆ*W'G¾jô¶N>¿¬þ ÇbÈ ¬fÆQÆ,Öçȶ¹Y_ºØÙås Ú<ÕnÏBsWà¿t¦[Me :V§¾BÞååÒ1oRXůý9¨?ÕñåÈé?Ñ÷ÕQ+D}û«#Ç}982©®óæ¢Eø?q Ø F --- NEW FILE: fig2.dia --- ÓÒRßEÝílça9ä î^ûç¸(²g®ÿslq <ýýî9õN\æñâð¸S¢¥ûxQ¬n¿:j®²öGµ·ñ,®>N³Uÿ`Y½m?ßÅhûLOïi©iU<çx½Ü±§j1Q^UÿáqxUm\ÝôOZ!ýÍʽì~¾ óbôÃèSĸ¿GX4Åëñïh·ê^A@ ½FÚdß;yªîó~g¶U=ÕkÎÁ0]&QY;õ÷x °±þ£É(Ö·ó,O÷Úsxdª7wï¾W#Åà U/W #ÛUvÛ =?äbe.»ÃMÍäSN9ïØÍEôu¯}ê7L[sHj§\=èj¹p³mÌÒ¢É>_ùÝå1hwbcgO?íØÙeFÓ]Æ}ÌûY÷5&væLÞdðiôÌ!é:jî©(½[7pЦ1¢m<"ÞùØùXcØ!õA}ó:ÅÔ'H¿+.ÁoáÖqèÇ\q·è·°0 ÿDôÐß ýøHªÀ# èïýÄýÄÃ.~ï5ìMÈY~Ý£¿»[ú_ú?èï~Z¢ ý=£Z£FlîýÒ iôk}¨_ºGw·ô¿>ôÿ4 ¿#úUõý=£ÙGý¾"xÌĤ±¤p%=iÂmp'!áõ !¡ãÀ<ácÅä0ô7ðsäÈy vÒ BLÕíH×*nõ³y{K¹òþÒ%ÌO0Þýpб=¡GQ äÄ! âTQ b%xÊÇaçnq³} ¸pÓSôË^H¿ö[EÏ0%:»S³Ì§`A[SøêYfá dÕÛêdó |üI¤_þBúµ_ïNýQ˸ï8ý%DÍÒXÄ-%¬ê@®%Üæg³ÅEJ¸ÈÓR0;õD]Øw¬1RJ1Ê´1ÅU¬{7ûÙ¤`31ª..«Å²Èê/[¯7$¨ê]áZÅکǦg(¤&#wʵúÙ´bE«X_º4SR±ýÚ)\ö®^¢KÀW?nõ ª<éKrâ6?×hK_Áù¥ÉXZÈ8Øý¬ìKÆòI$:º"pÓ)Va>ÕËFÒv=$uN6® ±º¡ÿ;9Ý)ê/g%p¡&úi6è a©±ú %ðó¡7ôÕ*%Å&c~>ï÷+[?¡#Bg/v}vn"M°D¤¢zU6gf½´Æ±k·¹y`iéÅML6skµhõ$`ÎFè>Õ«û;§áÇ \3Æ*S:=1AÈû@¢ÑÍÿ[FGlнPJGì¿Q}ÿ3=ÚºT±æoe ) có°Ç]k¸ÍËEù Øf~øt ïÍ×=ß\í|ôÍÕ¿3; a |