You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
Java
30 lines
1.1 KiB
Java
// BOOTP.java (C) K. J. Turner, K. A. Whyte 04/03/06
|
|
|
|
// Boot Protocol
|
|
|
|
package protocol; // protocol package
|
|
|
|
import java.util.Vector; // vector (list)
|
|
import support.*; // protocol entity support
|
|
|
|
public class BOOTP extends Protocol { // BOOTP protocol
|
|
|
|
private BOOTPSender sender; // protocol sender (client)
|
|
private BOOTPReceiver receiver; // protocol receiver (server)
|
|
|
|
public BOOTP() { // construct protocol instance
|
|
medium = new BOOTPMedium(); // construct comms medium
|
|
sender = // construct sender (client)
|
|
new BOOTPSender (medium, "Client");
|
|
receiver = // construct receiver (server)
|
|
new BOOTPReceiver (medium, "Server");
|
|
sender.setPeer(receiver); // sender is receiver's peer
|
|
receiver.setPeer(sender); // receiver is sender's peer
|
|
entities = new Vector<ProtocolEntity>(); // initialise protocol entities
|
|
entities.addElement(sender); // add sender protocol entity
|
|
entities.addElement(medium); // add comms medium entity
|
|
entities.addElement(receiver); // add receive protocol entity
|
|
}
|
|
|
|
}
|