aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/m2m
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-03-01 19:05:25 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-03-01 19:05:25 +0000
commit809c118bee21f3dc361116d8562ecef683855888 (patch)
tree47eeb2c6ac4f601fb455a9b3511dd761865690ca /plugins/m2m
parentb9f723bb185a8742761626b3daaecd2bbfa22d7e (diff)
From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from WiMAX plugins svn path=/trunk/; revision=47978
Diffstat (limited to 'plugins/m2m')
-rw-r--r--plugins/m2m/wimax_tlv.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/plugins/m2m/wimax_tlv.c b/plugins/m2m/wimax_tlv.c
index 687706e6ed..e936ec6951 100644
--- a/plugins/m2m/wimax_tlv.c
+++ b/plugins/m2m/wimax_tlv.c
@@ -44,50 +44,50 @@
/* init_tlv_info() */
/* retrive the tlv information from specified tvb and offset */
/* parameter: */
-/* this - pointer of a tlv information data structure */
+/* info - pointer of a tlv information data structure */
/* return: */
/* 0-success */
/* !=0-the invalid size of the TLV length (failed) */
/*************************************************************/
-gint init_tlv_info(tlv_info_t *this, tvbuff_t *tvb, gint offset)
+gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset)
{
guint tlv_len;
/* get TLV type */
- this->type = (guint8)tvb_get_guint8( tvb, offset );
+ info->type = (guint8)tvb_get_guint8( tvb, offset );
/* get TLV length */
tlv_len = (guint)tvb_get_guint8( tvb, (offset + 1) );
/* set the TLV value offset */
- this->value_offset = 2;
+ info->value_offset = 2;
/* adjust for multiple-byte TLV length */
if((tlv_len & WIMAX_TLV_EXTENDED_LENGTH_MASK) != 0)
{ /* multiple bytes TLV length */
- this->length_type = 1;
+ info->length_type = 1;
/* get the size of the TLV length */
tlv_len = (tlv_len & WIMAX_TLV_LENGTH_MASK);
- this->size_of_length = tlv_len;
+ info->size_of_length = tlv_len;
/* update the TLV value offset */
- this->value_offset += tlv_len;
+ info->value_offset += tlv_len;
switch (tlv_len)
{
case 0:
- this->length = 0; /* no length */
+ info->length = 0; /* no length */
break;
case 1:
- this->length = (gint32)tvb_get_guint8( tvb, (offset + 2) ); /* 8 bit */
+ info->length = (gint32)tvb_get_guint8( tvb, (offset + 2) ); /* 8 bit */
break;
case 2:
- this->length = (gint32)tvb_get_ntohs( tvb, (offset + 2) ); /* 16 bit */
+ info->length = (gint32)tvb_get_ntohs( tvb, (offset + 2) ); /* 16 bit */
break;
case 3:
- this->length = (gint32)tvb_get_ntoh24( tvb, (offset + 2) ); /* 24 bit */
+ info->length = (gint32)tvb_get_ntoh24( tvb, (offset + 2) ); /* 24 bit */
break;
case 4:
- this->length = (gint32)tvb_get_ntohl( tvb, (offset + 2) ); /* 32 bit */
+ info->length = (gint32)tvb_get_ntohl( tvb, (offset + 2) ); /* 32 bit */
break;
default:
/* mark invalid tlv */
- this->valid = 0;
+ info->valid = 0;
/* failed, return the invalid size of the tlv length */
return (gint)tlv_len;
break;
@@ -95,12 +95,12 @@ gint init_tlv_info(tlv_info_t *this, tvbuff_t *tvb, gint offset)
}
else /* single byte length */
{
- this->length_type = 0;
- this->size_of_length = 0;
- this->length = (gint32)tlv_len;
+ info->length_type = 0;
+ info->size_of_length = 0;
+ info->length = (gint32)tlv_len;
}
/* mark valid tlv */
- this->valid = 1;
+ info->valid = 1;
/* success */
return 0;
}
@@ -109,15 +109,15 @@ gint init_tlv_info(tlv_info_t *this, tvbuff_t *tvb, gint offset)
/* get_tlv_type() */
/* get the tlv type of the specified tlv information */
/* parameter: */
-/* this - pointer of a tlv information data structure */
+/* info - pointer of a tlv information data structure */
/* return: */
/* >=0 - TLV type */
/* =-1 - invalid tlv info */
/*************************************************************/
-gint get_tlv_type(tlv_info_t *this)
+gint get_tlv_type(tlv_info_t *info)
{
- if(this->valid)
- return (gint)this->type;
+ if(info->valid)
+ return (gint)info->type;
return -1;
}
@@ -125,15 +125,15 @@ gint get_tlv_type(tlv_info_t *this)
/* get_tlv_size_of_length() */
/* get the size of tlv length of the specified tlv information*/
/* parameter: */
-/* this - pointer of a tlv information data structure */
+/* info - pointer of a tlv information data structure */
/* return: */
/* >=0 - the size of TLV length */
/* =-1 - invalid tlv info */
/**************************************************************/
-gint get_tlv_size_of_length(tlv_info_t *this)
+gint get_tlv_size_of_length(tlv_info_t *info)
{
- if(this->valid)
- return (gint)this->size_of_length;
+ if(info->valid)
+ return (gint)info->size_of_length;
return -1;
}
@@ -141,15 +141,15 @@ gint get_tlv_size_of_length(tlv_info_t *this)
/* get_tlv_length() */
/* get the tlv length of the specified tlv information */
/* parameter: */
-/* this - pointer of a tlv information data structure */
+/* info - pointer of a tlv information data structure */
/* return: */
/* >=0 - TLV length */
/* =-1 - invalid tlv info */
/*************************************************************/
-gint32 get_tlv_length(tlv_info_t *this)
+gint32 get_tlv_length(tlv_info_t *info)
{
- if(this->valid)
- return (gint32)this->length;
+ if(info->valid)
+ return (gint32)info->length;
return -1;
}
@@ -157,15 +157,15 @@ gint32 get_tlv_length(tlv_info_t *this)
/* get_tlv_value_offset() */
/* get the tlv value offset of the specified tlv information */
/* parameter: */
-/* this - pointer of a tlv information data structure */
+/* info - pointer of a tlv information data structure */
/* return: */
/* >0 - TLV value offset in byte */
/* =-1 - invalid tlv info */
/*************************************************************/
-gint get_tlv_value_offset(tlv_info_t *this)
+gint get_tlv_value_offset(tlv_info_t *info)
{
- if(this->valid)
- return (gint)this->value_offset;
+ if(info->valid)
+ return (gint)info->value_offset;
return -1;
}
@@ -173,14 +173,14 @@ gint get_tlv_value_offset(tlv_info_t *this)
/* get_tlv_length_type() */
/* get the tlv length type of the specified tlv information */
/* parameter: */
-/* this - pointer of a tlv information data structure */
+/* info - pointer of a tlv information data structure */
/* return: */
/* 0 - single byte TLV length */
/* 1 - multiple bytes TLV length */
/*************************************************************/
-gint get_tlv_length_type(tlv_info_t *this)
+gint get_tlv_length_type(tlv_info_t *info)
{
- if(this->valid)
- return (gint)this->length_type;
+ if(info->valid)
+ return (gint)info->length_type;
return -1;
}