|
INET Framework for OMNeT++/OMNEST
|
Converts between Ospfv2Packet and binary (network byte order) OSPF data.
More...
#include <Ospfv2PacketSerializer.h>
|
| static void | serializeOspfHeader (MemoryOutputStream &stream, const Ptr< const Ospfv2Packet > &ospfPacket) |
| |
| static uint16_t | deserializeOspfHeader (MemoryInputStream &stream, Ptr< Ospfv2Packet > &ospfPacket) |
| |
| static void | serializeRouterLsa (MemoryOutputStream &stream, const Ospfv2RouterLsa &routerLsa) |
| |
| static void | deserializeRouterLsa (MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2RouterLsa &routerLsa) |
| |
| static void | serializeNetworkLsa (MemoryOutputStream &stream, const Ospfv2NetworkLsa &networkLsa) |
| |
| static void | deserializeNetworkLsa (MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2NetworkLsa &networkLsa) |
| |
| static void | serializeSummaryLsa (MemoryOutputStream &stream, const Ospfv2SummaryLsa &summaryLsa) |
| |
| static void | deserializeSummaryLsa (MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2SummaryLsa &summaryLsa) |
| |
| static void | serializeAsExternalLsa (MemoryOutputStream &stream, const Ospfv2AsExternalLsa &asExternalLsa) |
| |
| static void | deserializeAsExternalLsa (MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2AsExternalLsa &asExternalLsa) |
| |
| static void | serializeOspfOptions (MemoryOutputStream &stream, const Ospfv2Options &options) |
| |
| static void | deserializeOspfOptions (MemoryInputStream &stream, Ospfv2Options &options) |
| |
| static void | copyHeaderFields (const Ptr< Ospfv2Packet > from, Ptr< Ospfv2Packet > to) |
| |
Converts between Ospfv2Packet and binary (network byte order) OSPF data.
◆ Ospfv2PacketSerializer()
| inet::ospfv2::Ospfv2PacketSerializer::Ospfv2PacketSerializer |
( |
| ) |
|
|
inline |
53 : FieldsChunkSerializer() {}
◆ copyHeaderFields()
500 to->setVersion(from->getVersion());
501 to->setType(from->getType());
502 to->setPacketLengthField(from->getPacketLengthField());
503 to->setChunkLength(from->getChunkLength());
504 to->setRouterID(from->getRouterID());
505 to->setAreaID(from->getAreaID());
506 to->setCrc(from->getCrc());
507 to->setCrcMode(from->getCrcMode());
508 to->setAuthenticationType(from->getAuthenticationType());
509 for (
int i = 0; i < 8; ++i) {
510 to->setAuthentication(i, from->getAuthentication(i));
◆ deserialize()
Deserializes a chunk from a stream by reading the bytes at the current position of the stream.
The current stream position is updated according to the length of the returned chunk.
Implements inet::FieldsChunkSerializer.
92 auto ospfPacket = makeShared<Ospfv2Packet>();
94 switch (ospfPacket->getType()) {
96 auto helloPacket = makeShared<Ospfv2HelloPacket>();
98 helloPacket->setNetworkMask(stream.readIpv4Address());
99 helloPacket->setHelloInterval(stream.readUint16Be());
101 helloPacket->setRouterPriority(stream.readByte());
102 helloPacket->setRouterDeadInterval(stream.readUint32Be());
103 helloPacket->setDesignatedRouter(stream.readIpv4Address());
104 helloPacket->setBackupDesignatedRouter(stream.readIpv4Address());
106 if (numNeighbors < 0)
107 helloPacket->markIncorrect();
108 helloPacket->setNeighborArraySize(numNeighbors);
109 for (
int i = 0; i < numNeighbors; i++) {
110 helloPacket->setNeighbor(i, stream.readIpv4Address());
115 auto ddPacket = makeShared<Ospfv2DatabaseDescriptionPacket>();
117 ddPacket->setInterfaceMTU(stream.readUint16Be());
119 auto& ddOptions = ddPacket->getDdOptionsForUpdate();
120 ddOptions.unused = stream.readNBitsToUint64Be(5);
121 ddOptions.I_Init = stream.readBit();
122 ddOptions.M_More = stream.readBit();
123 ddOptions.MS_MasterSlave = stream.readBit();
124 ddPacket->setDdSequenceNumber(stream.readUint32Be());
126 if (numLsaHeaders < 0)
127 ddPacket->markIncorrect();
128 ddPacket->setLsaHeadersArraySize(numLsaHeaders);
129 for (
int i = 0; i < numLsaHeaders; i++) {
130 Ospfv2LsaHeader *lsaHeader =
new Ospfv2LsaHeader();
132 ddPacket->setLsaHeaders(i, *lsaHeader);
137 auto requestPacket = makeShared<Ospfv2LinkStateRequestPacket>();
141 requestPacket->markIncorrect();
142 requestPacket->setRequestsArraySize(numReq);
143 for (
int i = 0; i < numReq; i++) {
144 auto *req =
new Ospfv2LsaRequest();
145 req->lsType = stream.readUint32Be();
146 req->linkStateID = stream.readIpv4Address();
147 req->advertisingRouter = stream.readIpv4Address();
148 requestPacket->setRequests(i, *req);
150 return requestPacket;
153 auto updatePacket = makeShared<Ospfv2LinkStateUpdatePacket>();
155 uint32_t numLSAs = stream.readUint32Be();
156 updatePacket->setOspfLSAsArraySize(numLSAs);
157 for (uint32_t i = 0; i < numLSAs; i++) {
163 auto ackPacket = makeShared<Ospfv2LinkStateAcknowledgementPacket>();
167 ackPacket->markIncorrect();
168 ackPacket->setLsaHeadersArraySize(numHeaders);
169 for (
int i = 0; i < numHeaders; i++) {
170 Ospfv2LsaHeader *lsaHeader =
new Ospfv2LsaHeader();
172 ackPacket->setLsaHeaders(i, *lsaHeader);
177 ospfPacket->markIncorrect();
Referenced by inet::ospf::OspfPacketSerializer::deserialize().
◆ deserializeAsExternalLsa()
381 auto& contents = asExternalLsa.getContentsForUpdate();
382 contents.setNetworkMask(stream.readIpv4Address());
384 int numExternalTos = (
B(asExternalLsa.getHeader().getLsaLength()) -
386 if (numExternalTos < 0)
387 updatePacket->markIncorrect();
389 contents.setExternalTOSInfoArraySize(numExternalTos);
390 for (
int i = 0; i < numExternalTos; i++) {
391 auto *extTos =
new Ospfv2ExternalTosInfo();
392 extTos->E_ExternalMetricType = stream.readBit();
393 extTos->tos = stream.readNBitsToUint64Be(7);
394 extTos->routeCost = stream.readUint24Be();
395 extTos->forwardingAddress = stream.readIpv4Address();
396 extTos->externalRouteTag = stream.readUint32Be();
397 contents.setExternalTOSInfo(i, *extTos);
◆ deserializeLsa()
436 Ospfv2LsaHeader *lsaHeader =
new Ospfv2LsaHeader();
441 Ospfv2RouterLsa *routerLsa =
new Ospfv2RouterLsa();
442 routerLsa->setHeader(*lsaHeader);
444 updatePacket->setOspfLSAs(i, routerLsa);
448 Ospfv2NetworkLsa *networkLsa =
new Ospfv2NetworkLsa();
449 networkLsa->setHeader(*lsaHeader);
451 updatePacket->setOspfLSAs(i, networkLsa);
456 Ospfv2SummaryLsa *summaryLsa =
new Ospfv2SummaryLsa();
457 summaryLsa->setHeader(*lsaHeader);
459 updatePacket->setOspfLSAs(i, summaryLsa);
463 Ospfv2AsExternalLsa *asExternalLsa =
new Ospfv2AsExternalLsa();
464 asExternalLsa->setHeader(*lsaHeader);
466 updatePacket->setOspfLSAs(i, asExternalLsa);
470 updatePacket->markIncorrect();
◆ deserializeLsaHeader()
241 lsaHeader.setLsAge(stream.readUint16Be());
243 lsaHeader.setLsType(
static_cast<Ospfv2LsaType>(stream.readByte()));
244 lsaHeader.setLinkStateID(stream.readIpv4Address());
245 lsaHeader.setAdvertisingRouter(stream.readIpv4Address());
246 lsaHeader.setLsSequenceNumber(stream.readUint32Be());
247 lsaHeader.setLsCrc(stream.readUint16Be());
248 lsaHeader.setLsaLength(stream.readUint16Be());
◆ deserializeNetworkLsa()
320 networkLsa.setNetworkMask(stream.readIpv4Address());
321 int numAttachedRouters = (
B(networkLsa.getHeader().getLsaLength()) -
323 if (numAttachedRouters < 0)
324 updatePacket->markIncorrect();
326 networkLsa.setAttachedRoutersArraySize(numAttachedRouters);
327 for (
int i = 0; i < numAttachedRouters; ++i) {
328 networkLsa.setAttachedRouters(i, stream.readIpv4Address());
◆ deserializeOspfHeader()
202 int ospfVer = stream.readUint8();
204 ospfPacket->markIncorrect();
205 ospfPacket->setVersion(ospfVer);
206 int ospfType = stream.readUint8();
208 ospfPacket->markIncorrect();
210 uint16_t packetLength = stream.readUint16Be();
211 ospfPacket->setPacketLengthField(packetLength);
212 ospfPacket->setChunkLength(
B(packetLength));
213 ospfPacket->setRouterID(stream.readIpv4Address());
214 ospfPacket->setAreaID(stream.readIpv4Address());
215 ospfPacket->setCrc(stream.readUint16Be());
217 ospfPacket->setAuthenticationType(stream.readUint16Be());
218 for (
int i = 0; i < 8; ++i) {
219 ospfPacket->setAuthentication(i, stream.readUint8());
◆ deserializeOspfOptions()
488 options.unused_1 = stream.readBit();
489 options.unused_2 = stream.readBit();
490 options.DC_DemandCircuits = stream.readBit();
491 options.EA_ForwardExternalLSAs = stream.readBit();
492 options.NP_Type7LSA = stream.readBit();
493 options.MC_MulticastForwarding = stream.readBit();
494 options.E_ExternalRoutingCapability = stream.readBit();
495 options.unused_3 = stream.readBit();
◆ deserializeRouterLsa()
280 routerLsa.setReserved1(stream.readNBitsToUint64Be(5));
281 routerLsa.setV_VirtualLinkEndpoint(stream.readBit());
282 routerLsa.setE_ASBoundaryRouter(stream.readBit());
283 routerLsa.setB_AreaBorderRouter(stream.readBit());
284 routerLsa.setReserved2(stream.readByte());
285 uint16_t numLinks = stream.readUint16Be();
286 routerLsa.setNumberOfLinks(numLinks);
287 routerLsa.setLinksArraySize(numLinks);
288 for (int32_t i = 0; i < numLinks; ++i) {
289 auto *link =
new Ospfv2Link();
290 link->setLinkID(stream.readIpv4Address());
291 link->setLinkData(stream.readUint32Be());
292 link->setType(
static_cast<LinkType>(stream.readByte()));
293 link->setNumberOfTOS(stream.readByte());
294 link->setLinkCost(stream.readUint16Be());
295 uint32_t numTos = link->getNumberOfTOS();
296 link->setTosDataArraySize(numTos);
297 for (uint32_t j = 0; j < numTos; ++j) {
298 auto *tos =
new Ospfv2TosData();
299 tos->tos = stream.readByte();
300 if (stream.readByte() != 0)
301 updatePacket->markIncorrect();
302 tos->tosMetric = stream.readUint16Be();
303 link->setTosData(j, *tos);
305 routerLsa.setLinks(i, *link);
◆ deserializeSummaryLsa()
346 summaryLsa.setNetworkMask(stream.readIpv4Address());
347 if (stream.readByte() != 0)
348 updatePacket->markIncorrect();
349 summaryLsa.setRouteCost(stream.readUint24Be());
350 int numTos = (
B(summaryLsa.getHeader().getLsaLength()) -
353 updatePacket->markIncorrect();
355 summaryLsa.setTosDataArraySize(numTos);
356 for (
int i = 0; i < numTos; i++) {
357 auto *tos =
new Ospfv2TosData();
358 tos->tos = stream.readUint8();
359 tos->tosMetric = stream.readUint24Be();
360 summaryLsa.setTosData(i, *tos);
◆ serialize()
| void inet::ospfv2::Ospfv2PacketSerializer::serialize |
( |
MemoryOutputStream & |
stream, |
|
|
const Ptr< const Chunk > & |
chunk |
|
) |
| const |
|
overrideprotectedvirtual |
Serializes a chunk into a stream by writing all bytes representing the chunk at the end of the stream.
Implements inet::FieldsChunkSerializer.
28 const auto& ospfPacket = staticPtrCast<const Ospfv2Packet>(chunk);
30 switch (ospfPacket->getType()) {
32 const auto& helloPacket = staticPtrCast<const Ospfv2HelloPacket>(ospfPacket);
33 stream.writeIpv4Address(helloPacket->getNetworkMask());
34 stream.writeUint16Be(helloPacket->getHelloInterval());
36 stream.writeByte(helloPacket->getRouterPriority());
37 stream.writeUint32Be(helloPacket->getRouterDeadInterval());
38 stream.writeIpv4Address(helloPacket->getDesignatedRouter());
39 stream.writeIpv4Address(helloPacket->getBackupDesignatedRouter());
40 for (
size_t i = 0; i < helloPacket->getNeighborArraySize(); ++i) {
41 stream.writeIpv4Address(helloPacket->getNeighbor(i));
46 const auto& ddPacket = staticPtrCast<const Ospfv2DatabaseDescriptionPacket>(ospfPacket);
47 stream.writeUint16Be(ddPacket->getInterfaceMTU());
49 auto& options = ddPacket->getDdOptions();
50 stream.writeNBitsOfUint64Be(options.unused, 5);
51 stream.writeBit(options.I_Init);
52 stream.writeBit(options.M_More);
53 stream.writeBit(options.MS_MasterSlave);
54 stream.writeUint32Be(ddPacket->getDdSequenceNumber());
55 for (
unsigned int i = 0; i < ddPacket->getLsaHeadersArraySize(); ++i) {
61 const auto& requestPacket = staticPtrCast<const Ospfv2LinkStateRequestPacket>(ospfPacket);
62 for (
size_t i = 0; i < requestPacket->getRequestsArraySize(); ++i) {
63 auto& req = requestPacket->getRequests(i);
64 stream.writeUint32Be(req.lsType);
65 stream.writeIpv4Address(req.linkStateID);
66 stream.writeIpv4Address(req.advertisingRouter);
71 const auto& updatePacket = staticPtrCast<const Ospfv2LinkStateUpdatePacket>(ospfPacket);
72 stream.writeUint32Be(updatePacket->getOspfLSAsArraySize());
73 for (
size_t i = 0; i < updatePacket->getOspfLSAsArraySize(); ++i) {
79 const auto& ackPacket = staticPtrCast<const Ospfv2LinkStateAcknowledgementPacket>(ospfPacket);
80 for (
size_t i = 0; i < ackPacket->getLsaHeadersArraySize(); ++i) {
86 throw cRuntimeError(
"Unknown OSPF message type in Ospfv2PacketSerializer");
◆ serializeAsExternalLsa()
366 auto& contents = asExternalLsa.getContents();
367 stream.writeIpv4Address(contents.getNetworkMask());
369 for (
size_t i = 0; i < asExternalLsa.getContents().getExternalTOSInfoArraySize(); ++i) {
370 const auto& exTos = contents.getExternalTOSInfo(i);
371 stream.writeBit(exTos.E_ExternalMetricType);
372 stream.writeNBitsOfUint64Be(exTos.tos, 7);
373 stream.writeUint24Be(exTos.routeCost);
374 stream.writeIpv4Address(exTos.forwardingAddress);
375 stream.writeUint32Be(exTos.externalRouteTag);
◆ serializeLsa()
404 auto& lsaHeader = lsa.getHeader();
409 const Ospfv2RouterLsa *routerLsa =
static_cast<const Ospfv2RouterLsa *
>(&lsa);
414 const Ospfv2NetworkLsa *networkLsa =
static_cast<const Ospfv2NetworkLsa *
>(&lsa);
420 const Ospfv2SummaryLsa *summaryLsa =
static_cast<const Ospfv2SummaryLsa *
>(&lsa);
425 const Ospfv2AsExternalLsa *asExternalLsa =
static_cast<const Ospfv2AsExternalLsa *
>(&lsa);
430 throw cRuntimeError(
"Cannot serialize BGP packet: type %d not supported.",
type);
Referenced by inet::ospfv2::setLsaCrc().
◆ serializeLsaHeader()
226 stream.writeUint16Be(lsaHeader.getLsAge());
228 stream.writeByte(lsaHeader.getLsType());
229 stream.writeIpv4Address(lsaHeader.getLinkStateID());
230 stream.writeIpv4Address(lsaHeader.getAdvertisingRouter());
231 stream.writeUint32Be(lsaHeader.getLsSequenceNumber());
232 auto crcMode = lsaHeader.getLsCrcMode();
234 throw cRuntimeError(
"Cannot serialize Ospf LSA header without properly computed CRC");
235 stream.writeUint16Be(lsaHeader.getLsCrc());
236 stream.writeUint16Be(lsaHeader.getLsaLength());
Referenced by inet::ospfv2::setLsaHeaderCrc().
◆ serializeNetworkLsa()
312 stream.writeIpv4Address(networkLsa.getNetworkMask());
313 for (
size_t i = 0; i < networkLsa.getAttachedRoutersArraySize(); i++) {
314 stream.writeIpv4Address(networkLsa.getAttachedRouters(i));
◆ serializeOspfHeader()
185 stream.writeByte(ospfPacket->getVersion());
186 stream.writeByte(ospfPacket->getType());
187 stream.writeUint16Be(ospfPacket->getPacketLengthField());
188 stream.writeIpv4Address(ospfPacket->getRouterID());
189 stream.writeIpv4Address(ospfPacket->getAreaID());
190 auto crcMode = ospfPacket->getCrcMode();
192 throw cRuntimeError(
"Cannot serialize Ospf header without properly computed CRC");
193 stream.writeUint16Be(ospfPacket->getCrc());
194 stream.writeUint16Be(ospfPacket->getAuthenticationType());
195 for (
unsigned int i = 0; i < 8; ++i) {
196 stream.writeByte(ospfPacket->getAuthentication(i));
◆ serializeOspfOptions()
476 stream.writeBit(options.unused_1);
477 stream.writeBit(options.unused_2);
478 stream.writeBit(options.DC_DemandCircuits);
479 stream.writeBit(options.EA_ForwardExternalLSAs);
480 stream.writeBit(options.NP_Type7LSA);
481 stream.writeBit(options.MC_MulticastForwarding);
482 stream.writeBit(options.E_ExternalRoutingCapability);
483 stream.writeBit(options.unused_3);
◆ serializeRouterLsa()
254 stream.writeNBitsOfUint64Be(routerLsa.getReserved1(), 5);
255 stream.writeBit(routerLsa.getV_VirtualLinkEndpoint());
256 stream.writeBit(routerLsa.getE_ASBoundaryRouter());
257 stream.writeBit(routerLsa.getB_AreaBorderRouter());
258 stream.writeByte(routerLsa.getReserved2());
259 uint16_t numLinks = routerLsa.getNumberOfLinks();
260 stream.writeUint16Be(numLinks);
261 for (int32_t i = 0; i < numLinks; ++i) {
262 const auto& link = routerLsa.getLinks(i);
263 stream.writeIpv4Address(link.getLinkID());
264 stream.writeUint32Be(link.getLinkData());
265 stream.writeByte(link.getType());
266 stream.writeByte(link.getNumberOfTOS());
267 stream.writeUint16Be(link.getLinkCost());
268 uint32_t numTos = link.getTosDataArraySize();
269 for (uint32_t j = 0; j < numTos; ++j) {
270 const auto& tos = link.getTosData(j);
271 stream.writeByte(tos.tos);
273 stream.writeUint16Be(tos.tosMetric);
◆ serializeSummaryLsa()
334 stream.writeIpv4Address(summaryLsa.getNetworkMask());
336 stream.writeUint24Be(summaryLsa.getRouteCost());
337 for (
size_t i = 0; i < summaryLsa.getTosDataArraySize(); i++) {
338 const auto& tos = summaryLsa.getTosData(i);
339 stream.writeByte(tos.tos);
340 stream.writeUint24Be(tos.tosMetric);
◆ inet::ospf::OspfPacketSerializer
The documentation for this class was generated from the following files:
@ LINKSTATE_ACKNOWLEDGEMENT_PACKET
Definition: OspfPacketBase_m.h:69
@ SUMMARYLSA_NETWORKS_TYPE
Definition: Ospfv2Packet_m.h:285
@ LINKSTATE_REQUEST_PACKET
Definition: OspfPacketBase_m.h:67
static void serializeOspfOptions(MemoryOutputStream &stream, const Ospfv2Options &options)
Definition: Ospfv2PacketSerializer.cc:474
static void deserializeNetworkLsa(MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2NetworkLsa &networkLsa)
Definition: Ospfv2PacketSerializer.cc:318
Ospfv2LsaType
Enum generated from inet/routing/ospfv2/Ospfv2Packet.msg:78 by opp_msgtool.
Definition: Ospfv2Packet_m.h:282
static void serializeSummaryLsa(MemoryOutputStream &stream, const Ospfv2SummaryLsa &summaryLsa)
Definition: Ospfv2PacketSerializer.cc:332
static void serializeAsExternalLsa(MemoryOutputStream &stream, const Ospfv2AsExternalLsa &asExternalLsa)
Definition: Ospfv2PacketSerializer.cc:364
@ CRC_COMPUTED
Definition: CrcMode_m.h:59
static void serializeLsaHeader(MemoryOutputStream &stream, const Ospfv2LsaHeader &lsaHeader)
Definition: Ospfv2PacketSerializer.cc:224
@ ROUTERLSA_TYPE
Definition: Ospfv2Packet_m.h:283
static void serializeOspfHeader(MemoryOutputStream &stream, const Ptr< const Ospfv2Packet > &ospfPacket)
Definition: Ospfv2PacketSerializer.cc:183
@ HELLO_PACKET
Definition: OspfPacketBase_m.h:65
const B OSPFv2_ASEXTERNALLSA_HEADER_LENGTH
Definition: Ospfv2Common.h:50
@ LINKSTATE_UPDATE_PACKET
Definition: OspfPacketBase_m.h:68
@ SUMMARYLSA_ASBOUNDARYROUTERS_TYPE
Definition: Ospfv2Packet_m.h:286
const B OSPFv2_DD_HEADER_LENGTH
Definition: Ospfv2Common.h:42
static void copyHeaderFields(const Ptr< Ospfv2Packet > from, Ptr< Ospfv2Packet > to)
Definition: Ospfv2PacketSerializer.cc:498
intscale< b, 1, 8 > B
Definition: Units.h:1168
static void serializeLsa(MemoryOutputStream &stream, const Ospfv2Lsa &routerLsa)
Definition: Ospfv2PacketSerializer.cc:402
static uint16_t deserializeOspfHeader(MemoryInputStream &stream, Ptr< Ospfv2Packet > &ospfPacket)
Definition: Ospfv2PacketSerializer.cc:200
static void serializeRouterLsa(MemoryOutputStream &stream, const Ospfv2RouterLsa &routerLsa)
Definition: Ospfv2PacketSerializer.cc:252
@ AS_EXTERNAL_LSA_TYPE
Definition: Ospfv2Packet_m.h:287
@ DATABASE_DESCRIPTION_PACKET
Definition: OspfPacketBase_m.h:66
const B OSPFv2_LSA_HEADER_LENGTH
Definition: Ospfv2Common.h:40
OspfPacketType
Enum generated from inet/routing/ospf_common/OspfPacketBase.msg:15 by opp_msgtool.
Definition: OspfPacketBase_m.h:64
removed type
Definition: IUdp-gates.txt:7
const B OSPFv2_HEADER_LENGTH
Definition: Ospfv2Common.h:39
static void deserializeOspfOptions(MemoryInputStream &stream, Ospfv2Options &options)
Definition: Ospfv2PacketSerializer.cc:486
const B OSPFv2_NETWORKLSA_ADDRESS_LENGTH
Definition: Ospfv2Common.h:48
static void deserializeLsa(MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, int i)
Definition: Ospfv2PacketSerializer.cc:434
const B OSPFv2_REQUEST_LENGTH
Definition: Ospfv2Common.h:43
const value_type & get() const
Definition: Units.h:108
LinkType
Enum generated from inet/routing/ospfv2/Ospfv2Packet.msg:113 by opp_msgtool.
Definition: Ospfv2Packet_m.h:429
const B OSPFv2_NETWORKLSA_MASK_LENGTH
Definition: Ospfv2Common.h:47
@ NETWORKLSA_TYPE
Definition: Ospfv2Packet_m.h:284
static void deserializeRouterLsa(MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2RouterLsa &routerLsa)
Definition: Ospfv2PacketSerializer.cc:278
const B OSPFv2_ASEXTERNALLSA_TOS_INFO_LENGTH
Definition: Ospfv2Common.h:51
static void deserializeAsExternalLsa(MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2AsExternalLsa &asExternalLsa)
Definition: Ospfv2PacketSerializer.cc:379
const B OSPFv2_TOS_LENGTH
Definition: Ospfv2Common.h:46
static void deserializeLsaHeader(MemoryInputStream &stream, Ospfv2LsaHeader &lsaHeader)
Definition: Ospfv2PacketSerializer.cc:239
static void serializeNetworkLsa(MemoryOutputStream &stream, const Ospfv2NetworkLsa &networkLsa)
Definition: Ospfv2PacketSerializer.cc:310
const B OSPFv2_HELLO_HEADER_LENGTH
Definition: Ospfv2Common.h:41
static void deserializeSummaryLsa(MemoryInputStream &stream, const Ptr< Ospfv2LinkStateUpdatePacket > updatePacket, Ospfv2SummaryLsa &summaryLsa)
Definition: Ospfv2PacketSerializer.cc:344