logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Hello.. I Want to send link up(or Down) trap to manager..: msg#00650

Subject: Hello.. I Want to send link up(or Down) trap to manager..

I use ifAdminStatus to change(set) interface status and return complete result from agent to manager.

 

Fortunately send_easy_trap(((int)var_val[0] == 1)?SNMP_TRAP_LINKUP:SNMP_TRAP_LINKDOWN, 0); is complete but not distinguish what interface status is changed !!

 

So I use to send_trap_vars(int trap, int specific, netsnmp_variable_list * vars) ..

But I dont know how fill variable vars..

 

Please Help me..

 

Example..

Manager % snmptrap v1 c public 123.123.234.123 “” “” 2 0 IF-MIB::ifIndex I 1

 

How send to use send_trap_vars() ??

 

struct variable_list {

    struct variable_list *next_variable;    /* NULL for last variable */

    oid            *name;   /* Object identifier of variable */

    size_t          name_length;    /* number of subid's in name */

    u_char          type;   /* ASN type of variable */

    union {                 /* value of variable */

long           *integer;

:

} val;

    size_t          val_len;

    oid             name_loc[MAX_OID_LEN];  /* 90 percentile < 24. */

    u_char          buf[40];        /* 90 percentile < 40. */

    void           *data;   /* (Opaque) hook for additional data */

    void            (*dataFreeHook)(void *);       /* callback to free above */

    int             index;

};

 

What field.. How fill???

 

 

I am afraid my English isnt good. Please excuse any mistakes that I made.. ^^

<Prev in Thread] Current Thread [Next in Thread>