No description
Find a file
2024-03-07 11:41:02 +01:00
README.md doc: usage 2024-03-07 11:41:02 +01:00
sujet-TP-AIPS-3MIC.pdf First files upload 2024-02-29 18:44:49 +01:00
TP-AIPS-2024-ALNET-Paul-preparation-v1-v4.md feat(prepa): add pseudo-code for v1-v4 2024-03-01 15:36:37 +01:00
tsock_compliquev1.c wip(v3): message index formatting 2024-03-01 17:15:29 +01:00
tsock_v0.c fix(v0): incorrect main return type 2024-03-07 09:56:41 +01:00
tsock_v1.c feat: command usage uses agv0 2024-03-07 11:40:32 +01:00
tsock_v2.c feat: command usage uses agv0 2024-03-07 11:40:32 +01:00
tsock_v3.c feat: command usage uses agv0 2024-03-07 11:40:32 +01:00

TP_AIPS

  • Groupe : 3IR C 2023-2024
  • Étudiants :
    • LACAU Clement
    • ALNET Paul

Building

Compile version X :

gcc -Wall -Wpedantic tsock_vX.c -o t_sockvX

Or compile all versions:

gcc -Wall -Wpedantic tsock_v1.c -o t_sockv1
gcc -Wall -Wpedantic tsock_v2.c -o t_sockv2
gcc -Wall -Wpedantic tsock_v3.c -o t_sockv3
gcc -Wall -Wpedantic tsock_v4.c -o t_sockv4

Generate zip archive (replace TP1 with relevant indication) :

zip LACAU-ALNET-TP1.zip tsock_v*.c README.md

Running

usage: ./t_sockv1 <-u> [-ps] [host] <port>
parameters: host  With -s, address of the host to connect to. Required with -s.
            port  Port to connect or bind to. Required.
options: -p       Runs a TCP/UDP sink. Incompatible with -s.
         -s       Runs a TCP/UDP faucet. Incompatible with -p.
         -u       Use UDP instead of TCP. Required.

usage: ./t_sockv2 [-psu] [host] <port>
parameters: host  With -s, address of the host to connect to. Required with -s.
            port  Port to connect or bind to. Required.
options: -p       Runs a TCP/UDP sink. Incompatible with -s.
         -s       Runs a TCP/UDP faucet. Incompatible with -p.
         -u       Use UDP instead of TCP.

usage: ./t_sockv3 [-psu] [-n nb_messages] [-l mess_length] [host] <port>
parameters: host         With -s, address of the host to connect to. Required with -s.
            port         Port to connect or bind to. Required.
options: -l mess_length  Size of the messages to send. Min 5. Max 1400. Default 30.
         -n nb_messages  Number of messages to send. Min 1. Default 10. Ignored with -p.
         -p              Runs a TCP/UDP sink. Incompatible with -s.
         -s              Runs a TCP/UDP faucet. Incompatible with -p.
         -u              Use UDP instead of TCP.

Example usage of v3 :

./t_sockv3 -p -l 15 4000            # receiver
./t_sockv3 -s -l 15 localhost 4000  # sender

Roadmap

  • tsock-v1
  • tsock-v2
  • [WIP] tsock-v3
  • tsock-v4