History log of /openbmc/phosphor-host-ipmid/transporthandler.hpp (Results 1 – 25 of 31)
Revision Date Author Comments
# 69b4c281 03-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: Ic23653be3ed404980fd0e723d9ed8354e2b32579
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: Ic23653be3ed404980fd0e723d9ed8354e2b32579
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# b1d4518c 10-Sep-2024 George Liu <liuxiwei@ieisystem.com>

transporthandler: Fix out_of_range exception caused by using at

When using the .at method to get the value in std::map, if the key
does not exist, an out_of_range exception will be thrown.

This com

transporthandler: Fix out_of_range exception caused by using at

When using the .at method to get the value in std::map, if the key
does not exist, an out_of_range exception will be thrown.

This commit moves this logic to the try method and catches the
exception.

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Ia9479bd3ce53d32515bef13db1bba7b3fe6e0429

show more ...


# 1318a5ed 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I01547e98d27910919e09ebf7907c86292a6c825d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 0893ca3c 19-Oct-2023 Peter Foley <pefoley@google.com>

transporthandler: Split constants into a standalone header.

In environments that disable exceptions, it's problematic to have
headers that depend on exceptions being enabled.
Split constant values o

transporthandler: Split constants into a standalone header.

In environments that disable exceptions, it's problematic to have
headers that depend on exceptions being enabled.
Split constant values out of transporthandler.hpp so that they can be
re-used.

Change-Id: If4ee8221f4350f1d63f87e3b7ced91472c52fad3
Signed-off-by: Peter Foley <pefoley@google.com>

show more ...


# c72f3602 19-Oct-2023 William A. Kennington III <wak@google.com>

transporthandler: Fix path check

Right now, paths for channel names can sometimes conflict if we have
an interface whose name is a subset of another interface. This makes the
match much more explici

transporthandler: Fix path check

Right now, paths for channel names can sometimes conflict if we have
an interface whose name is a subset of another interface. This makes the
match much more explicit. It also happens to remove the string search
completely.

Change-Id: Ia3a91e4a04a28d0b76eade2c5e716017c5431e71
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 726f2bdd 21-Jun-2023 William A. Kennington III <wak@google.com>

transporthandler: Use stdplus network functions

These are shared with phosphor-networkd.

Change-Id: I2dc796f195c733b5b5b4edcfd59186e3ef30b515
Signed-off-by: William A. Kennington III <wak@google.co

transporthandler: Use stdplus network functions

These are shared with phosphor-networkd.

Change-Id: I2dc796f195c733b5b5b4edcfd59186e3ef30b515
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 6fdbb2d1 21-Jun-2023 William A. Kennington III <wak@google.com>

transporthandler: Let phosphor-networkd do field validation

We can leverage networkd error handling for validating our fields.

Change-Id: I880d6dd9a6418e55dfe821f84bfcb8cb4d2eb618
Signed-off-by: Wi

transporthandler: Let phosphor-networkd do field validation

We can leverage networkd error handling for validating our fields.

Change-Id: I880d6dd9a6418e55dfe821f84bfcb8cb4d2eb618
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 7a3831b5 21-Jun-2023 William A. Kennington III <wak@google.com>

transporthandler: Generic set exception handling

This makes it easier to handle errors across multiple command types as
they all have common return codes for specific types of failures.

Change-Id:

transporthandler: Generic set exception handling

This makes it easier to handle errors across multiple command types as
they all have common return codes for specific types of failures.

Change-Id: I033a171b5fca78a62b52424db970ecfdf7a15e17
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# a8a2e5f6 21-Jun-2023 William A. Kennington III <wak@google.com>

transporthandler: Refactor dhcp get / set

phosphor-networkd now exposes dhcp settings as individual properties, we
no longer need to parse an enum / repack an enum to interface with them.

Change-Id

transporthandler: Refactor dhcp get / set

phosphor-networkd now exposes dhcp settings as individual properties, we
no longer need to parse an enum / repack an enum to interface with them.

Change-Id: I2c6d366e936a2de172367cdd19bde06f8abf4dcb
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 523e2d1b 05-Sep-2023 Willy Tu <wltu@google.com>

