Skip to content

Sartech-B/TCP-networking

Repository files navigation

Brandon Hall
BrandonHall95173@arizona.edu

Sarthak Bawal
sarthakbawal@arizona.edu


Packet Structure:
There are two different packet structures for the two types of messages:

1. Heartbeat Message - The header is represented by the following struct:
                    char type - indicates type of message ('H' for heartbeat)
                    unsigned long id - Unique id to distinguish clients
                    int ackn - last ackn number

2. Telnet (Payload) Message - Contains telnet messages:
                    char type - indicates type of message ('P' for telnet payload)
                    int seqn - seqn number of the message
                    int ackn - last ackn number
                    int size - size of payload message
                    The remainder of the message is the telnet message of size 'size'.


LinkedList Structure:
The Linked List is represented by a struct:
                    Node* head - The first element of the list
                    Node* tail - The last element of the list
                    int   size - The amount of nodes in the list
                    Node* current - For itterating over the list

The Node is represented by a struct:
                    char* msg - The entire packet to send
                    int   len - The length of the packet
                    int   seqn - The seqn of the packet (For removing old acked packets)
                    struct node* next - The nexx node in the list

Giving the list an ack number whenever a packet is recieved tells it to free and remove all packets below the seqn.
All unacked packets resent on first heartbeat


As far as we know, everything in the project is working perfectly. We do recognize that if you call "ping localhost" 
while connected to telnet, it may take about a minute or two for the ip change to resend packets if there was no
ip for more than a few seconds. It works quickly if the IP gets removed and added at the same time (similar to the demo).


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors