base/inet.hh:
add functions to the various headers to grab the most common
encapsulated protocols. This could easily get out of hand, but
we're just worrying about tcp, udp, and ip for now.
add common functions size(), bytes(), and payload() to all wrappers.
size() gets the header size
bytes() returns a uint8_t * to the beginning of the header
payload() returns a uint8_t * to the beginning of the payload.
dev/etherpkt.cc:
dev/etherpkt.hh:
don't cache pointers to headers. It's probably not worth the
hassle.
--HG--
extra : convert_revision : ba9df85ac019b8a48233042dde79fb9da9546410
libdnet when we can instead of our own home grown stuff.
SConscript:
separate the crc code into its own file
base/inet.cc:
move the crc stuff to crc.cc
add generic code for calculating ip/tcp/udp checksums
base/inet.hh:
- move crc stuff to crc.hh
- #include all of the libdnet stuff. (this makes base/inet.hh the
only file you need to include if you want to use this kind of stuff.)
- Wrap some of the libdnet structs to get easier access to structure
members. These wrappers will automatically deal with masking/shifting/
byte-swapping.
base/refcnt.hh:
If one derives from RefCountingPtr, they should have access to
the internal data pointer.
build/SConstruct:
make #include of dnet stuff work
dev/etherlink.cc:
dev/ethertap.cc:
dev/ethertap.hh:
EtherPacket -> PacketData
dev/etherpkt.cc:
EtherPacket -> PacketData
add a function for populating extra info about a packet.
Basically just gives pointers to ethernet/ip/tcp/udp headers
if they exist.
dev/etherpkt.hh:
EtherPacket -> PacketData
remove most of the packet header stuff from teh PacketData
class and just add a few generic functions for grabbing various
headers that may exist in the packet. The old functionality is
contained in the headers.
dev/ns_gige.cc:
- IP -> Ip, UDP -> Udp, TCP ->Tcp when used in variable names
- get rid of our own byte swapping functions.
- whack checksum code and use libdnet version.
- Get pointers to the various packet headers and grab info from
those headers. (The byte swapping in the headers now.)
- Add stats for Udp Checksums
dev/ns_gige.hh:
use libdnet for checksum code.
IP -> Ip, TCP -> Tcp in variable names
add stats for UDP checksums
--HG--
extra : convert_revision : 96c4160e1967b7c0090acd456df4a76e1f3aab53
base/range.hh:
andrew thought this might be a bug.
dev/etherpkt.cc:
don't need std:: since there is a using directive
dev/ns_gige.cc:
update to new PIO and PCI system
dev/ns_gige.hh:
update to deal with new PIO and PCI setup
dev/ns_gige_reg.h:
Add some new #defines that I ended up needing
dev/pcidev.cc:
some changes to the debugging printfs of pci device
--HG--
extra : convert_revision : 955ba8e8e1c418cfe1c6549dc3451ea091541556
of faking it. Renamed stuff to follow our style. Lots of
general cleanup.
dev/etherpkt.hh:
fix up includes
--HG--
extra : convert_revision : fb3a21466cdae00f8747d6e3027c9f2c63569c48