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

Unified Diff: tools/ipc_fuzzer/message_lib/message_file_format.h

Issue 105083002: IPC fuzzer: create message_lib library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 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 | « tools/ipc_fuzzer/message_lib/message_file.h ('k') | tools/ipc_fuzzer/message_lib/message_file_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/message_lib/message_file_format.h
diff --git a/tools/ipc_fuzzer/message_lib/message_file_format.h b/tools/ipc_fuzzer/message_lib/message_file_format.h
new file mode 100644
index 0000000000000000000000000000000000000000..005f9364db534db50c78a652c83845fac1849c38
--- /dev/null
+++ b/tools/ipc_fuzzer/message_lib/message_file_format.h
@@ -0,0 +1,63 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_FORMAT_H_
+#define TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_FORMAT_H_
+
+#include "base/basictypes.h"
+
+// Message file contains IPC messages and message names. Each message type
+// has a NameTableEntry mapping the type to a name.
+//
+// |========================|
+// | FileHeader |
+// |========================|
+// | Message |
+// |------------------------|
+// | Message |
+// |------------------------|
+// | ... |
+// |========================|
+// | NameTableEntry |
+// |------------------------|
+// | NameTableEntry |
+// |------------------------|
+// | ... |
+// |------------------------|
+// | type = 0x0002070f |
+// | string_table_offset = ---.
+// |------------------------| \
+// | ... | |
+// |========================| |
+// | message name | |
+// |------------------------| |
+// | message name | |
+// |------------------------| |
+// | ... | |
+// |------------------------| /
+// | "ViewHostMsg_OpenURL" <--*
+// |------------------------|
+// | ... |
+// |========================|
+
+namespace ipc_fuzzer {
+
+struct FileHeader {
+ static const uint32 kMagicValue = 0x1bcf11ee;
+ static const uint32 kCurrentVersion = 1;
+
+ uint32 magic;
+ uint32 version;
+ uint32 message_count;
+ uint32 name_count;
+};
+
+struct NameTableEntry {
+ uint32 type;
+ uint32 string_table_offset;
+};
+
+} // namespace ipc_fuzzer
+
+#endif // TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_FORMAT_H_
« no previous file with comments | « tools/ipc_fuzzer/message_lib/message_file.h ('k') | tools/ipc_fuzzer/message_lib/message_file_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698