Difference between revisions of "Unit Network"

From Ultibo.org
Jump to: navigation, search
Line 10: Line 10:
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network specific constants''' <code> NETWORK_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_NAME_PREFIX = 'Network';</code>
 +
| Name prefix for Network Devices
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network device type constants''' <code> NETWORK_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_TYPE_NONE = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NETWORK_TYPE_ETHERNET = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NETWORK_TYPE_TOKENRING = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NETWORK_TYPE_80211 = 3;</code>
 +
| IEEE 802.11 Wireless (WiFi) network
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NETWORK_TYPE_MAX = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network device state constants''' <code> NETWORK_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_STATE_CLOSED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>NETWORK_STATE_CLOSING = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NETWORK_STATE_OPENING = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NETWORK_STATE_OPEN = 3;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NETWORK_STATE_MAX = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network device status constants''' <code> NETWORK_STATUS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_STATUS_DOWN = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>NETWORK_STATUS_UP = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NETWORK_STATUS_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network device flag constants''' <code> NETWORK_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>NETWORK_FLAG_RX_BUFFER = $00000001;</code>
 +
| Device supports Receive Buffer (NetworkBufferReceive/NetworkBufferRelease)
 +
|-
 +
| <code>NETWORK_FLAG_TX_BUFFER = $00000002;</code>
 +
| Device supports Transmit Buffer (NetworkBufferAllocate/NetworkBufferTransmit)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network device control code constants''' <code> NETWORK_CONTROL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_CONTROL_CLEAR_STATS = 1;</code>
 +
| Clear Statistics
 +
|-
 +
| <code>NETWORK_CONTROL_SET_MAC = 2;</code>
 +
| Set the MAC for this device
 +
|-
 +
| <code>NETWORK_CONTROL_GET_MAC = 3;</code>
 +
| Get the MAC for this device
 +
|-
 +
| <code>NETWORK_CONTROL_SET_LOOPBACK = 4;</code>
 +
| Set Loopback Mode
 +
|-
 +
| <code>NETWORK_CONTROL_RESET = 5;</code>
 +
| Reset the device
 +
|-
 +
| <code>NETWORK_CONTROL_DISABLE = 6;</code>
 +
| Disable the device
 +
|-
 +
| <code>NETWORK_CONTROL_GET_BROADCAST = 8;</code>
 +
| Get Broadcast address for this device
 +
|-
 +
| <code>NETWORK_CONTROL_GET_MTU = 9;</code>
 +
| Get MTU for this device
 +
|-
 +
| <code>NETWORK_CONTROL_GET_HEADERLEN = 10;</code>
 +
| Get Header length for this device
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network lock state constants''' <code> NETWORK_LOCK_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_LOCK_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>NETWORK_LOCK_READ = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NETWORK_LOCK_WRITE = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network buffer size constants''' <code> NETWORK_BUFFER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_BUFFER_SIZE = 1024;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network event constants''' <code>  NETWORK_EVENT_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_EVENT_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NETWORK_EVENT_SYSTEM_START = $00000001;</code>
 +
| The network sub system is starting
 +
|-
 +
| <code>NETWORK_EVENT_SYSTEM_STOP = $00000002;</code>
 +
| The network sub system has stopped
 +
|-
 +
| <code>NETWORK_EVENT_ADAPTERS_START = $00000004;</code>
 +
| All network adapters are being started
 +
|-
 +
| <code>NETWORK_EVENT_ADAPTERS_STOP = $00000008;</code>
 +
| All network adapters have been stopped
 +
|-
 +
| <code>NETWORK_EVENT_TRANSPORTS_START = $00000010;</code>
 +
| All network transports are being started
 +
|-
 +
| <code>NETWORK_EVENT_TRANSPORTS_STOP = $00000020;</code>
 +
| All network transports have been stopped
 +
|-
 +
| <code>NETWORK_EVENT_PROTOCOLS_START = $00000040;</code>
 +
| All network protocols are being started
 +
|-
 +
| <code>NETWORK_EVENT_PROTOCOLS_STOP = $00000080;</code>
 +
| All network protocols have been stopped
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network event signature constants''' <code> NETWORK_EVENT_SIGNATURE* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_EVENT_SIGNATURE = $BE1D50C2;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network event state constants''' <code> NETWORK_EVENT_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_EVENT_STATE_UNREGISTERED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>NETWORK_EVENT_STATE_REGISTERED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network event flag constants''' <code> NETWORK_EVENT_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_EVENT_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Adapter type constants''' <code> ADAPTER_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ADAPTER_TYPE_UNKNOWN = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>ADAPTER_TYPE_WIRED = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ADAPTER_TYPE_LOOPBACK = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ADAPTER_TYPE_WIRELESS = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Adapter thread constants''' <code> ADAPTER_THREAD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ADAPTER_THREAD_NAME = 'Network Adapter';</code>
 +
