Installation Guide for Adaptation Service Demo
Three linux computers with gnu c compiler. We call them linux box A, B and C. B will play the role of the adaptation server; A will play the role of the content provider and C will play the role of the end user. The scenario is A will send some files to C through B, where the content will be adapted.
1. Download the distribution in GNU zip format to computer A;
2. Run: "gunzip edifv1.tar.gz" and "tar -xvf edifv1.tar" in order;
You'll see three examples in the distribution directory: "hyperlinking", "adremover", and "relayout".
3. In each of the three directory, search file "common.h", and open it with your favorite text editor. Search "#define FROM_IP" and "#define TO_IP", and put IP address of A and C behind them, repectively, then save it.
For example, if A's IP address is 192.168.0.150, and C's IP address is 192.168.0.160, then common.h should be like:
#define FROM_IP "192.168.0.150"
#define TO_IP "192.168.0.160"
4. In each of the three directory, run "makearedif", "makecpedif" and "gcc -o eu eu.c";
5. Copy all files in distribution directory to computer B and C;
In the following procedures, we take "hyperlinking" as the example to show compiling and running procedures, and the other two are similar.
6. At computer B, we run: "arbuffedif", "arinedif &", "aroutedif &" and "apiedif &" in sequence;
7. At computer C, we run: "eu";
8. At computer A, we run: "cpbuffedif", "cpsenderedif <B's IP address> &" and "cpip6edif" will start sending files to C through B.
Open the "index.html" file in computer A and compare the same file in computer C, if two hyperlinks are added, the demo is successful.
1. The program will use port 7788 and 8877 as communication ports, please leave them available. To change them, search the values in "common.h" and change them to what you want.
2. The demo can also be run with only 2 computers, as computer A and C could be combined together. In that case, the "From_IP" and "To_IP" are the same. But please do not combine A, B, C all together in one computer, since that will mess up the share memory settings.
3. "filenames.edif" contains the files that you are going to transfer via the adaptation router. In "relayout" example, "apiconfig.edif" contains the portion that an user choose to display in his device. Portions starting with a "#" is omitted.