
IBM3206K0424
IBM Processor for Network Resources
Preliminary
Cell/Packet Re-assembly (REASM)
Page 338 of 676
pnr25.chapt05.01
August 14, 2000
PPP
label = read 4 bytes from rxbuf at offset 0 -- read the
if label == 0xff030021 { -- what is this field called
read 1 bytes from rxbuf at offset 4 -- read the ip header version (5th byte)
if IPVER_HEADERLGT == 0x45 {
tblIndex = read byte from offset 5 -- read QOS field (6th byte)
lcdIndex = Lookup(lcdTable, tblIndex) -- read index from cm using tableIndex
lcdAddr = lcdBase + lcdIndex*128 -- calc lcd addr from index
}
else {
lcdAddr = defaultPortLcd -- use port default lcd
}
}
else {
lcdAddr = defaultPortLcd -- use port default lcd
}
Q.922 2 Byte Addressing
head = read 2 bytes from rxbuf at offset 0 -- read the header (network bytes 0-1)
if (bit(0) == 1) && (bit(8) == 0) { -- EA bits indicate two byte addr
-- byte 0 bit 1 == 0 && byte 1 bit 1 == 1
tblIndex = (head and dlciMask0) >> X -- gather 6 of 10 dlci bits from byte 0
tblIndex |= ((head and dlciMask1) >> X) -- gather 4 of 10 dlci bits from byte 1
lcdIndex = Lookup(lcdTable, tblIndex) -- read index from cm using tableIndex
lcdAddr = lcdBase + lcdIndex*128 -- calc lcd addr from index
}
else {
lcdAddr = errorLcdAddr -- not a two byte addr
}
Q.922 4 Byte Addressing
head = read 4 bytes from rxbuf at offset 0 -- read the header (network bytes 0-3)
if (bit(0) == 1) && (bit(8) == 0) && -- EA bits indicate four byte addr
(bit(16) == 0) && (bit(24) == 0) { -- byte 0 bit 1 == 0 && byte 1 bit 1 == 0 &&
-- byte 2 bit 1 == 0 && byte 3 bit 1 == 1
if dcBit == 1 { -- check for dc bit being set
lcdAddr = defaultPortLcd -- and surface on default port lcd
}
else { -- gather 16 least significant dlci bits
tblIndex = (head and dlciMask1) >> X -- gather 3 dlci bits from byte 1
tblIndex |= ((head and dlciMask2) >> X) -- gather 7 dlci bits from byte 2
tblIndex |= ((head and dlciMask3) >> X) -- gather 6 dlci bits from byte 3
lcdIndex = Lookup(lcdTable, tblIndex) -- read index from cm using tableIndex
lcdAddr = lcdBase + lcdIndex*128 -- calc lcd addr from index
}
}
else {
lcdAddr = errorLcdAddr -- not a four byte addr
}