PEthSocket::Frame Struct Reference

An ethernet MAC frame. More...

`#include <ethsock.h>`

## Public Member Functions

void | Parse (WORD &type, BYTE *&payload, PINDEX &length)
| Parse the Ethernet Frame to extract the frame type and the address of the payload. More...

## Public Attributes

Address | dst_addr
Address | src_addr
union {
struct {
WORD type
BYTE payload [1500]
} ether
struct {
WORD length
BYTE dsap
BYTE ssap
BYTE ctrl
BYTE oui [3]
WORD type
BYTE payload [1492]
} snap
}; |

## Detailed Description

An ethernet MAC frame.

## Member Function Documentation

## Parse()

void PEthSocket::Frame::Parse | ( | WORD & | type,
|  | BYTE *& | payload,
|  | PINDEX & | length
| ) |  |

Parse the Ethernet Frame to extract the frame type and the address of the payload.

The length should be the original bytes read in the frame and may be altered to information contained in the frame, if available.

## Member Data Documentation

## @2

union { ... }

## ctrl

BYTE PEthSocket::Frame::ctrl

## dsap

BYTE PEthSocket::Frame::dsap

## dst_addr

Address PEthSocket::Frame::dst_addr

## ether

struct { ... } PEthSocket::Frame::ether

## length

WORD PEthSocket::Frame::length

## oui

BYTE PEthSocket::Frame::oui[3]

## payload

BYTE PEthSocket::Frame::payload[1492]

## snap

struct { ... } PEthSocket::Frame::snap

## src_addr

Address PEthSocket::Frame::src_addr

## ssap

BYTE PEthSocket::Frame::ssap

## type

WORD PEthSocket::Frame::type

The documentation for this struct was generated from the following file:

- ethsock.h