| Thread name for Network adapter threads
 +
|-
 +
| <code>ADAPTER_THREAD_PRIORITY = THREAD_PRIORITY_HIGHER;</code>
 +
| Thread priority for Network adapter threads
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Adapter state constants''' <code> ADAPTER_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ADAPTER_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>ADAPTER_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Adapter status constants''' <code> ADAPTER_STATUS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ADAPTER_STATUS_DOWN = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>ADAPTER_STATUS_UP = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Configuration type constants''' <code> CONFIG_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CONFIG_TYPE_AUTO = 0; </code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CONFIG_TYPE_STATIC = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONFIG_TYPE_RARP = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONFIG_TYPE_BOOTP = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONFIG_TYPE_DHCP = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONFIG_TYPE_PSEUDO = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONFIG_TYPE_LOOPBACK = 6;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CONFIG_TYPE_UNKNOWN = Word(-1);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br /> 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Authentication type constants''' <code> AUTH_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>AUTH_TYPE_UNKNOWN = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>AUTH_TYPE_EAP = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AUTH_TYPE_RSN = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Frame type constants''' <code> FRAME_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>FRAME_TYPE_UNKNOWN = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FRAME_TYPE_ETHERNET_II = 1;</code>
 +
| Blue Book
 +
|-
 +
| <code>FRAME_TYPE_TOKEN_RING = 3;</code>
 +
| IEEE 802.5
 +
|-
 +
| <code>FRAME_TYPE_APPLETALK = 5;</code>
 +
| LocalTalk
 +
|-
 +
| <code>FRAME_TYPE_ETHERNET_8022 = 11;</code>
 +
| IEEE 802.2 LLC
 +
|-
 +
| <code>FRAME_TYPE_ETHERNET_SNAP = 98;</code>
 +
| IEEE 802.2 LLC with SNAP Header
 +
|-
 +
| <code>FRAME_TYPE_ETHERNET_8023 = 99;</code>
 +
| 802.3 RAW (Novell)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>FRAME_START_ETHERNET_SNAP = $AAAA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FRAME_START_ETHERNET_8023 = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>ADAPTER_MODE_NONE = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ADAPTER_MODE_LOCAL = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ADAPTER_MODE_BROADCAST= 3;</code>
 +
| This is the default
 +
|-
 +
| <code>ADAPTER_MODE_LOCAL_MULTI = 4;</code>
 +
| Mode 3 plus directed Multicast
 +
|-
 +
| <code>ADAPTER_MODE_BROADCAST_MULTI = 5;</code>
 +
| Mode 3 plus all Multicast
 +
|-
 +
| <code>ADAPTER_MODE_PROMISCUOUS = 6;</code>
 +
| Promiscuous mode
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Configuration command constants''' <code> CONFIG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CONFIG_ADAPTER_DISCOVER = 0;</code>
 +
| Discover an Address from the ConfigHandler
 +
|-
 +
| <code>CONFIG_ADAPTER_REQUEST = 1;</code>
 +
| Request an Address from the ConfigHandler (Either configured or obtained from Discover)
 +
|-
 +
| <code>CONFIG_ADAPTER_RELEASE = 2;</code>
 +
| Release the Address obtained from ConfigHandler
 +
|-
 +
| <code>CONFIG_ADAPTER_RENEW = 3;</code>
 +
| Renew the Address obtained from ConfigHandler
 +
|-
 +
| <code>CONFIG_ADAPTER_REBIND = 4;</code>
 +
| Rebind the Address obtained from ConfigHandler
 +