ipmid: Update sdbuspp namespaces

Fixed all errors when we remove
`SDBUSPP_REMOVE_DEPRECATED_NAMESPACE` in sdbusplus.

Change-Id: I5607585b2709faa7aee347d26e458ef769ca1626
Signed-off-by: Willy Tu <wl

ipmid: Update sdbuspp namespaces

Fixed all errors when we remove
`SDBUSPP_REMOVE_DEPRECATED_NAMESPACE` in sdbusplus.

Change-Id: I5607585b2709faa7aee347d26e458ef769ca1626
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# fbc6c9d7 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I44441096113929ce96eb1439e2932e6ff3c87f27
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 5d82f474 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ibd2a0b512bfb7caf65bfab64b271d194da520aac

show more ...


# 11d68897 20-Jan-2022 Willy Tu <wltu@google.com>

cleanup: Remove all warning errors for the Meson build support

Remove all the build warning to prepare for the meson build.
Meson build will be in
https://gerrit.openbmc-project.xyz/c/openbmc/phosph

cleanup: Remove all warning errors for the Meson build support

Remove all the build warning to prepare for the meson build.
Meson build will be in
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/47748

Tested:
Ipmi command works fine the cleanup.
```
$ systemctl status phosphor-ipmi-host
● phosphor-ipmi-host.service - Phosphor Inband IPMI
Loaded: loaded (/lib/systemd/system/phosphor-ipmi-host.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 1970-01-08 21:20:56 UTC; 21s ago
Main PID: 24987 (ipmid)
CGroup: /system.slice/phosphor-ipmi-host.service
└─24987 /tmp/ipmid

Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X30] for Ethstats Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X30] for Ethstats Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X32] for Sys Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X02] for I2C
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X02] for I2C
Jan 08 21:20:56 $HOST ipmid[24987]: I2C_WHITELIST_CHECK is disabled, do not populate whitelist
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X04] for Manual Zone Control
Jan 08 21:20:56 $HOST systemd[1]: Started Phosphor Inband IPMI.
Jan 08 21:20:56 $HOST ipmid[24987]: Loading whitelist filter
Jan 08 21:20:56 $HOST ipmid[24987]: Set restrictedMode = true
(reverse-i-search)`ipmi': systemctl status phosphor-^Cmi-host

