diff --git a/ndn-cpp/transport/tcp-transport.cpp b/ndn-cpp/transport/tcp-transport.cpp
index e454e4a..553c5c7 100644
--- a/ndn-cpp/transport/tcp-transport.cpp
+++ b/ndn-cpp/transport/tcp-transport.cpp
@@ -30,17 +30,17 @@
   const unsigned int initialLength = 1000;
   // Automatically cast elementReader_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_initialize
-    (&elementReader_, &elementListener, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+    (&elementReader_, &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
   
   isConnected_ = true;
   elementListener_ = &elementListener;
 }
 
 void 
-TcpTransport::send(const unsigned char *data, unsigned int dataLength)
+TcpTransport::send(const uint8_t *data, unsigned int dataLength)
 {
   ndn_Error error;
-  if ((error = ndn_TcpTransport_send(&transport_, (unsigned char *)data, dataLength)))
+  if ((error = ndn_TcpTransport_send(&transport_, (uint8_t *)data, dataLength)))
     throw std::runtime_error(ndn_getErrorString(error));  
 }
 
@@ -54,7 +54,7 @@
   if (!receiveIsReady)
     return;
 
-  unsigned char buffer[8000];
+  uint8_t buffer[8000];
   unsigned int nBytes;
   if ((error = ndn_TcpTransport_receive(&transport_, buffer, sizeof(buffer), &nBytes)))
     throw std::runtime_error(ndn_getErrorString(error));  
diff --git a/ndn-cpp/transport/tcp-transport.hpp b/ndn-cpp/transport/tcp-transport.hpp
index 1f8a573..d999df8 100644
--- a/ndn-cpp/transport/tcp-transport.hpp
+++ b/ndn-cpp/transport/tcp-transport.hpp
@@ -72,7 +72,7 @@
    * @param data A pointer to the buffer of data to send.
    * @param dataLength The number of bytes in data.
    */
-  virtual void send(const unsigned char *data, unsigned int dataLength);
+  virtual void send(const uint8_t *data, unsigned int dataLength);
 
   /**
    * Process any data to receive.  For each element received, call elementListener.onReceivedElement.
diff --git a/ndn-cpp/transport/transport.cpp b/ndn-cpp/transport/transport.cpp
index ae532db..4b8aca1 100644
--- a/ndn-cpp/transport/transport.cpp
+++ b/ndn-cpp/transport/transport.cpp
@@ -22,7 +22,7 @@
 }
   
 void 
-Transport::send(const unsigned char *data, unsigned int dataLength)
+Transport::send(const uint8_t *data, unsigned int dataLength)
 {
   throw logic_error("unimplemented");
 }
diff --git a/ndn-cpp/transport/transport.hpp b/ndn-cpp/transport/transport.hpp
index 2f71096..ed3e240 100644
--- a/ndn-cpp/transport/transport.hpp
+++ b/ndn-cpp/transport/transport.hpp
@@ -37,10 +37,10 @@
    * @param dataLength The number of bytes in data.
    */
   virtual void 
-  send(const unsigned char *data, unsigned int dataLength);
+  send(const uint8_t *data, unsigned int dataLength);
   
   void 
-  send(const std::vector<unsigned char>& data)
+  send(const std::vector<uint8_t>& data)
   {
     send(&data[0], data.size());
   }
diff --git a/ndn-cpp/transport/udp-transport.cpp b/ndn-cpp/transport/udp-transport.cpp
index d5e48cb..0b2f397 100644
--- a/ndn-cpp/transport/udp-transport.cpp
+++ b/ndn-cpp/transport/udp-transport.cpp
@@ -30,17 +30,17 @@
   const unsigned int initialLength = 1000;
   // Automatically cast elementReader_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_initialize
-    (&elementReader_, &elementListener, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+    (&elementReader_, &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
   
   isConnected_ = true;
   elementListener_ = &elementListener;
 }
 
 void 
-UdpTransport::send(const unsigned char *data, unsigned int dataLength)
+UdpTransport::send(const uint8_t *data, unsigned int dataLength)
 {
   ndn_Error error;
-  if ((error = ndn_UdpTransport_send(&transport_, (unsigned char *)data, dataLength)))
+  if ((error = ndn_UdpTransport_send(&transport_, (uint8_t *)data, dataLength)))
     throw std::runtime_error(ndn_getErrorString(error));  
 }
 
@@ -54,7 +54,7 @@
   if (!receiveIsReady)
     return;
 
-  unsigned char buffer[8000];
+  uint8_t buffer[8000];
   unsigned int nBytes;
   if ((error = ndn_UdpTransport_receive(&transport_, buffer, sizeof(buffer), &nBytes)))
     throw std::runtime_error(ndn_getErrorString(error));  
diff --git a/ndn-cpp/transport/udp-transport.hpp b/ndn-cpp/transport/udp-transport.hpp
index 3ea1703..b2374df 100644
--- a/ndn-cpp/transport/udp-transport.hpp
+++ b/ndn-cpp/transport/udp-transport.hpp
@@ -74,7 +74,7 @@
    * @param dataLength The number of bytes in data.
    */
   virtual void 
-  send(const unsigned char *data, unsigned int dataLength);
+  send(const uint8_t *data, unsigned int dataLength);
 
   /**
    * Process any data to receive.  For each element received, call elementListener.onReceivedElement.
