Replace all magic numbers implied to mean NM completions codes
with descriptive macro names.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add nm_set_id() and nm_check_id() functions, use them and
the existing htoipmi24() to reduce code duplication.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>