diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2017-02-13 17:29:46 +0100 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2017-02-13 17:30:12 +0100 |
| commit | ff7878ed43c5a566836c4772ff654248df4f89f8 (patch) | |
| tree | d85604785c662101c2b068b19b85a82168e0b684 /sys | |
| parent | d19696a5a782619a546d3fab39daf9a269508767 (diff) | |
sys: add basic ipx packet description
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/vnet.txt | 44 | ||||
| -rw-r--r-- | sys/vnet_amd64.const | 6 | ||||
| -rw-r--r-- | sys/vnet_arm64.const | 6 | ||||
| -rw-r--r-- | sys/vnet_ppc64le.const | 6 |
4 files changed, 62 insertions, 0 deletions
diff --git a/sys/vnet.txt b/sys/vnet.txt index 5f298a5b9..c3c041549 100644 --- a/sys/vnet.txt +++ b/sys/vnet.txt @@ -80,6 +80,7 @@ eth2_packet { eth2_payload [ arp arp_packet + ipx ipx_packet ipv4 ipv4_packet ipv6 ipv6_packet ] [varlen] @@ -139,6 +140,49 @@ arp_packet [ ] [varlen] ################################################################################ +###################################### IPX ##################################### +################################################################################ + +# http://www.networksorcery.com/enp/protocol/ipx.htm +# https://en.wikipedia.org/wiki/Internetwork_Packet_Exchange#IPX_packet_structure + +include <net/ipx.h> + +ipx_network [ + random int32be + current const[0x00000000, int32be] + broadcast const[0xffffffff, int32be] +] + +ipx_node [ + random array[int8, 6] + current array[const[0x00, int8], 6] + broadcast array[const[0xff, int8], 6] +] + +ipx_addr { + network ipx_network + node ipx_node + socket int16be +} [packed] + +ipx_packet_types = IPX_TYPE_UNKNOWN, IPX_TYPE_RIP, IPX_TYPE_SAP, IPX_TYPE_SPX, IPX_TYPE_NCP, IPX_TYPE_PPROP + +ipx_packet { + csum const[0xffff, int16be] + length len[parent, int16be] + control int8 + type flags[ipx_packet_types, int8] + dst_addr ipx_addr + src_addr ipx_addr + payload array[int8] +} [packed] + +# TODO: setup ipx on virtual interfaces in executor +# TODO: describe particular ipx types +# TODO: open ipx sockets from userspace + +################################################################################ ##################################### IPv4 ##################################### ################################################################################ diff --git a/sys/vnet_amd64.const b/sys/vnet_amd64.const index 6933b47a7..be04e278d 100644 --- a/sys/vnet_amd64.const +++ b/sys/vnet_amd64.const @@ -268,6 +268,12 @@ IPV6_TLV_JUMBO = 194 IPV6_TLV_PAD1 = 0 IPV6_TLV_PADN = 1 IPV6_TLV_ROUTERALERT = 5 +IPX_TYPE_NCP = 17 +IPX_TYPE_PPROP = 20 +IPX_TYPE_RIP = 1 +IPX_TYPE_SAP = 4 +IPX_TYPE_SPX = 5 +IPX_TYPE_UNKNOWN = 0 NEXTHDR_AUTH = 51 NEXTHDR_DEST = 60 NEXTHDR_ESP = 50 diff --git a/sys/vnet_arm64.const b/sys/vnet_arm64.const index 6933b47a7..be04e278d 100644 --- a/sys/vnet_arm64.const +++ b/sys/vnet_arm64.const @@ -268,6 +268,12 @@ IPV6_TLV_JUMBO = 194 IPV6_TLV_PAD1 = 0 IPV6_TLV_PADN = 1 IPV6_TLV_ROUTERALERT = 5 +IPX_TYPE_NCP = 17 +IPX_TYPE_PPROP = 20 +IPX_TYPE_RIP = 1 +IPX_TYPE_SAP = 4 +IPX_TYPE_SPX = 5 +IPX_TYPE_UNKNOWN = 0 NEXTHDR_AUTH = 51 NEXTHDR_DEST = 60 NEXTHDR_ESP = 50 diff --git a/sys/vnet_ppc64le.const b/sys/vnet_ppc64le.const index 6933b47a7..be04e278d 100644 --- a/sys/vnet_ppc64le.const +++ b/sys/vnet_ppc64le.const @@ -268,6 +268,12 @@ IPV6_TLV_JUMBO = 194 IPV6_TLV_PAD1 = 0 IPV6_TLV_PADN = 1 IPV6_TLV_ROUTERALERT = 5 +IPX_TYPE_NCP = 17 +IPX_TYPE_PPROP = 20 +IPX_TYPE_RIP = 1 +IPX_TYPE_SAP = 4 +IPX_TYPE_SPX = 5 +IPX_TYPE_UNKNOWN = 0 NEXTHDR_AUTH = 51 NEXTHDR_DEST = 60 NEXTHDR_ESP = 50 |
