/[radius]/radius/snmplib/snmp_pdu.c
ViewVC logotype

Diff of /radius/snmplib/snmp_pdu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by gray, Tue May 14 11:08:22 2002 UTC revision 1.6 by gray, Wed Apr 30 08:44:33 2003 UTC
# Line 1  Line 1 
1  /*  /*
2     Copyright (C) 2001, Sergey Poznyakoff.     Copyright (C) 2001,2003, Sergey Poznyakoff.
3    
4     This file is part of GNU Radius SNMP Library.     This file is part of GNU Radius SNMP Library.
5    
# Line 27  Line 27 
27  #include <snmp.h>  #include <snmp.h>
28    
29  struct snmp_pdu *  struct snmp_pdu *
30  snmp_pdu_create(type)  snmp_pdu_create(int type)
         int type;  
31  {  {
32          struct snmp_pdu *pdu;          struct snmp_pdu *pdu;
33    
# Line 43  snmp_pdu_create(type) Line 42  snmp_pdu_create(type)
42  }  }
43    
44  void  void
45  snmp_pdu_free(pdu)  snmp_pdu_free(struct snmp_pdu *pdu)
         struct snmp_pdu *pdu;  
46  {  {
47          if (!pdu)          if (!pdu)
48                  return;                  return;
# Line 53  snmp_pdu_free(pdu) Line 51  snmp_pdu_free(pdu)
51  }  }
52    
53  void  void
54  snmp_pdu_add_var(pdu, var)  snmp_pdu_add_var(struct snmp_pdu *pdu, struct snmp_var *var)
         struct snmp_pdu *pdu;  
         struct snmp_var *var;  
55  {  {
56          var->next = pdu->var;          var->next = pdu->var;
57          pdu->var = var;          pdu->var = var;
58  }  }
59    
60  u_char *  u_char *
61  snmp_pdu_decode(data, length, pdu)  snmp_pdu_decode(u_char *data, int *length, struct snmp_pdu *pdu)
         u_char *data;  
         int *length;  
         struct snmp_pdu *pdu;  
62  {  {
63          u_char *buf = data;          u_char *buf = data;
64          u_char type;          u_char type;
# Line 101  snmp_pdu_decode(data, length, pdu) Line 94  snmp_pdu_decode(data, length, pdu)
94                                    
95                                    
96  u_char *  u_char *
97  snmp_pdu_encode(data, length, pdu)  snmp_pdu_encode(u_char *data, int *length, struct snmp_pdu *pdu)
         u_char *data;  
         int *length;  
         struct snmp_pdu *pdu;  
98  {  {
99          u_char *buf = data;          u_char *buf = data;
100    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26