* Original code by Francesco Fondelli (francesco dot fondelli, gmail dot com)
*/
+/* \summary: Autosar SOME/IP Protocol printer */
+
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#include "netdissect-stdinc.h"
* | Message ID (Service ID/Method ID) |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Length |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Request ID (Client ID/Session ID) |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Protocol Ver | Interface Ver | Message Type | Return Code |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Payload |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
-struct tok message_type_values[] = {
+static const struct tok message_type_values[] = {
{ 0x00, "REQUEST" },
{ 0x01, "REQUEST_NO_RETURN" },
{ 0x02, "NOTIFICATION" },
{ 0, NULL }
};
-struct tok return_code_values[] = {
+static const struct tok return_code_values[] = {
{ 0x00, "E_OK" },
{ 0x01, "E_NOT_OK" },
{ 0x02, "E_UNKNOWN_SERVICE" },
{ 0x0d, "E_E2E" },
{ 0x0e, "E_E2E_NOT_AVAILABLE" },
{ 0x0f, "E_E2E_NO_NEW_DATA" },
+ { 0, NULL }
};
void
-someip_print(netdissect_options *ndo, const u_char *bp, u_int len)
+someip_print(netdissect_options *ndo, const u_char *bp, const u_int len)
{
uint32_t message_id;
uint16_t service_id;