|-
 +
| <code>CONFIG_ADAPTER_INFORM = 5;</code>
 +
| Obtain information only from the ConfigHandler
 +
|-
 +
| <code>CONFIG_ADAPTER_REBOOT = 6;</code>
 +
| Request previous Address after a Reboot
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CONFIG_RETRY_TIMEOUT = 300000;</code>
 +
| 5 min Config Retry Timeout
 +
|-
 +
| <code>CONFIG_RENEW_TIMEOUT = 60000;</code>
 +
| 1 min Config Renew Timeout
 +
|-
 +
| <code>CONFIG_REBIND_TIMEOUT = 60000;</code>
 +
| 1 min Config Rebind Timeout
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Authentication command constants''' <code> AUTH_COMMAND_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>AUTH_COMMAND_ASSOCIATE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>AUTH_COMMAND_DISASSOCIATE = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AUTH_COMMAND_AUTHENTICATE = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AUTH_COMMAND_UNAUTHENTICATE = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Multicast addressing constants''' <code> MAX_MULTICAST_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MAX_MULTICAST_ADDRESS = 8;</code>
 +
| Maximum number of addresses per adapter
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MAX_PHYSICAL_PACKET = 2048;</code>
 +
| Large enough for all media types
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Hardware addressing constants''' <code> HARDWARE_ADDRESS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HARDWARE_ADDRESS_SIZE = 6;</code>
 +
| SizeOf(THardwareAddress)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Media type constants''' <code> MEDIA_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MEDIA_TYPE_UNKNOWN = $0000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MEDIA_TYPE_ETHERNET = $0001;</code>
 +
| ARP type of Ethernet Hardware (These values must not change, they are the actual values used by ARP packets)
 +
|-
 +
| <code>MEDIA_TYPE_TOKENRING = $0006;</code>
 +
| ARP type of Token-Ring Hardware (These values must not change, they are the actual values used by ARP packets)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Packet type constants''' <code> PACKET_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PACKET_MIN_TYPE = $0600;</code>
 +
| If the value Ethernet header TypeLength field is greater than this the frame is Ethernet II
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PACKET_TYPE_IP = $0800;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PACKET_TYPE_IP6 = $86DD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PACKET_TYPE_ARP = $0806;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PACKET_TYPE_RARP = $8035;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PACKET_TYPE_8021Q = $8100;</code>
 +
| 802.1Q with extended Ethernet header
 +
|-
 +
| <code>PACKET_TYPE_IPX = $8137;</code>
 +
| IPX on EII
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PACKET_TYPE_EAPOL = $888E;</code>
 +
| EAP-over-LAN (EAPOL)
 +
|-
 +
| <code>PACKET_TYPE_RSN = $88C7;</code>
 +
| RSN pre-authentication
 +
|-
 +
| <code>PACKET_TYPE_TDLS = $890D;</code>
 +
| Tunneled direct-link setup
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PACKET_TYPE_RAW = $FFFF;</code>
 +
| IPX on 802.3
 +
|-
 +
| <code>PACKET_TYPE_LLC = $0001;</code>
 +
| IPX on 802.2
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Ethernet network constants''' <code> *_ETHERNET_PACKET </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MIN_ETHERNET_PACKET = 60;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>MAX_ETHERNET_PACKET = 1514;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Ethernet 802.3 network constants ''' <code> LLC_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|FRAME_TYPE_ETHERNET_8022
 +
|-
 +
| <code>LLC_HEADER_SIZE = 3;</code>
 +
| SizeOf(TLLCHeader); Optionally can be 4 if Control is 2 octets
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Ethernet SNAP network constants ''' <code> SNAP_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|FRAME_TYPE_ETHERNET_SNAP
 +
|-
 +
| <code>SNAP_HEADER_SIZE = 5;</code>
 +
| SizeOf(TSNAPHeader);
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Service set constants''' <code> SERVICE_SET_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SERVICE_SET_UNKNOWN = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SERVICE_SET_BSS = 1;</code>
 +
| Basic Service Set
 +
|-
 +
| <code>SERVICE_SET_ESS = 2;</code>
 +
| Extended Service Set
 +
|-
 +
| <code>SERVICE_SET_IBSS = 3;</code>
 +
| Independent Basic Service Set
 +
|-
 +
| <code>SERVICE_SET_MBSS = 4;</code>
 +
| Mesh Basic Service Set
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network logging constants''' <code> NETWORK_LOG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NETWORK_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code>
 +
