Skip to content
Snippets Groups Projects
Commit 4583884b authored by Sven Robertz's avatar Sven Robertz
Browse files

more cleanup and reorganization

parent d7b40aa9
No related branches found
No related tags found
No related merge requests found
Showing
with 32 additions and 10 deletions
File moved
File moved
File moved
(cd ../../lib/c; make)
java -jar ../../labComm.jar --java=gen --c=gen/simple.c --h=gen/simple.h simple.lc java -jar ../../labComm.jar --java=gen --c=gen/simple.c --h=gen/simple.h simple.lc
javac -cp ../../lib/java:. gen/*.java Encoder.java Decoder.java javac -cp ../../lib/java:. gen/*.java Encoder.java Decoder.java
......
The simple labcomm example over a datagram channel
files:
udp_encoder.c : the same as the simple encoder, but over an UDP writer
udp_decoder.c : d:o
thr_example.c : the samei over a raw ethernet datagram protocol, in one file,and parameterized
to take the ethernet interface to use and the destination to send to as
command line parameters
(cd ../../../lib/c; make)
gcc -o thr_example -L ../../../lib/c -I . -I .. -I ../../../lib/c thr_example.c ../gen/simple.c -llabcomm
#gcc -o thr_example -L ../../../lib/c -I . -I .. -I ../../../lib/c thr_example.c ../gen/simple.c ../../../lib/c/labcomm_thr_reader_writer.c ../../../lib/c/ThrottleDrv/*.c -llabcomm
(cd ../../../lib/c; make)
gcc -g -o udp_encoder -L ../../../lib/c -I . -I .. -I ../../../lib/c udp_encoder.c ../gen/simple.c ../../../lib/c/labcomm_udp_reader_writer.c udp_hack.c -llabcomm
gcc -g -o udp_decoder -L ../../../lib/c -I . -I .. -I ../../../lib/c udp_decoder.c ../gen/simple.c ../../../lib/c/labcomm_udp_reader_writer.c udp_hack.c -llabcomm
File moved
File moved
File moved
File moved
#gcc -o thr_encoder -L ../../lib/c -I . -I ../../lib/c thr_encoder.c gen/simple.c ../../lib/c/labcomm_thr_reader_writer.c ../../lib/c/ThrottleDrv/*.c -llabcomm
#gcc -o thr_decoder -L ../../lib/c -I . -I ../../lib/c thr_decoder.c gen/simple.c ../../lib/c/labcomm_thr_reader_writer.c ../../lib/c/ThrottleDrv/*.c -llabcomm
gcc -o thr_example -L ../../lib/c -I . -I ../../lib/c thr_example.c gen/simple.c ../../lib/c/labcomm_thr_reader_writer.c ../../lib/c/ThrottleDrv/*.c -llabcomm
gcc -g -o udp_encoder -L ../../lib/c -I . -I ../../lib/c udp_encoder.c gen/simple.c ../../lib/c/labcomm_udp_reader_writer.c ../../lib/c/udp_hack.c -llabcomm
gcc -g -o udp_decoder -L ../../lib/c -I . -I ../../lib/c udp_decoder.c gen/simple.c ../../lib/c/labcomm_udp_reader_writer.c ../../lib/c/udp_hack.c -llabcomm
CC = gcc CC = gcc
CFLAGS = -g CFLAGS = -g
liblabcomm.a : labcomm.o labcomm_fd_reader_writer.o ethaddr.o liblabcomm.a : labcomm.o labcomm_fd_reader_writer.o labcomm_udp_reader_writer.o labcomm_thr_reader_writer.o ethaddr.o ThrottleDrv/ethernet_drv.o ThrottleDrv/throttle_drv.o
ar -r liblabcomm.a labcomm.o labcomm_fd_reader_writer.o ethaddr.o # ar -r liblabcomm.a labcomm.o labcomm_fd_reader_writer.o ethaddr.o
ar -r liblabcomm.a $^
labcomm.o : labcomm.c labcomm.h labcomm_private.h labcomm.o : labcomm.c labcomm.h labcomm_private.h
...@@ -10,6 +11,8 @@ labcomm_fd_reader_writer.o : labcomm_fd_reader_writer.c labcomm_fd_reader_write ...@@ -10,6 +11,8 @@ labcomm_fd_reader_writer.o : labcomm_fd_reader_writer.c labcomm_fd_reader_write
ethaddr.o: ethaddr.c ethaddr.o: ethaddr.c
%o: %c %h
clean: clean:
rm *.o rm *.o
......
Throttlenet library
The library consists of a generic part and readers/writers for the low-level transport.
The stable low-level is the _fd_ variety, on top of unix sockets.
Currently, experimental varieties include datagrams on top of UDP and raw ethernet
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment