All Classes Namespaces Files Functions Pages
Layer3.IPv4 Class Reference

Provides an interface for the IPv4 configuration on a ByteBlower port. More...

Methods

 Description.Get
 Returns a textual description of the object.
 
 Destructor
 
 Gateway.Get
 Returns the default gateway of the ByteBlower port. More...
 
 Gateway.Set Gateway
 Sets the default gateway of the ByteBlower port. More...
 
 Ip.Get
 Retrieves the Ip address of the ByteBlower port. More...
 
 Ip.Set IP
 Sets the IP address of the ByteBlower port. More...
 
 Netmask.Get
 Gets the netmask of the ByteBlower port. More...
 
 Netmask.Set Netmask
 Sets the netmask of the ByteBlower port. More...
 
 Parent.Get
 Returns the parent object.
 
 Protocol.Arp.Async ipAddress
 Starts MAC address resolution for a given IP address. More...
 
 Protocol.Arp ipAddress
 Performs MAC address resolution for a given IP address. More...
 
 Protocol.Dhcp.Get
 Returns the DHCP protocol. More...
 
 Protocol.GratuitousArp.Reply
 Sends a Gratuitous ARP (GARP) request. More...
 
 Protocol.GratuitousArp.Request
 Sends a Gratuitous ARP (GARP) request. More...
 
 Protocol.Icmp.Get
 Returns the ICMP protocol. More...
 
 Protocol.Igmp.Get
 Returns the IGMP protocol. More...
 
 Resolve.Async ipAddress
 Start MAC address resolution for a given destination IP address. More...
 
 Resolve ipAddress
 Resolve the MAC address for a given IP address. More...
 

Class overview

Provides an interface for the IPv4 configuration on a ByteBlower port.

Definition at line 5919 of file api.tcl.

Method documentation

Layer3.IPv4::Destructor
Warning
This object cannot be destroyed. An exception will be thrown when this method is called.

Definition at line 5930 of file api.tcl.

Layer3.IPv4::Gateway.Get

Returns the default gateway of the ByteBlower port.

Returns
Default gateway of the ByteBlower port.
Example

This example gets the gateway of the ByteBlower port.

1 $l3 Gateway.Get

Returns:

10.0.0.1 

Definition at line 5942 of file api.tcl.

Layer3.IPv4::Gateway.Set   Gateway  

Sets the default gateway of the ByteBlower port.

Parameters
GatewayGateway address string
Example

This example sets the gateway of the ByteBlower port.

1 $l3 Gateway.Set "10.0.0.1"

Definition at line 5954 of file api.tcl.

Layer3.IPv4::Ip.Get

Retrieves the Ip address of the ByteBlower port.

Returns
The IP address of the ByteBlower port.
Example

This example returns the IP address on a ByteBlower port.

1 $l3 Ip.Get

Returns:

10.20.30.40 

Definition at line 5966 of file api.tcl.

Layer3.IPv4::Ip.Set   IP  

Sets the IP address of the ByteBlower port.

Parameters
IPIP address string. You can use "slash notation" (e.g. 10.1.1.2/24) to simulateously specify the address and netmask.
Example

This example sets the IP address on a ByteBlower port.

1 $l3 Ip.Set "10.20.30.40"

Definition at line 5978 of file api.tcl.

Layer3.IPv4::Netmask.Get

Gets the netmask of the ByteBlower port.

Returns
Netmask of the ByteBlower port.
Example

This example gets the netmask of the ByteBlower port.

1 $l3 Netmask.Get

Returns:

255.255.255.0 

Definition at line 5990 of file api.tcl.

Layer3.IPv4::Netmask.Set   Netmask  

Sets the netmask of the ByteBlower port.

Parameters
NetmaskNetmask address string
Example

This example sets the netmask of the ByteBlower port.

1 $l3 Gateway.Set "255.255.255.0"

Definition at line 6002 of file api.tcl.

Layer3.IPv4::Protocol.Arp   ipAddress  

Performs MAC address resolution for a given IP address.

Sends an ARP request for the specified IP address, and returns the answer if an answer is received.

Note
This call does not make use of the an ARP cache. If you are only interested in resolving an IP then please use Layer3.IPv4::Resolve which also makes use of the ARP cache.
Parameters
ipAddressIPv4 address to resolve
Returns
Resolved MAC address
Exceptions
InvalidDestinationWhen an unusable IP address was given.
ARPTimeoutWhen the address could not be resolved.
Example

This example gets the MAC address for an IP address.

