Đang Thực Hiện

C Programming Socket Mobile IP Urgent

You will need to write 4 programs (all very small).

The Data Source opens a UDP port, sets the destination to the Home Agent IP/Mobile Node port, and sends a packet once per second, with increasing sequence numbers. The source IP/port do not matter.

The Home Agent opens a UDP port with source bound to Home Agent IP/Mobile Node port and sets destination to Foreign Agent IP/Foreign Agent port. If it receives a packet on this port, it is either a registration request from the Mobile Node or a data packet from the Data Source. If it is a registration packet, the Home Agent changes the destination to Foreign Agent IP/ new Foreign Agent port. If it is a data packet, it sends the packet to the current care-of address. (Note, that in real life, the HA would listen for registration packets on its own port, not the mobile node's. It's easier to listen on one port than two, but you may do it either way.)

The 2 Foreign Agents open a UDP port, bind the source to Foreign Agent IP/Foreign Agent port, and set the destination to Foreign Agent IP/Mobile Node port. (Remember that Foreign Agent IP =Mobile Node IP.) Each time they rceive a packet, they forward it on to the mobile.

The Mobile Node opens a UDP port with source bound to Foreign Agent IP/Mobile Node port and destination set to Home Agent IP/Mobile Node port. Every 5 seconds, it sends a registration request to the Home Agent with the alternate Foreign Agent's care-of address in the packet. (We assume that the Mobile Node knows the care-of addresses for the 2 Foreign Agents.) When it receives a packet, it must make sure that it has come from the right Foreign Agent (by comparing the source port to the currently registered Foreign Agent). When the Mobile Node has run for 100 seconds it should exit.

________________________________________

Output

Each program must print out an indication of events which occur.

The Data Source must print a line showing the sequence number of the packet sent, the time sent, and the destination IP/port.

Example:

Sequence Number = 1 Time = 15:22:34 Dest = [url removed, login to view]

Sequence Number = 2 Time = 15:22:35 Dest = [url removed, login to view]

The Home Agent receives two types of messages, data packets and registration packets. For data packets, it should print the sequence number, the time, and which Foreign Agent it is forwarding the packet to. For registration packets, it should print the time, and a message indicating what the new care-of address is.

Example:

Sequence Number = 2 Time = 15:22:34 Forwarded to [url removed, login to view]

Sequence Number = 3 Time = 15:22:35 Forwarded to [url removed, login to view]

Registration packet received. Time = 15:22:36 Changing care-of address to [url removed, login to view]

Sequence Number = 4 Time = 15:22:37 Forwarded to [url removed, login to view]

The Foreign Agents should print an indication of the time, the sequence number, and the destination each time they receive a packet and forward it.

Example:

Sequence Number = 2 Time = 15:22:35 Forwarded to [url removed, login to view]

Sequence Number = 3 Time = 15:[url removed, login to view] Forwarded to [url removed, login to view]

The Mobile Node will receive data packets and send registrations. For data packets, it must print out the sequence number, the time of arrival, the Foreign Agent address, and an indication of whether the packet came from the right Foreign Agent or not (based on the source port). If not, it must be rejected (because in real life, the Mobile could no longer communicate with the old Foreign Agent). Registration packets should be indicated with the time and the new care-of address.

Example:

Sequence Number = 3 Time = 15:22:35 FA = [url removed, login to view] Accepted

Registration sent. Time = 15:22:36 New care-of address = [url removed, login to view]

Sequence Number = 4 Time = 15:22:36 FA = [url removed, login to view] Rejected

Sequence Number = 5 Time = 15:22:37 FA = [url removed, login to view] Accepted

Deadline: within 16 hours.

Only bid if you can do it right now.

Thanks

Kỹ năng: Lập trình C

Xem thêm: program mobile, programming mobile, mobile programming, urgent messages socket programming, types programming, s programming, programming types, programming programs, programming life, programming number, programming events, print source, own programming, source programming, open source programming, number programming, node programming, node based programming, life programming, home programming, programming example, programming data types, old messages, programming home, write mobile

Về Bên Thuê:
( 1 nhận xét ) NY, Vietnam

Mã Dự Án: #1669660

Đã trao cho:

hvm2hvm

Hello, I've got loads of experience with low-level networking and I'm a good programmer that can make reliable programs. I'm bidding low because I'm new to freelancer and want to catch a project. I assure you my work w Thêm

$50 USD trong 1 ngày
(1 Đánh Giá)
1.4

4 freelancer đang chào giá trung bình $80 cho công việc này

samitXI

Ready to start now. Thaks

$150 USD trong 0 ngày
(23 Đánh Giá)
5.1
A8W5BrjH1

Custom Software Development - <b><i>Removed by Admin</i></b>

$70 USD trong 1 ngày
(0 Đánh Giá)
0.0
tubetoy

I am a firmware developer with experience in linux socket programming. This is a quite simple project. Lets start as soon as possible.

$50 USD trong 2 ngày
(0 Đánh Giá)
0.0