net_buffer: preparing for better metadata management

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21210 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos
2007-05-23 03:48:23 +00:00
parent 57f13ad210
commit 79a0d25245
16 changed files with 109 additions and 114 deletions
+2 -2
View File
@@ -88,8 +88,8 @@ Checksum::PseudoHeader(net_address_module_info *addressModule,
net_buffer_module_info *bufferModule, net_buffer *buffer, uint16 protocol)
{
Checksum checksum;
addressModule->checksum_address(&checksum, (sockaddr *)&buffer->source);
addressModule->checksum_address(&checksum, (sockaddr *)&buffer->destination);
addressModule->checksum_address(&checksum, buffer->source);
addressModule->checksum_address(&checksum, buffer->destination);
checksum << (uint16)htons(protocol) << (uint16)htons(buffer->size)
<< Checksum::BufferHelper(buffer, bufferModule);
return checksum;
+3 -2
View File
@@ -19,8 +19,9 @@ typedef struct net_buffer {
// TODO: we should think about moving the address fields into the buffer data itself
// via associated data or something like this. Or this structure as a whole, too...
struct sockaddr_storage source;
struct sockaddr_storage destination;
struct sockaddr *source;
struct sockaddr *destination;
struct net_interface *interface;
union {
struct {