beautypg.com

Table 6: icmp frame contents – Maxim Integrated 78Q8430 Software Driver User Manual

Page 32

background image

78Q8430 Software Driver Development Guidelines

UG_8430_004

Table 6: ICMP Frame Contents

MAC Header

IP Header . . .

Dest.

Addr.

Src.

Addr.

Len/Type

1

Ver /

IHL

2

TOS

Total Len

Identification

Flags /

Frag Offset

TTL Prot.

3

6 bytes

6 bytes

08 00

45

??

2 bytes

2 bytes

2 bytes

1 byte

01

304

308

30C

310 314 318

. . . IP Header, cont.

ICMP Header

Checksum

Src. Address

Dest. Address

4

Type

5

Code

6

Checksum

2 bytes

4 bytes

4 bytes

0?

00

2 bytes

31C

320

324

328 – 2 LSBs

1

Type = 0x0800 indicates that an IP header follows.

2

Based on the IHL value, there may be extra data at the end of the IP header before the ICMP header.

3

The Protocol field is always 0x01 for an ICMP frame.

4

The driver should verify that the Dest. Address belongs to it.

5

A Type value of 0x08 indicates an ICMP echo request and 0x00 indicates an ICMP echo reply.

6

The Code value should always be 0x00.


This procedure is only suitable for IP packets that have not been fragmented. When the MF flag is clear
and the fragment offset value is zero, there are no fragments. This is the case when the last 14 bits of
the Flags/Frag Offset field in the IP Header are all zeros.

Enable ICMP Classification

Use the following procedure to enable the identification of ICMP echo requests in the CAM:

STEP 1: Change the offset field of CAM rule 0x24 from 0x00 to 0x05.

• Set the CAR ADDR field to 0x24

• Change the RCR Byte Offset field to 0x05. This causes the next byte looked at by the

classification engine to be the Flags and MSbs of the Fragment Offset.

STEP 2: Set CAM rule 0x7B to verify the MF flag is clear and the fragment offset MSbs are
zero
.

Reg. Field

Value

to

write

CAR ADDR

0x7B

Data Match

0x00

Data Mask

0x3F

Previous Hit Match

0x24

RMR

Previous Hit Mask

0x7F

Byte Offset

Retain default: 0x00

Interrupt

Retain default: 0

Control Logic Action

NOP

RCR

Match Control

MD

STEP 3: Set CAM rule 0x7A to verify the fragment offset LSbs are all zero.

Reg. Field

Value

to

write

CAR ADDR

0x7A

RMR Data

Match

0x00

32

Rev.

1.0