| Network debugging messages
 +
|-
 +
| <code>NETWORK_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code>
 +
| Network informational messages, such as a device being attached or detached
 +
|-
 +
| <code>NETWORK_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 +
| Network error messages
 +
|-
 +
| <code>NETWORK_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 +
| No Network messages
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Ethernet specific constants''' <code> ETHERNET_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ETHERNET_ADDRESS_SIZE = 6;</code>
 +
| SizeOf(TEthernetAddress)
 +
|-
 +
| <code>ETHERNET_HEADER_SIZE = 14;</code>
 +
| SizeOf(TEthernetHeader);
 +
|-
 +
| <code>ETHERNET_VLAN_SIZE = 4;</code>
 +
| Length of Ethernet VLAN tag
 +
|-
 +
| <code>ETHERNET_CRC_SIZE = 4;</code>
 +
| Length of Ethernet CRC
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Ethernet specific size constants''' <code> ETHERNET_*_SIZE* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ETHERNET_MTU = 1500;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>ETHERNET_MAX_PACKET_SIZE = ETHERNET_HEADER_SIZE + ETHERNET_VLAN_SIZE + ETHERNET_MTU;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>ETHERNET_TRANSMIT_BUFFER_SIZE = ETHERNET_MAX_PACKET_SIZE;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Network specific constants'''</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Generic Network
 +
|-
 +
| <code>HARDWARE_DEFAULT:THardwareAddress = ($00,$00,$00,$00,$00,$00);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HARDWARE_LOOPBACK:THardwareAddress = ($00,$00,$00,$00,$00,$01);</code>
 +
| &nbsp;
 +
|-
 +
| <code>HARDWARE_BROADCAST:THardwareAddress = ($FF,$FF,$FF,$FF,$FF,$FF);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Ethernet specific constants'''</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ETHERNET_DEFAULT:THardwareAddress = ($00,$00,$00,$00,$00,$00);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>ETHERNET_LOOPBACK:THardwareAddress = ($00,$00,$00,$00,$00,$01);</code>
 +
| &nbsp;
 +
|-
 +
| <code>ETHERNET_BROADCAST:THardwareAddress = ($FF,$FF,$FF,$FF,$FF,$FF);</code>
 +
| &nbsp;
 +
|-
 +
| <code>ETHERNET_MULTICAST:THardwareAddress = ($01,$00,$5E,$00,$00,$00);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===

Revision as of 05:40, 13 December 2016

Return to Unit Reference


Description


To be documented

Constants



[Expand]
Network specific constants NETWORK_*


[Expand]
Network device type constants NETWORK_TYPE_*


[Expand]
Network device state constants NETWORK_STATE_*


[Expand]
Network device status constants NETWORK_STATUS_*


[Expand]
Network device flag constants NETWORK_FLAG_*


[Expand]
Network device control code constants NETWORK_CONTROL_*


[Expand]
Network lock state constants NETWORK_LOCK_*


[Expand]
Network buffer size constants NETWORK_BUFFER_*


[Expand]
Network event constants NETWORK_EVENT_*


[Expand]
Network event signature constants NETWORK_EVENT_SIGNATURE*


[Expand]
Network event state constants NETWORK_EVENT_STATE_*


[Expand]
Network event flag constants NETWORK_EVENT_FLAG_*


[Expand]
Adapter type constants ADAPTER_TYPE_*


[Expand]
Adapter thread constants ADAPTER_THREAD_*


[Expand]
Adapter state constants ADAPTER_STATE_*


[Expand]
Adapter status constants ADAPTER_STATUS_*


[Expand]
Configuration type constants CONFIG_TYPE_*


[Expand]
Authentication type constants AUTH_TYPE_*


[Expand]
Frame type constants FRAME_TYPE_*


[Expand]
Configuration command constants CONFIG_*


[Expand]
Authentication command constants AUTH_COMMAND_*


[Expand]
Multicast addressing constants MAX_MULTICAST_*