1 $l3 Protocol.Arp "10.0.0.2"

Returns:

00-00-00-00-00-02 

Definition at line 6052 of file api.tcl.

Layer3.IPv4::Protocol.Arp.Async   ipAddress  

Starts MAC address resolution for a given IP address.

Since
2.2.0

Sends an ARP request for the specified IP address, and returns immediately. To obtain the results of the ARP resolution, you can use Protocol.Arp.

Note
This call does not make use of the an ARP cache. If you are only interested in resolving an IP then please use Layer3.IPv4::Resolve.Async which also makes use of the ARP cache.
Parameters
ipAddressIPv4 address to resolve
Exceptions
InvalidDestinationWhen an unusable IP address was given.
Example

This example triggers ARP resolution gets the MAC address for an IP address.

1 $l3 Protocol.Arp.Async "10.0.0.2"
2 ... do some other stuff ...
3 
4 $l3 Protocol.Arp "10.0.0.2"

Returns:

00-00-00-00-00-02 

Definition at line 6030 of file api.tcl.

Layer3.IPv4::Protocol.Dhcp.Get

Returns the DHCP protocol.

Returns
Object of type Layer5.Dhcp.
Example

This example gets the DHCP protocol object.

1 $l3 Dhcp.Get

Returns:

<Layer5.Dhcp object> 

Definition at line 6064 of file api.tcl.

Layer3.IPv4::Protocol.GratuitousArp.Reply

Sends a Gratuitous ARP (GARP) request.

Since
2.5.0

The GARP Request can be used for host presence announcement. This way, other devices on the network can learn the Layer2 and Layer3 information of the host

Example

This example sends a Gratuitous ARP request

1 $l3 Protocol.GratuitousArp.Request

Definition at line 6078 of file api.tcl.

Layer3.IPv4::Protocol.GratuitousArp.Request

Sends a Gratuitous ARP (GARP) request.

Since
2.5.0

The GARP Request can be used for host presence announcement. This way, other devices on the network can learn the Layer2 and Layer3 information of the host. This GARP Request is preferred over the GARP Reply

Example

This example sends a Gratuitous ARP request

1 $l3 Protocol.GratuitousArp.Request

Definition at line 6092 of file api.tcl.

Layer3.IPv4::Protocol.Icmp.Get

Returns the ICMP protocol.

Returns
Object of type Layer3.IcmpProtocol.
Example

This example gets the ICMP protocol object.

1 $l3 Icmp.Get

Returns:

<Layer3.IcmpProtocol object> 

Definition at line 6104 of file api.tcl.

Layer3.IPv4::Protocol.Igmp.Get

Returns the IGMP protocol.

Returns
Object of type Layer4.Igmp.
Example

This example gets the IGMP protocol object.

1 $l3 Igmp.Get

Returns:

<Layer4.Igmp object> 

Definition at line 6116 of file api.tcl.

Layer3.IPv4::Resolve   ipAddress  

Resolve the MAC address for a given IP address.

The ByteBlower server stores an ARP cache per ByteBlower port. Resolving the IP for a port will search the ARP cache first. If no entry was found then an actual ARP request is performed. An entry in the ARP cache remains valid for 120 seconds.

Parameters
ipAddressIPv4 address to resolve
Returns
Resolved MAC address
Exceptions
InvalidDestinationWhen an unusable IP address was given.
ARPTimeoutWhen the address could not be resolved.
Example

This example gets the MAC address for an IP address.

1 $l3 Resolve "10.0.0.2"

Returns:

00-00-00-00-00-02 

Definition at line 6159 of file api.tcl.

Layer3.IPv4::Resolve.Async   ipAddress  

Start MAC address resolution for a given destination IP address.

Since
2.2.0

The ByteBlower server stores an ARP cache per ByteBlower port. Resolving the IP for a port will search the ARP cache first. If no entry was found then an actual ARP request is performed. An entry in the ARP cache remains valid for 120 seconds.

This methods initiates the MAC address resolution. To obtain the actual results of the address resolution, please use Resolve.

Parameters
ipAddressIPv4 address to resolve
Exceptions
InvalidDestinationWhen an unusable IP address was given.
Example

This example triggers address resolution gets the MAC address for the given IP address.

1 $l3 Resolve.ASync "10.0.0.2"
2 ... do some other stuff ...
3 
4 $l3 Resolve "10.0.0.2"

Returns:

00-00-00-00-00-02 

Definition at line 6139 of file api.tcl.