$ ipmitool mc info
Device ID : 32
Device Revision : 1
Firmware Revision : 0.00
IPMI Version : 2.0
Manufacturer ID : 7244
Manufacturer Name : Quanta Computer Inc.
Product ID : 14426 (0x385a)
Product Name : Unknown (0x385A)
Device Available : yes
Provides Device SDRs : yes
Additional Device Support :
Sensor Device
SEL Device
FRU Inventory Device
Chassis Device
Aux Firmware Rev Info :
0x00
0x00
0x00
0x00
```

Change-Id: I372c9433a274bc633a24d213b7a1bc205531e33d
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 6d4a44ed 24-Jan-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Check prefix length in Set LAN Config Param 6 & 56

In phosphor-networkd, the allowed prefix length is 1 to 32 for IPv4 and
1 to 128 for IPv6. Calling DBus API with an invalid prefix length will
resu

Check prefix length in Set LAN Config Param 6 & 56

In phosphor-networkd, the allowed prefix length is 1 to 32 for IPv4 and
1 to 128 for IPv6. Calling DBus API with an invalid prefix length will
result in uncaught exceptions. This patch checks prefix length before
setting it and returns appropriate error code on invalid value.

Tested:
* Setting IPv4 SubnetMask to 0.0.0.0 (Param 6) returns 0xcc.
* Setting IPv6 static address with PrefixLength==129 (Param 56) returns
0xc9.

Change-Id: I03af233905e415c96c896c85baf98846d0880e95
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# 23f44657 17-Mar-2022 Jian Zhang <zhangjian.3032@bytedance.com>

host-ipmid: sol: Add get/set sol conf params command

Move set/get sol config parameter command from net-ipmid to
host-ipmid, these commands could be set by other interface,
not Lan only.

Notice:
In

host-ipmid: sol: Add get/set sol conf params command

Move set/get sol config parameter command from net-ipmid to
host-ipmid, these commands could be set by other interface,
not Lan only.

Notice:
In host-ipmid, will get/set the dbus properties only, need sol
manager register the signal to update sol manager when properties
changed.

When we use ipmitool command with channel num parameter, if you do not
specify the channel num, the default channel num always be 0xE in
command, and, we always treat channel 0xE channel is current channel.
So, if you use a command "ipmitool sol info" in console, because
this is not a lan channel, it will return "Error requesting SOL
parameter 'Set In Progress (0)': Invalid data field in request".

In net-ipmid use current channel only, ignored the channel number in
parameter, always return the current lan channel.

Tested:
1. Check sol conf.
ipmitool sol info 1
Set in progress : set-complete
Enabled : true
Force Encryption : false
Force Authentication : false
Privilege Level : ADMINISTRATOR
Character Accumulate Level (ms) : 500
Character Send Threshold : 1
Retry Count : 7
Retry Interval (ms) : 1000
Volatile Bit Rate (kbps) : IPMI-Over-Serial-Setting
Non-Volatile Bit Rate (kbps) : IPMI-Over-Serial-Setting
Payload Channel : 1 (0x01)
Payload Port : 623

2. Sel sol conf with a non-lan channel, in my env, lan channel num is 1
ipmitool sol set enabled false 1
ipmitool sol set force-encryption true 1
ipmitool sol set force-authentication true 1
ipmitool sol set privilege-level user 1
ipmitool sol set character-accumulate-level 200 1
ipmitool sol set character-send-threshold 200 1
ipmitool sol set retry-count 5 1
ipmitool sol set retry-interval 20 1

or

ipmitool -I lanplus -H x -U x -P x sol set enabled false
ipmitool -I lanplus -H x -U x -P x sol set force-encryption true
ipmitool -I lanplus -H x -U x -P x sol set force-authentication true
ipmitool -I lanplus -H x -U x -P x sol set privilege-level user
ipmitool -I lanplus -H x -U x -P x sol set character-accumulate-level 200
ipmitool -I lanplus -H x -U x -P x sol set character-send-threshold 200
ipmitool -I lanplus -H x -U x -P x sol set retry-count 5
ipmitool -I lanplus -H x -U x -P x sol set retry-interval 20

3. Check sol conf, same as set.
ipmitool sol info 1
Set in progress : set-complete
Enabled : false
Force Encryption : true
Force Authentication : true
Privilege Level : USER
Character Accumulate Level (ms) : 1000
Character Send Threshold : 200
Retry Count : 5
Retry Interval (ms) : 200
Volatile Bit Rate (kbps) : IPMI-Over-Serial-Setting
Non-Volatile Bit Rate (kbps) : IPMI-Over-Serial-Setting
Payload Channel : 1 (0x01)
Payload Port : 623

Change-Id: I1ac65881c41ad644ffc19720c0b00988eaca03e4
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>

show more ...


# d1bd8c48 11-Aug-2021 Lei YU <yulei.sh@bytedance.com>

transport: Set gateway to ethernet interface

The gateway on SystemConfiguration interface is deprecated and the
ethernet interface shall be used.

Update the transport handler to set gateway to the

transport: Set gateway to ethernet interface

The gateway on SystemConfiguration interface is deprecated and the
ethernet interface shall be used.

Update the transport handler to set gateway to the ethernet interface,
so that the behavior is the same as Redfish.

Tested: Verify in QEMU that `ipmitool lan set x defgw ...` does set the
Gateway property on the ethernet interface.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I002cf768f9bd0705c6cf5be653c1a35ce3984487

show more ...


# 8a7236ae 04-Jan-2021 John Wang <wangzhiqiang.bj@bytedance.com>

transportHandler: Separate some util functions to hpp

When I implemented the transport oem command as suggested
in [1], I found that transporthandler.cpp already implements
a lot of util functions t

transportHandler: Separate some util functions to hpp

When I implemented the transport oem command as suggested
in [1], I found that transporthandler.cpp already implements
a lot of util functions that are useful for implementing
transporthandler_oem.cpp

So, there is this patch, which moves a lot of functions
already implemented in cpp to hpp, so that transporthandler_oem.cpp can use them.
I believe it will be useful for others to implement the transport oem commands as well.

[1] https://github.com/openbmc/phosphor-host-ipmid/blob/master/transporthandler.cpp#L1264

Signed-off-by: John Wang <wangzhiqiang.bj@bytedance.com>
Change-Id: I580f005df3622ea9340cd303040d98a5527de55e

show more ...


# 690a2342 17-May-2020 Patrick Venture <venture@google.com>

transporthandler: move IPMI definitions to header

Move the IPMI constants to a header file.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I70c932965d24e4c5368f772d5df649242f0fb701


# 0a327e1c 08-Aug-2019 Suryakanth Sekar <suryakanth.sekar@linux.intel.com>

Added VLAN ID checking condition in Set LAN config

According to the VLAN 802.1VLAN spec, VLAN ID should be 1-4095

Unit test:
Verified VLAN ID 1-4095 is allowed and CC returns for 0 & > 4095

Signe

Added VLAN ID checking condition in Set LAN config

According to the VLAN 802.1VLAN spec, VLAN ID should be 1-4095

Unit test:
Verified VLAN ID 1-4095 is allowed and CC returns for 0 & > 4095

Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
Change-Id: I54bbc94c814c98dda11f8241fa31bfe0e5bbb150

show more ...


# 33250240 12-Mar-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

move types.hpp to ipmid/types.hpp for export

types.hpp is required by utility.hpp, which is exported, so it needs to
be exported as well. This moves it to the include/libipmid directory,
changes the

move types.hpp to ipmid/types.hpp for export

types.hpp is required by utility.hpp, which is exported, so it needs to
be exported as well. This moves it to the include/libipmid directory,
changes the Makefile to export it, and changes all the files that
include it so it can be found in the right place.

Change-Id: I30ec365446e4de466c266ec4faa327478460ec05
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# fc71115b 30-Jan-2019 Patrick Venture <venture@google.com>

transporthandler: Add IPV6 LAN parameters to enum

Add the IPV6 LAN parameters to the enum. These commands are not yet
supported.

Change-Id: I9847fe7c70ef66a2f0138ba79651376c011a2273
Signed-off-by:

transporthandler: Add IPV6 LAN parameters to enum

Add the IPV6 LAN parameters to the enum. These commands are not yet
supported.

Change-Id: I9847fe7c70ef66a2f0138ba79651376c011a2273
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# aab20238 19-Nov-2018 William A. Kennington III <wak@google.com>

transporthandler: LanParam enum -> enum class

We should be using enum classes instead of enums to avoid poluting the
global scope.

Tested:
Built and run through unit tests.

Change-Id: Iec72f04

transporthandler: LanParam enum -> enum class

We should be using enum classes instead of enums to avoid poluting the
global scope.

Tested:
Built and run through unit tests.

Change-Id: Iec72f04b5cbf91814d0055c670bcc509eb30a821
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 7a3479ee 19-Nov-2018 William A. Kennington III <wak@google.com>

transporthandler: Convert ints to enum

We want to be able to identify unique LanParams for each of the
different sub-queries. These make more semantic sense as an enum than
individual ints.

Tested:

transporthandler: Convert ints to enum

We want to be able to identify unique LanParams for each of the
different sub-queries. These make more semantic sense as an enum than
individual ints.

Tested:
Built and run through unit test suite.

Change-Id: Ieb304f2f866215776e8d3e264b07ea110c639efc
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 0b02be92 31-Aug-2018 Patrick Venture <venture@google.com>

add .clang-format

Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5
Signed-off-by: Patrick Venture <venture@google.com>


# a30c8d3a 21-Mar-2018 Tom Joseph <tomjoseph@in.ibm.com>

Implement RMCP+ cipher parameters in Get LAN Config parameters

Change-Id: Ic78965be94b1ba31149a05a29c1a768f06b492e4
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>


12