On 05/03/07, Iacopo Masi <[EMAIL PROTECTED]> wrote:
> In particular I would like to know how to manage this parts of linux system:
>
>         - LAN interfaces
>         - WLAN interfaces
>         - Static and Dynamic Routing

All three of those are covered by standard MIBs, already implemented
within the Net-SNMP agent.  If you wish to cover hardware that is not
already supported, the best approach would be to start from the current
code, and extend it to handle your particular requirements.
   That feels much more sensible than trying to re-do everything from
scratch.


>         - Firewalling

That's probably the most interesting one.
We did have a firewall module, but due to licensing restrictions,
it can't be distributed with the rest of the source.  AFAIK, it's
still available (see agent/mibgroup/ipfwchains/README), but
it probably hasn't been maintained or updated for quite a while.


> For example, let's take the Firewall example, that is covered in linux by
> iptables and netfilter. I would create a snmp agent that could get the list
> of iptables entries for all chains and all tables. And by the way the agent
> could receive a snmpset command to add some new rules.

> How do I create this?

Well the first thing to do would be to analyse the requirements of
both monitoring and managing iptables and netfilter, and come up
with a design for the MIB.

There's no point in even thinking about implementing this in
code, until you've got a suitable MIB design to work with.


> In other way, Should I deal with "/proc/net/dev" or with "ifconfig" for the
> example of the LAN interfaces?

If possible, it's always best to work with API calls and/or status
files (or pseudo-files).  Invoking a sub-command such as "ifconfig"
should always be kept as a last resort.
   This sometimes seems the easiest way to proceed, but it's
a lazy form of development, and tends to store up problems for
the future.
  If there's a clean interface, then use it!

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to