xref: /openbmc/google-ipmi-sys/entity_name.hpp (revision 444b5ea4847ea7c014114094d4b63672122f9786)
1a2056e9cSWilly Tu // Copyright 2021 Google LLC
2a2056e9cSWilly Tu //
3a2056e9cSWilly Tu // Licensed under the Apache License, Version 2.0 (the "License");
4a2056e9cSWilly Tu // you may not use this file except in compliance with the License.
5a2056e9cSWilly Tu // You may obtain a copy of the License at
6a2056e9cSWilly Tu //
7a2056e9cSWilly Tu //      http://www.apache.org/licenses/LICENSE-2.0
8a2056e9cSWilly Tu //
9a2056e9cSWilly Tu // Unless required by applicable law or agreed to in writing, software
10a2056e9cSWilly Tu // distributed under the License is distributed on an "AS IS" BASIS,
11a2056e9cSWilly Tu // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12a2056e9cSWilly Tu // See the License for the specific language governing permissions and
13a2056e9cSWilly Tu // limitations under the License.
14a2056e9cSWilly Tu 
15fd0f1cf9SJaghathiswari Rankappagounder Natarajan #pragma once
16fd0f1cf9SJaghathiswari Rankappagounder Natarajan 
1707f85150SPatrick Venture #include "handler.hpp"
1807f85150SPatrick Venture 
192c9e1625SWilliam A. Kennington III #include <ipmid/api.h>
20fd0f1cf9SJaghathiswari Rankappagounder Natarajan 
21ff3cd8e9SWilly Tu #include <ipmid/api-types.hpp>
22*444b5ea4SPatrick Williams 
23b4e3704cSWilly Tu #include <span>
24ff3cd8e9SWilly Tu #include <vector>
25ff3cd8e9SWilly Tu 
26fd0f1cf9SJaghathiswari Rankappagounder Natarajan namespace google
27fd0f1cf9SJaghathiswari Rankappagounder Natarajan {
28fd0f1cf9SJaghathiswari Rankappagounder Natarajan namespace ipmi
29fd0f1cf9SJaghathiswari Rankappagounder Natarajan {
30fd0f1cf9SJaghathiswari Rankappagounder Natarajan 
31ff3cd8e9SWilly Tu struct GetEntityNameReply
32ff3cd8e9SWilly Tu {
33ff3cd8e9SWilly Tu     uint8_t entityNameLength;
34ff3cd8e9SWilly Tu } __attribute__((packed));
35ff3cd8e9SWilly Tu 
36fd0f1cf9SJaghathiswari Rankappagounder Natarajan // Handle the "entity id:entity instance" to entity name mapping command.
37fd0f1cf9SJaghathiswari Rankappagounder Natarajan // Sys can query the entity name for a particular "entity id:entity instance".
38b4e3704cSWilly Tu Resp getEntityName(std::span<const uint8_t> data, HandlerInterface* handler);
39fd0f1cf9SJaghathiswari Rankappagounder Natarajan 
40fd0f1cf9SJaghathiswari Rankappagounder Natarajan } // namespace ipmi
41fd0f1cf9SJaghathiswari Rankappagounder Natarajan } // namespace google
42