X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FMainpage.dox;h=166c6f0553d17a65d4f027aa8f04567eb40372ad;hb=54b0a17fcfc48110714645f88d242a8b0d31cd8a;hp=085525047e09581f25e810d80a647b5110840f90;hpb=d084c02e4914da4fa1a4098a33d704f69e8bdedd;p=senf.git
diff --git a/Packets/Mainpage.dox b/Packets/Mainpage.dox
index 0855250..166c6f0 100644
--- a/Packets/Mainpage.dox
+++ b/Packets/Mainpage.dox
@@ -35,7 +35,7 @@
\code
senf::EthernetPacket eth (senf::EthernetPacket::create());
- senf::IpV4Packet ip (senf::IpV4Packet ::createAfter(ethernet));
+ senf::IPv4Packet ip (senf::IPv4Packet ::createAfter(ethernet));
senf::UDPPacket udp (senf::UDPPacket ::createAfter(ip));
senf::DataPacket payload (senf::DataPacket ::createAfter(udp,
std::string("Hello, world!")));
@@ -57,12 +57,12 @@
udp->source() = 2000u;
udp->destination() = 2001u;
ip->ttl() = 255u;
- ip->source() = senf::INet4Address("192.168.0.1"); // (*)
- ip->destination() = senf::INet4Address("192.168.0.2"); // (*)
- eth->source() = senf::MACAddress("00:11:22:33:44:55");
- eth->destination() = senf::MACAddress("00:11:22:33:44:66");
+ ip->source() = senf::INet4Address::from_string("192.168.0.1");
+ ip->destination() = senf::INet4Address::from_string("192.168.0.2");
+ eth->source() = senf::MACAddress::from_string("00:11:22:33:44:55");
+ eth->destination() = senf::MACAddress::from_string("00:11:22:33:44:66");
- eth.finalize(); // (*)
+ eth.finalize();
\endcode
As seen above, packet fields are accessed using the -> operator whereas other packet
@@ -80,7 +80,7 @@
\code
eth.next() == ip; // true
- eth.next().is(); // true
+ eth.next().is(); // true
eth.next().next() == udp; // true
eth.next().is(); // false
eth.next() == udp; // true
@@ -88,7 +88,7 @@
udp.next(); // throws InvalidPacketChainException
udp.next(senf::nothrow); // a senf::Packet testing as false
udp.findNext == udp; // true
- udp.first() == ip; // true
+ udp.first() == ip; // true
udp.prev() == ip; // true
udp.prev() == eth // true
@@ -135,8 +135,18 @@
\li DefaultBundle: Some basic
default protocols: Ethernet, Ip, TCP, UDP
- \li MPEG_DVBBundle: MPEG and DVB
+ \li MPEGDVBBundle: MPEG and DVB
protocols
+
+ There are two ways to link with a bundle
+
+ \li If you only work with known packets which you explicitly reference you may just link with
+ the corresponding library.
+ \li If you need to parse unknown packets and want those to be parsed as complete as possible
+ without explicitly referencing the packet type, you will need to link against the combined
+ object file built for every bundle. This way, all packets defined in the bundle will be
+ included whether they are explicitly referenced or not (and they will all automatically be
+ registered).
*/