"Decoding" ipset error codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using libmnl to add entries to an IP set.  (Code here[1] if anyone
is interested.)  I've got everything working, but I haven't yet found a
way to "decode" any protocol-specific errors that may be returned,
because the set is not of the correct type, for example.

I see that libipset has an ipset_errcode() function but it looks to be
designed for use only when libipset is being used for the actual netlink
communication.  (I didn't do that in this case, because libipset looks
to be targeted only on parsing and executing commands that are passed to
the ipset command.  It didn't make any sense to me to create a command
string in a buffer just so libipset could parse it back into information
that is already known.)

Is there any way that I can give users of my program something more
helpful than "unknown error XXXX"?

Thanks!

[1] https://github.com/ipilcher/fdf/blob/main/src/filters/ipset.c

--
========================================================================
Google                                      Where SkyNet meets Idiocracy
========================================================================



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux