Skip to content

Commit

Permalink
[nes]: INET changes ...
Browse files Browse the repository at this point in the history
  • Loading branch information
nes-repo committed May 24, 2015
1 parent 34c0081 commit ed238ee
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
40 changes: 20 additions & 20 deletions inet/ipMIB.c
Original file line number Diff line number Diff line change
Expand Up @@ -2149,10 +2149,10 @@ ipAddressPrefixTable_mapper (
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->i32Origin);
break;
case IPADDRESSPREFIXONLINKFLAG:
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->i32OnLinkFlag);
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->u8OnLinkFlag);
break;
case IPADDRESSPREFIXAUTONOMOUSFLAG:
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->i32AutonomousFlag);
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->u8AutonomousFlag);
break;
case IPADDRESSPREFIXADVPREFERREDLIFETIME:
snmp_set_var_typed_integer (request->requestvb, ASN_UNSIGNED, table_entry->u32AdvPreferredLifetime);
Expand Down Expand Up @@ -4218,10 +4218,10 @@ ipv6RouterAdvertTable_createEntry (
return NULL;
}

poEntry->i32SendAdverts = ipv6RouterAdvertSendAdverts_false_c;
poEntry->u8SendAdverts = ipv6RouterAdvertSendAdverts_false_c;
poEntry->u32MaxInterval = 600;
poEntry->i32ManagedFlag = ipv6RouterAdvertManagedFlag_false_c;
poEntry->i32OtherConfigFlag = ipv6RouterAdvertOtherConfigFlag_false_c;
poEntry->u8ManagedFlag = ipv6RouterAdvertManagedFlag_false_c;
poEntry->u8OtherConfigFlag = ipv6RouterAdvertOtherConfigFlag_false_c;
poEntry->u32LinkMTU = 0;
poEntry->u32ReachableTime = 0;
poEntry->u32RetransmitTime = 0;
Expand Down Expand Up @@ -4374,7 +4374,7 @@ ipv6RouterAdvertTable_mapper (
switch (table_info->colnum)
{
case IPV6ROUTERADVERTSENDADVERTS:
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->i32SendAdverts);
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->u8SendAdverts);
break;
case IPV6ROUTERADVERTMAXINTERVAL:
snmp_set_var_typed_integer (request->requestvb, ASN_UNSIGNED, table_entry->u32MaxInterval);
Expand All @@ -4383,10 +4383,10 @@ ipv6RouterAdvertTable_mapper (
snmp_set_var_typed_integer (request->requestvb, ASN_UNSIGNED, table_entry->u32MinInterval);
break;
case IPV6ROUTERADVERTMANAGEDFLAG:
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->i32ManagedFlag);
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->u8ManagedFlag);
break;
case IPV6ROUTERADVERTOTHERCONFIGFLAG:
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->i32OtherConfigFlag);
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->u8OtherConfigFlag);
break;
case IPV6ROUTERADVERTLINKMTU:
snmp_set_var_typed_integer (request->requestvb, ASN_UNSIGNED, table_entry->u32LinkMTU);
Expand Down Expand Up @@ -4609,18 +4609,18 @@ ipv6RouterAdvertTable_mapper (
switch (table_info->colnum)
{
case IPV6ROUTERADVERTSENDADVERTS:
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->i32SendAdverts))) == NULL)
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->u8SendAdverts))) == NULL)
{
netsnmp_set_request_error (reqinfo, request, SNMP_ERR_RESOURCEUNAVAILABLE);
return SNMP_ERR_NOERROR;
}
else if (pvOldDdata != table_entry)
{
memcpy (pvOldDdata, &table_entry->i32SendAdverts, sizeof (table_entry->i32SendAdverts));
memcpy (pvOldDdata, &table_entry->u8SendAdverts, sizeof (table_entry->u8SendAdverts));
netsnmp_request_add_list_data (request, netsnmp_create_data_list (ROLLBACK_BUFFER, pvOldDdata, &xBuffer_free));
}

table_entry->i32SendAdverts = *request->requestvb->val.integer;
table_entry->u8SendAdverts = *request->requestvb->val.integer;
break;
case IPV6ROUTERADVERTMAXINTERVAL:
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->u32MaxInterval))) == NULL)
Expand Down Expand Up @@ -4651,32 +4651,32 @@ ipv6RouterAdvertTable_mapper (
table_entry->u32MinInterval = *request->requestvb->val.integer;
break;
case IPV6ROUTERADVERTMANAGEDFLAG:
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->i32ManagedFlag))) == NULL)
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->u8ManagedFlag))) == NULL)
{
netsnmp_set_request_error (reqinfo, request, SNMP_ERR_RESOURCEUNAVAILABLE);
return SNMP_ERR_NOERROR;
}
else if (pvOldDdata != table_entry)
{
memcpy (pvOldDdata, &table_entry->i32ManagedFlag, sizeof (table_entry->i32ManagedFlag));
memcpy (pvOldDdata, &table_entry->u8ManagedFlag, sizeof (table_entry->u8ManagedFlag));
netsnmp_request_add_list_data (request, netsnmp_create_data_list (ROLLBACK_BUFFER, pvOldDdata, &xBuffer_free));
}

