[hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 5343: Drop prefix.h _t namespace suffix, which is reserved by POSIX.

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Tue, 04 Jan 2011 12:01:32 -0000

------------------------------------------------------------
revno: 5343
committer: Diego Biurrun <diego@xxxxxxxxxx>
branch nick: hipl
timestamp: Mon 2011-01-03 18:17:17 +0100
message:
  Drop prefix.h _t namespace suffix, which is reserved by POSIX.
modified:
  lib/core/prefix.c
  lib/core/prefix.h


--
lp:hipl
https://code.launchpad.net/~hipl-core/hipl/trunk

Your team HIPL core team is subscribed to branch lp:hipl.
To unsubscribe from this branch go to 
https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'lib/core/prefix.c'
--- lib/core/prefix.c   2010-12-07 17:48:47 +0000
+++ lib/core/prefix.c   2011-01-03 17:17:17 +0000
@@ -61,8 +61,8 @@
  */
 int ipv6_addr_is_hit(const struct in6_addr *hit)
 {
-    hip_closest_prefix_type_t hit_begin;
-    memcpy(&hit_begin, hit, sizeof(hip_closest_prefix_type_t));
+    hip_closest_prefix_type hit_begin;
+    memcpy(&hit_begin, hit, sizeof(hip_closest_prefix_type));
     hit_begin  = ntohl(hit_begin);
     hit_begin &= HIP_HIT_TYPE_MASK_INV;
     return hit_begin == HIP_HIT_PREFIX;
@@ -76,8 +76,8 @@
  */
 int ipv6_addr_is_teredo(const struct in6_addr *teredo)
 {
-    hip_closest_prefix_type_t teredo_begin;
-    memcpy(&teredo_begin, teredo, sizeof(hip_closest_prefix_type_t));
+    hip_closest_prefix_type teredo_begin;
+    memcpy(&teredo_begin, teredo, sizeof(hip_closest_prefix_type));
     teredo_begin  = ntohl(teredo_begin);
     teredo_begin &= HIP_TEREDO_TYPE_MASK_INV;
     return teredo_begin == HIP_TEREDO_PREFIX;
@@ -128,11 +128,11 @@
  */
 void set_hit_prefix(struct in6_addr *hit)
 {
-    hip_closest_prefix_type_t hit_begin;
-    memcpy(&hit_begin, hit, sizeof(hip_closest_prefix_type_t));
+    hip_closest_prefix_type hit_begin;
+    memcpy(&hit_begin, hit, sizeof(hip_closest_prefix_type));
     hit_begin &= htonl(HIP_HIT_TYPE_MASK_CLEAR);
     hit_begin |= htonl(HIP_HIT_PREFIX);
-    memcpy(hit, &hit_begin, sizeof(hip_closest_prefix_type_t));
+    memcpy(hit, &hit_begin, sizeof(hip_closest_prefix_type));
 }
 
 /**
@@ -142,11 +142,11 @@
  */
 void set_lsi_prefix(hip_lsi_t *lsi)
 {
-    hip_closest_prefix_type_t lsi_begin;
-    memcpy(&lsi_begin, lsi, sizeof(hip_closest_prefix_type_t));
+    hip_closest_prefix_type lsi_begin;
+    memcpy(&lsi_begin, lsi, sizeof(hip_closest_prefix_type));
     lsi_begin &= htonl(HIP_LSI_TYPE_MASK_CLEAR);
     lsi_begin |= htonl(HIP_LSI_PREFIX);
-    memcpy(lsi, &lsi_begin, sizeof(hip_closest_prefix_type_t));
+    memcpy(lsi, &lsi_begin, sizeof(hip_closest_prefix_type));
 }
 
 /**

=== modified file 'lib/core/prefix.h'
--- lib/core/prefix.h   2010-12-13 21:12:34 +0000
+++ lib/core/prefix.h   2011-01-03 17:17:17 +0000
@@ -42,7 +42,7 @@
 };
 
 
-typedef uint32_t hip_closest_prefix_type_t;
+typedef uint32_t hip_closest_prefix_type;
 
 int ipv6_addr_is_hit(const struct in6_addr *hit);
 int ipv6_addr_is_teredo(const struct in6_addr *teredo);

Other related posts:

  • » [hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 5343: Drop prefix.h _t namespace suffix, which is reserved by POSIX. - noreply