Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Unified Diff: util/mach/mach_message_util.h

Issue 755313004: Pass Mach message trailers to server handler functions (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/mach/mach_message_server.cc ('k') | util/mach/mach_message_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_message_util.h
diff --git a/util/mach/mach_message_util.h b/util/mach/mach_message_util.h
index afe598188d6a998f86d0c5fd64696c1097fc8d8c..dd5bc0145609a053ee7f353c7d9fc4f9367d8789 100644
--- a/util/mach/mach_message_util.h
+++ b/util/mach/mach_message_util.h
@@ -48,6 +48,20 @@ void PrepareMIGReplyFromRequest(const mach_msg_header_t* in_header,
//! \sa PrepareMIGReplyFromRequest()
void SetMIGReplyError(mach_msg_header_t* out_header, kern_return_t error);
+//! \brief Returns a Mach message trailer for a message that has been received.
+//!
+//! This function must only be called on Mach messages that have been received
+//! via the Mach messaging interface, such as `mach_msg()`. Messages constructed
+//! for sending do not contain trailers.
+//!
+//! \param[in] header A pointer to a received Mach message.
+//!
+//! \return A pointer to the trailer following the received Mach message’s body.
+//! The contents of the trailer depend on the options provided to
+//! `mach_msg()` or a similar function when the message was received.
+const mach_msg_trailer_t* MachMessageTrailerFromHeader(
+ const mach_msg_header_t* header);
+
} // namespace crashpad
#endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_UTIL_H_
« no previous file with comments | « util/mach/mach_message_server.cc ('k') | util/mach/mach_message_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698