[Expand]
Hardware addressing constants HARDWARE_ADDRESS_*


[Expand]
Media type constants MEDIA_TYPE_*


[Expand]
Packet type constants PACKET_TYPE_*


[Expand]
Ethernet network constants *_ETHERNET_PACKET


[Expand]
Ethernet 802.3 network constants LLC_HEADER_*


[Expand]
Ethernet SNAP network constants SNAP_HEADER_*


[Expand]
Service set constants SERVICE_SET_*


[Expand]
Network logging constants NETWORK_LOG_*


[Expand]
Ethernet specific constants ETHERNET_*


[Expand]
Ethernet specific size constants ETHERNET_*_SIZE*


[Expand]
Network specific constants


[Expand]
Ethernet specific constants


Type definitions


To be documented

Public variables


To be documented

Function declarations


Initialization functions

[Expand]
procedure NetworkInit;
Description: To be documented


[Expand]
function NetworkStart:LongWord;
Description: To be documented


[Expand]
function NetworkStop:LongWord;
Description: To be documented


[Expand]
function NetworkStartCompleted:Boolean;
Description: To be documented


Network functions

[Expand]
function NetworkDeviceOpen(Network:PNetworkDevice):LongWord;
Description: To be documented


[Expand]
function NetworkDeviceClose(Network:PNetworkDevice):LongWord;
Description: To be documented


[Expand]
function NetworkDeviceRead(Network:PNetworkDevice; Buffer:Pointer; Size:LongWord; var Length:LongWord):LongWord;
Description: To be documented


[Expand]
function NetworkDeviceWrite(Network:PNetworkDevice; Buffer:Pointer; Size:LongWord; var Length:LongWord):LongWord;
Description: To be documented


[Expand]
function NetworkDeviceControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Description: To be documented


