1*a642a948SDawid Frycki /* Copyright 2018 Intel 2*a642a948SDawid Frycki * 3*a642a948SDawid Frycki * Licensed under the Apache License, Version 2.0 (the "License"); 4*a642a948SDawid Frycki * you may not use this file except in compliance with the License. 5*a642a948SDawid Frycki * You may obtain a copy of the License at 6*a642a948SDawid Frycki * 7*a642a948SDawid Frycki * http://www.apache.org/licenses/LICENSE-2.0 8*a642a948SDawid Frycki * 9*a642a948SDawid Frycki * Unless required by applicable law or agreed to in writing, software 10*a642a948SDawid Frycki * distributed under the License is distributed on an "AS IS" BASIS, 11*a642a948SDawid Frycki * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*a642a948SDawid Frycki * See the License for the specific language governing permissions and 13*a642a948SDawid Frycki * limitations under the License. 14*a642a948SDawid Frycki */ 15*a642a948SDawid Frycki 16*a642a948SDawid Frycki #ifndef IPMBDEFINES_HPP 17*a642a948SDawid Frycki #define IPMBDEFINES_HPP 18*a642a948SDawid Frycki 19*a642a948SDawid Frycki #include <inttypes.h> 20*a642a948SDawid Frycki 21*a642a948SDawid Frycki #pragma pack(1) 22*a642a948SDawid Frycki typedef struct _IPMB_HEADER 23*a642a948SDawid Frycki { 24*a642a948SDawid Frycki union 25*a642a948SDawid Frycki { 26*a642a948SDawid Frycki struct 27*a642a948SDawid Frycki { 28*a642a948SDawid Frycki /** @brief IPMB Connection Header Format */ 29*a642a948SDawid Frycki uint8_t address; 30*a642a948SDawid Frycki uint8_t rsNetFnLUN; /// @brief responder's net function and logical 31*a642a948SDawid Frycki /// unit number 32*a642a948SDawid Frycki uint8_t checksum1; /// @brief checksum computed on first two bytes 33*a642a948SDawid Frycki /// of IPMB_HEADER 34*a642a948SDawid Frycki /** @brief IPMB Header */ 35*a642a948SDawid Frycki uint8_t rqSA; /// @brief requester's slave address, LS bit=0 36*a642a948SDawid Frycki uint8_t rqSeqLUN; /// @brief requester's sequence number and logical 37*a642a948SDawid Frycki /// unit number 38*a642a948SDawid Frycki uint8_t cmd; /// @brief command required by the network identify the 39*a642a948SDawid Frycki /// type of rqts 40*a642a948SDawid Frycki uint8_t data[]; /// @brief payload 41*a642a948SDawid Frycki } Req; /// @brief IPMB request header 42*a642a948SDawid Frycki struct 43*a642a948SDawid Frycki { 44*a642a948SDawid Frycki uint8_t address; 45*a642a948SDawid Frycki /** @brief IPMB Connection Header Format */ 46*a642a948SDawid Frycki uint8_t rqNetFnLUN; /// @brief requester's net function and logical 47*a642a948SDawid Frycki /// unit number 48*a642a948SDawid Frycki uint8_t checksum1; /// @brief checksum computed on first two bytes 49*a642a948SDawid Frycki /// of IPMB_HEADER 50*a642a948SDawid Frycki /** @brief IPMB Header */ 51*a642a948SDawid Frycki uint8_t rsSA; /// @brief responder's slave address, LS bit=0 52*a642a948SDawid Frycki uint8_t rsSeqLUN; /// @brief responder's sequence number and logical 53*a642a948SDawid Frycki /// unit number 54*a642a948SDawid Frycki uint8_t cmd; /// @brief command required by the network identify the 55*a642a948SDawid Frycki /// type of rqts 56*a642a948SDawid Frycki uint8_t completionCode; /// @brief IPMB nodes return a Completion 57*a642a948SDawid Frycki /// Code in all response msgs 58*a642a948SDawid Frycki uint8_t data[]; /// @brief payload 59*a642a948SDawid Frycki } Resp; /// @brief IPMB response header 60*a642a948SDawid Frycki } Header; /// @brief IPMB frame header 61*a642a948SDawid Frycki } IPMB_HEADER; 62*a642a948SDawid Frycki #pragma pack() 63*a642a948SDawid Frycki 64*a642a948SDawid Frycki #endif 65