ipxpkt

package
v0.0.0-...-97c880d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

README

This is an implementation of the protocol used by IPXPKT.COM, a packet driver included with the Crynwr packet driver collection. This packet driver emulates an Ethernet network by tunneling frames inside IPX packets.

This packet driver is useful for a couple of reasons. Firstly, vanilla DOSbox (at the time of writing, at least) only supports IPX networking. The ipxpkt driver therefore will allow DOS programs that use the packet driver interface to be used inside DOSbox.

Secondly, it should also allow packet driver-based DOS programs to be used inside Win9x, as a virtual Ethernet link can be established over IPX to another machine on the network. Unfortunately ipxpkt does not work inside a Windows DOS prompt (it causes the DOS prompt to crash, but maybe a fix for this can be found.

Documentation

Overview

Package ipxpkt implements a packet router that wraps Ethernet frames in IPX packets using the protocol from the IPXPKT.COM DOS packet driver.

Index

Constants

View Source
const (
	HeaderLength = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Fragment, NumFragments uint8
	PacketID               uint16
}

Header represents the fragmentation header for an ipxpkt fragment.

func (*Header) MarshalBinary

func (h *Header) MarshalBinary() ([]byte, error)

MarshalBinary populates a slice of bytes from an ipxpkt header.

func (*Header) UnmarshalBinary

func (h *Header) UnmarshalBinary(packet []byte) error

UnmarshalBinary decodes an ipxpkt header from a slice of bytes.

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router implements the ipxpkt protocol and implements the same DuplexEthernetStream interface as a real physical Ethernet link; it communicates by sending and receiving IPX packets.

func NewRouter

func NewRouter(node network.Node) *Router

func (*Router) Close

func (r *Router) Close()

func (*Router) ReadPacketData

func (r *Router) ReadPacketData() ([]byte, gopacket.CaptureInfo, error)

readFrame reads an Ethernet frame from the router; it will block until a complete frame arrives from another node.

func (*Router) WritePacketData

func (r *Router) WritePacketData(frame []byte) error

WritePacketData writes an Ethernet frame to the router; this will be wrapped and fragmented into one or more ipxpkt frames and written to the IPX network.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL