开发者

How to Determine IP and MAC address for netsnmp agent?

开发者 https://www.devze.com 2023-03-05 22:37 出处:网络
I am using Debian 6.0 and net-snmp 5.4.3. I have a question relating to capturing IP address and MAC address for ethernet interfaces exist on the system. In my SNMP agent, I have to figure out how man

I am using Debian 6.0 and net-snmp 5.4.3. I have a question relating to capturing IP address and MAC address for ethernet interfaces exist on the system. In my SNMP agent, I have to figure out how many system ethernet interfaces are exist and update their IP and MAC address in a table. I have looked at pre installed mibs and found that IP-MIB contains a table for system ethernet IP addresses but I couldn't find the source to check how it is implemented. Could you please suggest me how can I implement this functionality or where I can find some further infro开发者_C百科mation?

Thanks, Ravi


Someone may suggest a better way, but if not here's a solution of last resort. You can call out to ifconfig to get the data as text and then parse the results.

0

精彩评论

暂无评论...
验证码 换一张
取 消