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:
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user