table_entry->i32ManagedFlag = *request->requestvb->val.integer;
table_entry->u8ManagedFlag = *request->requestvb->val.integer;
break;
case IPV6ROUTERADVERTOTHERCONFIGFLAG:
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->i32OtherConfigFlag))) == NULL)
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->u8OtherConfigFlag))) == NULL)
{
netsnmp_set_request_error (reqinfo, request, SNMP_ERR_RESOURCEUNAVAILABLE);
return SNMP_ERR_NOERROR;
}
else if (pvOldDdata != table_entry)
{
memcpy (pvOldDdata, &table_entry->i32OtherConfigFlag, sizeof (table_entry->i32OtherConfigFlag));
memcpy (pvOldDdata, &table_entry->u8OtherConfigFlag, sizeof (table_entry->u8OtherConfigFlag));
netsnmp_request_add_list_data (request, netsnmp_create_data_list (ROLLBACK_BUFFER, pvOldDdata, &xBuffer_free));
}

table_entry->i32OtherConfigFlag = *request->requestvb->val.integer;
table_entry->u8OtherConfigFlag = *request->requestvb->val.integer;
break;
case IPV6ROUTERADVERTLINKMTU:
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->u32LinkMTU))) == NULL)
Expand Down Expand Up @@ -4788,7 +4788,7 @@ ipv6RouterAdvertTable_mapper (
switch (table_info->colnum)
{
case IPV6ROUTERADVERTSENDADVERTS:
memcpy (&table_entry->i32SendAdverts, pvOldDdata, sizeof (table_entry->i32SendAdverts));
memcpy (&table_entry->u8SendAdverts, pvOldDdata, sizeof (table_entry->u8SendAdverts));
break;
case IPV6ROUTERADVERTMAXINTERVAL:
memcpy (&table_entry->u32MaxInterval, pvOldDdata, sizeof (table_entry->u32MaxInterval));
Expand All @@ -4797,10 +4797,10 @@ ipv6RouterAdvertTable_mapper (
memcpy (&table_entry->u32MinInterval, pvOldDdata, sizeof (table_entry->u32MinInterval));
break;
case IPV6ROUTERADVERTMANAGEDFLAG:
memcpy (&table_entry->i32ManagedFlag, pvOldDdata, sizeof (table_entry->i32ManagedFlag));
memcpy (&table_entry->u8ManagedFlag, pvOldDdata, sizeof (table_entry->u8ManagedFlag));
break;
case IPV6ROUTERADVERTOTHERCONFIGFLAG:
memcpy (&table_entry->i32OtherConfigFlag, pvOldDdata, sizeof (table_entry->i32OtherConfigFlag));
memcpy (&table_entry->u8OtherConfigFlag, pvOldDdata, sizeof (table_entry->u8OtherConfigFlag));
break;
case IPV6ROUTERADVERTLINKMTU:
memcpy (&table_entry->u32LinkMTU, pvOldDdata, sizeof (table_entry->u32LinkMTU));
Expand Down
10 changes: 5 additions & 5 deletions inet/ipMIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,8 @@ typedef struct ipAddressPrefixEntry_t

/* Column values */
int32_t i32Origin;
int32_t i32OnLinkFlag;
int32_t i32AutonomousFlag;
uint8_t u8OnLinkFlag;
uint8_t u8AutonomousFlag;
uint32_t u32AdvPreferredLifetime;
uint32_t u32AdvValidLifetime;

Expand Down Expand Up @@ -1019,11 +1019,11 @@ typedef struct ipv6RouterAdvertEntry_t
uint32_t u32IfIndex;

/* Column values */
int32_t i32SendAdverts;
uint8_t u8SendAdverts;
uint32_t u32MaxInterval;
uint32_t u32MinInterval;
int32_t i32ManagedFlag;
int32_t i32OtherConfigFlag;
uint8_t u8ManagedFlag;
uint8_t u8OtherConfigFlag;
uint32_t u32LinkMTU;
uint32_t u32ReachableTime;
uint32_t u32RetransmitTime;
Expand Down
2 changes: 1 addition & 1 deletion inet/neInetMIB.c
Original file line number Diff line number Diff line change
Expand Up @@ -2321,7 +2321,7 @@ neIpUnNumTable_removeHier (
bool
neIpUnNumRowStatus_handler (
neIpUnNumEntry_t *poEntry,
int32_t u8RowStatus)
uint8_t u8RowStatus)
{
if (!ifData_getByIndexExt (poEntry->u32IfIndex, false, NULL))
{
Expand Down

0 comments on commit ed238ee

Please sign in to comment.