From ff7878ed43c5a566836c4772ff654248df4f89f8 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Mon, 13 Feb 2017 17:29:46 +0100 Subject: sys: add basic ipx packet description --- sys/vnet.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ sys/vnet_amd64.const | 6 ++++++ sys/vnet_arm64.const | 6 ++++++ sys/vnet_ppc64le.const | 6 ++++++ 4 files changed, 62 insertions(+) (limited to 'sys') 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] @@ -138,6 +139,49 @@ arp_packet [ ether_ipv6 arp_ether_ipv6_packet ] [varlen] +################################################################################ +###################################### IPX ##################################### +################################################################################ + +# http://www.networksorcery.com/enp/protocol/ipx.htm +# https://en.wikipedia.org/wiki/Internetwork_Packet_Exchange#IPX_packet_structure + +include + +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 -- cgit mrf-deployment