fix(v3): missing endlines

This commit is contained in:
Paul Alnet 2024-03-07 11:02:49 +01:00
parent 27a98ee4b3
commit a99528d35d

View file

@ -66,10 +66,10 @@ int main (int argc, char **argv)
// Packets are numerotated with 5 figures, which means the number of
// packets send can't be bigger than (or equal) 10 ** 6
if (nb_message >= 100000) {
printf("Too many packets");
printf("Too many packets. (Max 99999)\n");
exit(1);
} else if (nb_message <= 0) {
printf("Lets try to send all at least one message (:");
printf("Lets try to send all at least one message (:\n");
exit(1);
}
break;
@ -83,11 +83,11 @@ int main (int argc, char **argv)
// A TCP packet is roughly 1500 bytes. We allow for some overhead.
// We provide an MTU of 1400 bytes.
if(lg >= 1400) {
printf("Messages too long (max 1400)");
printf("Messages too long (max 1400)\n");
exit(1);
} else if (lg < 5) {
// The message size includes the message number, whos size is 5.
printf("Messages too long (min 5)");
printf("Messages too short (min 5)\n");
exit(1);
}
@ -236,7 +236,7 @@ int main (int argc, char **argv)
// Demande de connexion
int succ;
if ((succ=connect(sock,(struct sockaddr*) &adr_dest,longueur_adr_dest))!=0){
printf("Echec connect");
printf("Echec connect\n");
exit(1);
}
@ -361,7 +361,7 @@ void print_usage() {
printf("usage: tsock_v3 [-psu] [-n nb_messages] [-l mess_length] [host] <port>\n");
printf("parameters: host With -s, address of the host to connect to. Required with -s.\n");
printf(" port Port to connect or bind to. Required.\n");
printf("options: -l mess_length Size of the messages to send. Min 5. Max 1400. Default 30. Ignored with -p.\n");
printf("options: -l mess_length Size of the messages to send. Min 5. Max 1400. Default 30.\n");
printf(" -n nb_messages Number of messages to send. Min 1. Default 10. Ignored with -p.\n");
printf(" -p Runs a TCP/UDP sink. Incompatible with -s.\n");
printf(" -s Runs a TCP/UDP faucet. Incompatible with -p.\n");