someip.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 HAW Hamburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
22 #ifndef NET_SOMEIP_H
23 #define NET_SOMEIP_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #include <stdint.h>
30 
34 #define SOMEIP_HDR_LENGTH (8U)
35 
38 #define SOMEIP_FULL_HDR_SIZE (16U)
39 
43 typedef struct {
44  uint16_t service_id;
45  uint16_t method_id;
47 
51 typedef struct {
52  uint16_t client_id;
53  uint16_t session_id;
55 
59 typedef struct __attribute__((packed)) {
61  uint32_t length;
63  uint8_t protocol_version;
65  uint8_t msg_type;
66  uint8_t return_code;
67 } someip_hdr_t;
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* NET_SOMEIP_H */
74 
someip_hdr_t::protocol_version
uint8_t protocol_version
Protocol Version.
Definition: someip.h:63
someip_hdr_t::interface_version
uint8_t interface_version
Interface Version.
Definition: someip.h:64
someip_request_id_t::client_id
uint16_t client_id
Client ID.
Definition: someip.h:52
someip_request_id_t::session_id
uint16_t session_id
Session ID.
Definition: someip.h:53
someip_message_id_t
Structure of the Message ID.
Definition: someip.h:43
someip_request_id_t
Structure of the Request ID.
Definition: someip.h:51
someip_hdr_t::message_id
someip_message_id_t message_id
Message ID.
Definition: someip.h:60
someip_hdr_t::length
uint32_t length
Length.
Definition: someip.h:61
someip_message_id_t::method_id
uint16_t method_id
Method ID.
Definition: someip.h:45
someip_hdr_t::msg_type
uint8_t msg_type
Message Type.
Definition: someip.h:65
someip_hdr_t::return_code
uint8_t return_code
Return Code.
Definition: someip.h:66
someip_message_id_t::service_id
uint16_t service_id
Service ID.
Definition: someip.h:44
someip_hdr_t
SOME/IP header.
Definition: someip.h:59
someip_hdr_t::request_id
someip_request_id_t request_id
Request ID.
Definition: someip.h:62