network: Let modules process all ancillary data at once, and adjust UNIX.

This way, modules can decide to do different things based on having
all the ancillary data available. In particular, the UNIX module will
now post only one message header for all the FDs, even if they came
from multiple sets of ancillary data.

This should fix "Message needs unreceived descriptors" from the Chromium
IPC code (which is used by Firefox).
This commit is contained in:
Augustin Cavalier
2024-11-05 15:23:24 -05:00
parent 85a9e4abfb
commit 36708e6ab8
6 changed files with 50 additions and 46 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ struct net_protocol_module_info {
status_t (*add_ancillary_data)(net_protocol* self,
ancillary_data_container* container, const cmsghdr* header);
ssize_t (*process_ancillary_data)(net_protocol* self,
const ancillary_data_header* header, const void* data,
const ancillary_data_container* container,
void* buffer, size_t bufferSize);
ssize_t (*process_ancillary_data_no_container)(net_protocol* self,
net_buffer* buffer, void* data, size_t bufferSize);
+1 -1
View File
@@ -180,7 +180,7 @@ struct net_stack_module_info {
void* data, bool destroy);
void* (*move_ancillary_data)(ancillary_data_container* from,
ancillary_data_container* to);
void* (*next_ancillary_data)(ancillary_data_container* container,
void* (*next_ancillary_data)(const ancillary_data_container* container,
void* previousData, ancillary_data_header* _header);
};