[Expand]
function NetworkBufferAllocate(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Allocate a transmit buffer from the specified network device, the returned entry will include a buffer for writing data to as well as an offfset value to allow the driver data to be written to the start of the buffer. When the data has been copied to the buffer, pass the entry to NetworkBufferTransmit.


[Expand]
function NetworkBufferRelease(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Release a receive buffer to the specified network device, the entry must have been returned from NetworkBufferReceive


[Expand]
function NetworkBufferReceive(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Receive a completed receive buffer from the specified network device. The returned entry will contain a one or more packets of data to read from. When the data has been processed pass the returned buffer to NetworkBufferRelease.


[Expand]
function NetworkBufferTransmit(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Transmit a completed transmit buffer to the specified network device. The entry must have been allocated using NetworkBufferAllocate.


[Expand]
function NetworkDeviceSetState(Network:PNetworkDevice; State:LongWord):LongWord;
Description: Set the state of the specified network and send a notification


[Expand]
function NetworkDeviceSetStatus(Network:PNetworkDevice; Status:LongWord):LongWord;
Description: Set the status of the specified network and send a notification


[Expand]
function NetworkDeviceCreate:PNetworkDevice;
Description: Create a new Network entry


[Expand]
function NetworkDeviceCreateEx(Size:LongWord):PNetworkDevice;
Description: Create a new Network entry


[Expand]
function NetworkDeviceDestroy(Network:PNetworkDevice):LongWord;
Description: Destroy an existing Network entry


[Expand]
function NetworkDeviceRegister(Network:PNetworkDevice):LongWord;
Description: Register a new Network in the Network table


[Expand]
function NetworkDeviceDeregister(Network:PNetworkDevice):LongWord;
Description: Deregister a Network from the Network table


[Expand]
function NetworkDeviceFind(NetworkId:LongWord):PNetworkDevice;
Description: To be documented


[Expand]
function NetworkDeviceFindByName(const Name:String):PNetworkDevice; inline;
Description: To be documented


[Expand]
function NetworkDeviceFindByDescription(const Description:String):PNetworkDevice; inline;
Description: To be documented


[Expand]
function NetworkDeviceEnumerate(Callback:TNetworkEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function NetworkDeviceNotification(Network:PNetworkDevice; Callback:TNetworkNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


[Expand]
function NetworkEventAllocate(Callback:TNetworkEventCallback; Data:Pointer; Event:LongWord):PNetworkEvent;
Description: Create and Register a new Event entry in the Event table


[Expand]
function NetworkEventRelease(Event:PNetworkEvent):LongWord;
Description: Deregister and Destroy a Event from the Event table


[Expand]
function NetworkEventRegister(Callback:TNetworkEventCallback; Data:Pointer; Event:LongWord):THandle;
Description: Register a callback for one or more network events


[Expand]
function NetworkEventDeregister(Handle:THandle):LongWord;
Description: Deregister a network event callback


[Expand]
function NetworkEventNotify(Event:LongWord):LongWord;
Description: To be documented


RTL network functions

[Expand]
function SysHostGetName:String;
Description: To be documented


[Expand]
function SysHostSetName(const AName:String):Boolean;
Description: To be documented


[Expand]
function SysHostGetDomain:String;
Description: To be documented


[Expand]
function SysHostSetDomain(const ADomain:String):Boolean;
Description: To be documented


Network helper functions

[Expand]
function NetworkGetCount:LongWord; inline;
Description: Get the current network count


[Expand]
function NetworkDeviceCheck(Network:PNetworkDevice):PNetworkDevice;
Description: Check if the supplied Network is in the network table


[Expand]
function NetworkDeviceTypeToString(NetworkType:LongWord):String;
Description: To be documented


[Expand]
function NetworkDeviceStateToString(NetworkState:LongWord):String;
Description: To be documented


[Expand]
function NetworkDeviceStatusToString(NetworkStatus:LongWord):String;
Description: To be documented


[Expand]
function NetworkDeviceStateToNotification(State:LongWord):LongWord;
Description: Convert a Network state value into the notification code for device notifications


[Expand]
function NetworkDeviceStatusToNotification(Status:LongWord):LongWord;
Description: Convert a Network status value into the notification code for device notifications


[Expand]
function NetworkEventCheck(Event:PNetworkEvent):PNetworkEvent;
Description: Check if the supplied Event is in the event table


[Expand]
procedure NetworkLog(Level:LongWord; Network:PNetworkDevice; const AText:String);
Description: To be documented


[Expand]
procedure NetworkLogInfo(Network:PNetworkDevice; const AText:String);
Description: To be documented


[Expand]
procedure NetworkLogError(Network:PNetworkDevice; const AText:String);
Description: To be documented


[Expand]
procedure NetworkLogDebug(Network:PNetworkDevice; const AText:String);
Description: To be documented


[Expand]
function HardwareAddressToString(const AAddress:THardwareAddress):String;
Description: To be documented


[Expand]
function StringToHardwareAddress(const AAddress:String):THardwareAddress;
Description: To be documented


[Expand]
function CompareHardwareAddress(const AAddress1,AAddress2:THardwareAddress):Boolean;
Description: To be documented


[Expand]
function CompareHardwareDefault(const AAddress:THardwareAddress):Boolean;
Description: To be documented


[Expand]
function CompareHardwareBroadcast(const AAddress:THardwareAddress):Boolean;
Description: To be documented


[Expand]
function CompareHardwareMulticast(const AAddress:THardwareAddress):Boolean;
Description: To be documented


[Expand]
function AdapterTypeToString(AType:Word):String;
Description: To be documented


[Expand]
function AdapterModeToString(AMode:Word):String;
Description: To be documented


[Expand]
function AdapterConfigToString(AConfig:Word):String;
Description: To be documented


[Expand]
function AdapterStateToString(AState:Integer):String;
Description: To be documented


[Expand]
function AdapterStatusToString(AStatus:Integer):String;
Description: To be documented


[Expand]
function FrameTypeToString(AType:Word):String;
Description: To be documented


[Expand]
function MediaTypeToString(AType:Word):String;
Description: To be documented


[Expand]
function PacketTypetoString(AType:Word):String;
Description: To be documented


[Expand]
function ConfigTypeToString(AType:Word):String;
Description: To be documented


[Expand]
function ConfigCommandToString(ACommand:Word):String;
Description: To be documented


[Expand]
function AuthTypeToString(AType:Word):String;
Description: To be documented


[Expand]
function AuthCommandToString(ACommand:Word):String;
Description: To be documented


Return to Unit Reference