Rename all public functions, types, and defines to begin with srtp_ prefix to comply with modern library coding convention.
diff --git a/crypto/cipher/aes.c b/crypto/cipher/aes.c
index a279682..6b0a2ad 100644
--- a/crypto/cipher/aes.c
+++ b/crypto/cipher/aes.c
@@ -1476,32 +1476,32 @@
   }
 }
 
-err_status_t
+srtp_err_status_t
 aes_expand_encryption_key(const uint8_t *key, 
 			  int key_len,
 			  aes_expanded_key_t *expanded_key) {
   if (key_len == 16) {
     aes_128_expand_encryption_key(key, expanded_key);
-    return err_status_ok;
+    return srtp_err_status_ok;
   }
   else if (key_len == 24) {
     /* AES-192 not yet supported */
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   }
   else if (key_len == 32) {
     aes_256_expand_encryption_key(key, expanded_key);
-    return err_status_ok;
+    return srtp_err_status_ok;
   }
   else
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 }
 
-err_status_t
+srtp_err_status_t
 aes_expand_decryption_key(const uint8_t *key, 
 			  int key_len,
 			  aes_expanded_key_t *expanded_key) {
   int i;
-  err_status_t status;
+  srtp_err_status_t status;
   int num_rounds = expanded_key->num_rounds;
 
   status = aes_expand_encryption_key(key, key_len, expanded_key);
@@ -1587,7 +1587,7 @@
 #endif     
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 #ifdef CPU_CISC
diff --git a/crypto/cipher/aes_cbc.c b/crypto/cipher/aes_cbc.c
index 248023b..0209aa4 100644
--- a/crypto/cipher/aes_cbc.c
+++ b/crypto/cipher/aes_cbc.c
@@ -57,7 +57,7 @@
 
 
 
-err_status_t
+srtp_err_status_t
 aes_cbc_alloc(cipher_t **c, int key_len, int tlen) {
   extern cipher_type_t aes_cbc;
   uint8_t *pointer;
@@ -67,13 +67,13 @@
 	      "allocating cipher with key length %d", key_len);
 
   if (key_len != 16 && key_len != 24 && key_len != 32)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   
   /* allocate memory a cipher of type aes_cbc */
   tmp = (sizeof(aes_cbc_ctx_t) + sizeof(cipher_t));
   pointer = (uint8_t*)crypto_alloc(tmp);
   if (pointer == NULL) 
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
 
   /* set pointers */
   *c = (cipher_t *)pointer;
@@ -84,10 +84,10 @@
   /* set key size        */
   (*c)->key_len = key_len;
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
-err_status_t
+srtp_err_status_t
 aes_cbc_dealloc(cipher_t *c) {
   extern cipher_type_t aes_cbc;
 
@@ -98,10 +98,10 @@
   /* free memory */
   crypto_free(c);
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
-err_status_t
+srtp_err_status_t
 aes_cbc_context_init(aes_cbc_ctx_t *c, const uint8_t *key, int key_len) {
 
   debug_print(mod_aes_cbc, 
@@ -114,13 +114,13 @@
   c->key_len = (key_len <= 32 ? key_len : 32);
   memcpy(c->key, key, c->key_len);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 aes_cbc_set_iv(aes_cbc_ctx_t *c, void *iv, int direction) {
-  err_status_t status;
+  srtp_err_status_t status;
   int i;
 /*   v128_t *input = iv; */
   uint8_t *input = (uint8_t*) iv;
@@ -146,13 +146,13 @@
       return status;
     break;
   default:
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 aes_cbc_encrypt(aes_cbc_ctx_t *c,
 		unsigned char *data, 
 		unsigned int *bytes_in_data) {
@@ -165,7 +165,7 @@
    * verify that we're 16-octet aligned
    */
   if (*bytes_in_data & 0xf) 
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /*
    * note that we assume that the initialization vector has already
@@ -199,10 +199,10 @@
     bytes_to_encr -= 16;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 aes_cbc_decrypt(aes_cbc_ctx_t *c,
 		unsigned char *data, 
 		unsigned int *bytes_in_data) {
@@ -217,7 +217,7 @@
    * verify that we're 16-octet aligned
    */
   if (*bytes_in_data & 0x0f)
-    return err_status_bad_param;    
+    return srtp_err_status_bad_param;    
 
   /* set 'previous' block to iv*/
   for (i=0; i < 16; i++) {
@@ -261,18 +261,18 @@
     bytes_to_encr -= 16;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 aes_cbc_nist_encrypt(aes_cbc_ctx_t *c,
 		     unsigned char *data, 
 		     unsigned int *bytes_in_data) {
   int i;
   unsigned char *pad_start; 
   int num_pad_bytes;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* 
    * determine the number of padding bytes that we need to add - 
@@ -297,17 +297,17 @@
   if (status) 
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 aes_cbc_nist_decrypt(aes_cbc_ctx_t *c,
 		     unsigned char *data, 
 		     unsigned int *bytes_in_data) {
   unsigned char *pad_end;
   int num_pad_bytes;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /*
    * cbc decrypt the padded data 
@@ -330,7 +330,7 @@
   /* decrement data size */
   *bytes_in_data -= num_pad_bytes;  
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -552,7 +552,7 @@
   (char *)                       aes_cbc_description,
   (cipher_test_case_t *)        &aes_cbc_test_case_3,
   (debug_module_t *)            &mod_aes_cbc,
-  (cipher_type_id_t)             AES_CBC
+  (srtp_cipher_type_id_t)        AES_CBC
 };
 
 
diff --git a/crypto/cipher/aes_gcm_ossl.c b/crypto/cipher/aes_gcm_ossl.c
index f8e0086..1684a9b 100644
--- a/crypto/cipher/aes_gcm_ossl.c
+++ b/crypto/cipher/aes_gcm_ossl.c
@@ -82,7 +82,7 @@
  * key length includes the 14 byte salt value that is used when
  * initializing the KDF.
  */
-err_status_t aes_gcm_openssl_alloc (cipher_t **c, int key_len, int tlen)
+srtp_err_status_t aes_gcm_openssl_alloc (cipher_t **c, int key_len, int tlen)
 {
     aes_gcm_ctx_t *gcm;
     int tmp;
@@ -94,21 +94,21 @@
     /*
      * Verify the key_len is valid for one of: AES-128/256
      */
-    if (key_len != AES_128_GCM_KEYSIZE_WSALT && 
-	key_len != AES_256_GCM_KEYSIZE_WSALT) {
-        return (err_status_bad_param);
+    if (key_len != SRTP_AES_128_GCM_KEYSIZE_WSALT && 
+	key_len != SRTP_AES_256_GCM_KEYSIZE_WSALT) {
+        return (srtp_err_status_bad_param);
     }
 
     if (tlen != GCM_AUTH_TAG_LEN &&
 	tlen != GCM_AUTH_TAG_LEN_8) {
-        return (err_status_bad_param);
+        return (srtp_err_status_bad_param);
     }
 
     /* allocate memory a cipher of type aes_gcm */
     tmp = sizeof(cipher_t) + sizeof(aes_gcm_ctx_t);
     allptr = crypto_alloc(tmp);
     if (allptr == NULL) {
-        return (err_status_alloc_fail);
+        return (srtp_err_status_alloc_fail);
     }
 
     /* set pointers */
@@ -118,13 +118,13 @@
 
     /* setup cipher attributes */
     switch (key_len) {
-    case AES_128_GCM_KEYSIZE_WSALT:
+    case SRTP_AES_128_GCM_KEYSIZE_WSALT:
         (*c)->type = &aes_gcm_128_openssl;
         (*c)->algorithm = AES_128_GCM;
         ((aes_gcm_ctx_t*)(*c)->state)->key_size = AES_128_KEYSIZE;
         ((aes_gcm_ctx_t*)(*c)->state)->tag_len = tlen;  
         break;
-    case AES_256_GCM_KEYSIZE_WSALT:
+    case SRTP_AES_256_GCM_KEYSIZE_WSALT:
         (*c)->type = &aes_gcm_256_openssl;
         (*c)->algorithm = AES_256_GCM;
         ((aes_gcm_ctx_t*)(*c)->state)->key_size = AES_256_KEYSIZE;
@@ -136,14 +136,14 @@
     (*c)->key_len = key_len;
     EVP_CIPHER_CTX_init(&gcm->ctx);
 
-    return (err_status_ok);
+    return (srtp_err_status_ok);
 }
 
 
 /*
  * This function deallocates a GCM session 
  */
-err_status_t aes_gcm_openssl_dealloc (cipher_t *c)
+srtp_err_status_t aes_gcm_openssl_dealloc (cipher_t *c)
 {
     aes_gcm_ctx_t *ctx;
 
@@ -158,7 +158,7 @@
     /* free memory */
     crypto_free(c);
 
-    return (err_status_ok);
+    return (srtp_err_status_ok);
 }
 
 /*
@@ -167,7 +167,7 @@
  *
  * the key is the secret key
  */
-err_status_t aes_gcm_openssl_context_init (aes_gcm_ctx_t *c, const uint8_t *key)
+srtp_err_status_t aes_gcm_openssl_context_init (aes_gcm_ctx_t *c, const uint8_t *key)
 {
     c->dir = direction_any;
 
@@ -185,7 +185,7 @@
 
     EVP_CIPHER_CTX_cleanup(&c->ctx);
 
-    return (err_status_ok);
+    return (srtp_err_status_ok);
 }
 
 
@@ -193,14 +193,14 @@
  * aes_gcm_openssl_set_iv(c, iv) sets the counter value to the exor of iv with
  * the offset
  */
-err_status_t aes_gcm_openssl_set_iv (aes_gcm_ctx_t *c, void *iv,
+srtp_err_status_t aes_gcm_openssl_set_iv (aes_gcm_ctx_t *c, void *iv,
 	                             int direction)
 {
     const EVP_CIPHER *evp;
     v128_t *nonce = iv;
 
     if (direction != direction_encrypt && direction != direction_decrypt) {
-        return (err_status_bad_param);
+        return (srtp_err_status_bad_param);
     }
     c->dir = direction;
 
@@ -214,27 +214,27 @@
         evp = EVP_aes_128_gcm();
         break;
     default:
-        return (err_status_bad_param);
+        return (srtp_err_status_bad_param);
         break;
     }
 
     if (!EVP_CipherInit_ex(&c->ctx, evp, NULL, (const unsigned char*)&c->key.v8,
                            NULL, (c->dir == direction_encrypt ? 1 : 0))) {
-        return (err_status_init_fail);
+        return (srtp_err_status_init_fail);
     }
 
     /* set IV len  and the IV value, the followiong 3 calls are required */
     if (!EVP_CIPHER_CTX_ctrl(&c->ctx, EVP_CTRL_GCM_SET_IVLEN, 12, 0)) {
-        return (err_status_init_fail);
+        return (srtp_err_status_init_fail);
     }
     if (!EVP_CIPHER_CTX_ctrl(&c->ctx, EVP_CTRL_GCM_SET_IV_FIXED, -1, iv)) {
-        return (err_status_init_fail);
+        return (srtp_err_status_init_fail);
     }
     if (!EVP_CIPHER_CTX_ctrl(&c->ctx, EVP_CTRL_GCM_IV_GEN, 0, iv)) {
-        return (err_status_init_fail);
+        return (srtp_err_status_init_fail);
     }
 
-    return (err_status_ok);
+    return (srtp_err_status_ok);
 }
 
 /*
@@ -245,7 +245,7 @@
  *	aad	Additional data to process for AEAD cipher suites
  *	aad_len	length of aad buffer
  */
-err_status_t aes_gcm_openssl_set_aad (aes_gcm_ctx_t *c, unsigned char *aad, 
+srtp_err_status_t aes_gcm_openssl_set_aad (aes_gcm_ctx_t *c, unsigned char *aad, 
 	                              unsigned int aad_len)
 {
     int rv;
@@ -258,9 +258,9 @@
 
     rv = EVP_Cipher(&c->ctx, NULL, aad, aad_len);
     if (rv != aad_len) {
-        return (err_status_algo_fail);
+        return (srtp_err_status_algo_fail);
     } else {
-        return (err_status_ok);
+        return (srtp_err_status_ok);
     }
 }
 
@@ -272,11 +272,11 @@
  *	buf	data to encrypt
  *	enc_len	length of encrypt buffer
  */
-err_status_t aes_gcm_openssl_encrypt (aes_gcm_ctx_t *c, unsigned char *buf, 
+srtp_err_status_t aes_gcm_openssl_encrypt (aes_gcm_ctx_t *c, unsigned char *buf, 
 	                              unsigned int *enc_len)
 {
     if (c->dir != direction_encrypt && c->dir != direction_decrypt) {
-        return (err_status_bad_param);
+        return (srtp_err_status_bad_param);
     }
 
     /*
@@ -284,7 +284,7 @@
      */
     EVP_Cipher(&c->ctx, buf, buf, *enc_len);
 
-    return (err_status_ok);
+    return (srtp_err_status_ok);
 }
 
 /*
@@ -298,7 +298,7 @@
  *	buf	data to encrypt
  *	len	length of encrypt buffer
  */
-err_status_t aes_gcm_openssl_get_tag (aes_gcm_ctx_t *c, unsigned char *buf, 
+srtp_err_status_t aes_gcm_openssl_get_tag (aes_gcm_ctx_t *c, unsigned char *buf, 
 	                              int *len)
 {
     /*
@@ -316,7 +316,7 @@
      */
     *len = c->tag_len;
 
-    return (err_status_ok);
+    return (srtp_err_status_ok);
 }
 
 
@@ -328,11 +328,11 @@
  *	buf	data to encrypt
  *	enc_len	length of encrypt buffer
  */
-err_status_t aes_gcm_openssl_decrypt (aes_gcm_ctx_t *c, unsigned char *buf, 
+srtp_err_status_t aes_gcm_openssl_decrypt (aes_gcm_ctx_t *c, unsigned char *buf, 
 	                              unsigned int *enc_len)
 {
     if (c->dir != direction_encrypt && c->dir != direction_decrypt) {
-        return (err_status_bad_param);
+        return (srtp_err_status_bad_param);
     }
 
     /*
@@ -346,7 +346,7 @@
      * Check the tag
      */
     if (EVP_Cipher(&c->ctx, NULL, NULL, 0)) {
-        return (err_status_auth_fail);
+        return (srtp_err_status_auth_fail);
     }
 
     /*
@@ -355,7 +355,7 @@
      */
     *enc_len -= c->tag_len;
 
-    return (err_status_ok);
+    return (srtp_err_status_ok);
 }
 
 
@@ -372,7 +372,7 @@
  * values we're derived from independent test code 
  * using OpenSSL.
  */
-uint8_t aes_gcm_test_case_0_key[AES_128_GCM_KEYSIZE_WSALT] = {
+uint8_t aes_gcm_test_case_0_key[SRTP_AES_128_GCM_KEYSIZE_WSALT] = {
     0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
     0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
     0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
@@ -416,7 +416,7 @@
 };
 
 cipher_test_case_t aes_gcm_test_case_0a = {
-    AES_128_GCM_KEYSIZE_WSALT,             /* octets in key            */
+    SRTP_AES_128_GCM_KEYSIZE_WSALT,        /* octets in key            */
     aes_gcm_test_case_0_key,               /* key                      */
     aes_gcm_test_case_0_iv,                /* packet index             */
     60,                                    /* octets in plaintext      */
@@ -430,7 +430,7 @@
 };
 
 cipher_test_case_t aes_gcm_test_case_0 = {
-    AES_128_GCM_KEYSIZE_WSALT,             /* octets in key            */
+    SRTP_AES_128_GCM_KEYSIZE_WSALT,        /* octets in key            */
     aes_gcm_test_case_0_key,               /* key                      */
     aes_gcm_test_case_0_iv,                /* packet index             */
     60,                                    /* octets in plaintext      */
@@ -443,7 +443,7 @@
     &aes_gcm_test_case_0a                  /* pointer to next testcase */
 };
 
-uint8_t aes_gcm_test_case_1_key[AES_256_GCM_KEYSIZE_WSALT] = {
+uint8_t aes_gcm_test_case_1_key[SRTP_AES_256_GCM_KEYSIZE_WSALT] = {
     0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
     0xa5, 0x59, 0x09, 0xc5, 0x54, 0x66, 0x93, 0x1c,
     0xaf, 0xf5, 0x26, 0x9a, 0x21, 0xd5, 0x14, 0xb2, 
@@ -490,7 +490,7 @@
 };
 
 cipher_test_case_t aes_gcm_test_case_1a = {
-    AES_256_GCM_KEYSIZE_WSALT,                 /* octets in key            */
+    SRTP_AES_256_GCM_KEYSIZE_WSALT,        /* octets in key            */
     aes_gcm_test_case_1_key,               /* key                      */
     aes_gcm_test_case_1_iv,                /* packet index             */
     60,                                    /* octets in plaintext      */
@@ -504,7 +504,7 @@
 };
 
 cipher_test_case_t aes_gcm_test_case_1 = {
-    AES_256_GCM_KEYSIZE_WSALT,                 /* octets in key            */
+    SRTP_AES_256_GCM_KEYSIZE_WSALT,        /* octets in key            */
     aes_gcm_test_case_1_key,               /* key                      */
     aes_gcm_test_case_1_iv,                /* packet index             */
     60,                                    /* octets in plaintext      */
@@ -532,7 +532,7 @@
     (char*)			aes_gcm_128_openssl_description,
     (cipher_test_case_t*)	&aes_gcm_test_case_0,
     (debug_module_t*)		&mod_aes_gcm,
-    (cipher_type_id_t)          AES_128_GCM
+    (srtp_cipher_type_id_t)     AES_128_GCM
 };
 
 /*
@@ -550,6 +550,6 @@
     (char*)			aes_gcm_256_openssl_description,
     (cipher_test_case_t*)	&aes_gcm_test_case_1,
     (debug_module_t*)		&mod_aes_gcm,
-    (cipher_type_id_t)          AES_256_GCM
+    (srtp_cipher_type_id_t)     AES_256_GCM
 };
 
diff --git a/crypto/cipher/aes_icm.c b/crypto/cipher/aes_icm.c
index 0a8cac2..b091159 100644
--- a/crypto/cipher/aes_icm.c
+++ b/crypto/cipher/aes_icm.c
@@ -92,7 +92,7 @@
  *
  */
 
-err_status_t
+srtp_err_status_t
 aes_icm_alloc_ismacryp(cipher_t **c, int key_len, int forIsmacryp) {
   extern cipher_type_t aes_icm;
   uint8_t *pointer;
@@ -111,13 +111,13 @@
    */
   if (!(forIsmacryp && key_len > 16 && key_len < 30) &&
       key_len != 30 && key_len != 38 && key_len != 46)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* allocate memory a cipher of type aes_icm */
   tmp = (sizeof(aes_icm_ctx_t) + sizeof(cipher_t));
   pointer = (uint8_t*)crypto_alloc(tmp);
   if (pointer == NULL) 
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
 
   /* set pointers */
   *c = (cipher_t *)pointer;
@@ -138,14 +138,14 @@
   /* set key size        */
   (*c)->key_len = key_len;
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
-err_status_t aes_icm_alloc(cipher_t **c, int key_len, int forIsmacryp) {
+srtp_err_status_t aes_icm_alloc(cipher_t **c, int key_len, int forIsmacryp) {
   return aes_icm_alloc_ismacryp(c, key_len, 0);
 }
 
-err_status_t
+srtp_err_status_t
 aes_icm_dealloc(cipher_t *c) {
   extern cipher_type_t aes_icm;
 
@@ -156,7 +156,7 @@
   /* free memory */
   crypto_free(c);
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
 
@@ -170,9 +170,9 @@
  * randomizes the starting point in the keystream
  */
 
-err_status_t
+srtp_err_status_t
 aes_icm_context_init(aes_icm_ctx_t *c, const uint8_t *key, int key_len) {
-  err_status_t status;
+  srtp_err_status_t status;
   int base_key_len, copy_len;
 
   if (key_len > 16 && key_len < 30) /* Ismacryp */
@@ -180,7 +180,7 @@
   else if (key_len == 30 || key_len == 38 || key_len == 46)
     base_key_len = key_len - 14;
   else
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /*
    * set counter and initial values to 'offset' value, being careful not to
@@ -213,7 +213,7 @@
   /* indicate that the keystream_buffer is empty */
   c->bytes_in_buffer = 0;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
@@ -222,7 +222,7 @@
  * is the ith octet
  */
 
-err_status_t
+srtp_err_status_t
 aes_icm_set_octet(aes_icm_ctx_t *c,
 		  uint64_t octet_num) {
 
@@ -271,7 +271,7 @@
     c->bytes_in_buffer = 0;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
@@ -279,7 +279,7 @@
  * the offset
  */
 
-err_status_t
+srtp_err_status_t
 aes_icm_set_iv(aes_icm_ctx_t *c, void *iv, int direction) {
   v128_t *nonce = (v128_t *) iv;
 
@@ -294,7 +294,7 @@
   /* indicate that the keystream_buffer is empty */
   c->bytes_in_buffer = 0;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -344,7 +344,7 @@
  *  - fill buffer then add in remaining (< 16) bytes of keystream 
  */
 
-err_status_t
+srtp_err_status_t
 aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c,
               unsigned char *buf, unsigned int *enc_len, 
               int forIsmacryp) {
@@ -354,7 +354,7 @@
 
   /* check that there's enough segment left but not for ismacryp*/
   if (!forIsmacryp && (bytes_to_encr + htons(c->counter.v16[7])) > 0xffff)
-    return err_status_terminus;
+    return srtp_err_status_terminus;
 
  debug_print(mod_aes_icm, "block index: %d", 
            htons(c->counter.v16[7]));
@@ -370,7 +370,7 @@
     c->bytes_in_buffer -= bytes_to_encr;
 
     /* return now to avoid the main loop */
-    return err_status_ok;
+    return srtp_err_status_ok;
 
   } else {
     
@@ -449,15 +449,15 @@
 
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 aes_icm_encrypt(aes_icm_ctx_t *c, unsigned char *buf, unsigned int *enc_len) {
   return aes_icm_encrypt_ismacryp(c, buf, enc_len, 0);
 }
 
-err_status_t
+srtp_err_status_t
 aes_icm_output(aes_icm_ctx_t *c, uint8_t *buffer, unsigned int num_octets_to_output) {
   unsigned int len = num_octets_to_output;
   
@@ -576,6 +576,6 @@
   (char *)                       aes_icm_description,
   (cipher_test_case_t *)        &aes_icm_test_case_1,
   (debug_module_t *)            &mod_aes_icm,
-  (cipher_type_id_t)             AES_ICM
+  (srtp_cipher_type_id_t)        AES_ICM
 };
 
diff --git a/crypto/cipher/aes_icm_ossl.c b/crypto/cipher/aes_icm_ossl.c
index f1f0491..1a0607d 100644
--- a/crypto/cipher/aes_icm_ossl.c
+++ b/crypto/cipher/aes_icm_ossl.c
@@ -110,7 +110,7 @@
  * value.  The tlen argument is for the AEAD tag length, which
  * isn't used in counter mode.
  */
-err_status_t aes_icm_openssl_alloc (cipher_t **c, int key_len, int tlen)
+srtp_err_status_t aes_icm_openssl_alloc (cipher_t **c, int key_len, int tlen)
 {
     aes_icm_ctx_t *icm;
     int tmp;
@@ -123,14 +123,14 @@
      */
     if (key_len != AES_128_KEYSIZE_WSALT && key_len != AES_192_KEYSIZE_WSALT &&
         key_len != AES_256_KEYSIZE_WSALT) {
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
     }
 
     /* allocate memory a cipher of type aes_icm */
     tmp = sizeof(cipher_t) + sizeof(aes_icm_ctx_t);
     allptr = (uint8_t*)crypto_alloc(tmp);
     if (allptr == NULL) {
-        return err_status_alloc_fail;
+        return srtp_err_status_alloc_fail;
     }
 
     /* set pointers */
@@ -161,19 +161,19 @@
     (*c)->key_len = key_len;
     EVP_CIPHER_CTX_init(&icm->ctx);
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 
 /*
  * This function deallocates an instance of this engine
  */
-err_status_t aes_icm_openssl_dealloc (cipher_t *c)
+srtp_err_status_t aes_icm_openssl_dealloc (cipher_t *c)
 {
     aes_icm_ctx_t *ctx;
 
     if (c == NULL) {
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
     }
 
     /*
@@ -191,7 +191,7 @@
     /* free memory */
     crypto_free(c);
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 /*
@@ -203,7 +203,7 @@
  * the salt is unpredictable (but not necessarily secret) data which
  * randomizes the starting point in the keystream
  */
-err_status_t aes_icm_openssl_context_init (aes_icm_ctx_t *c, const uint8_t *key, int len)
+srtp_err_status_t aes_icm_openssl_context_init (aes_icm_ctx_t *c, const uint8_t *key, int len)
 {
     /*
      * set counter and initial values to 'offset' value, being careful not to
@@ -211,7 +211,7 @@
      */
 
     if (c->key_size + SALT_SIZE != len)
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
 
     v128_set_to_zero(&c->counter);
     v128_set_to_zero(&c->offset);
@@ -242,7 +242,7 @@
 
     EVP_CIPHER_CTX_cleanup(&c->ctx);
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 
@@ -250,7 +250,7 @@
  * aes_icm_set_iv(c, iv) sets the counter value to the exor of iv with
  * the offset
  */
-err_status_t aes_icm_openssl_set_iv (aes_icm_ctx_t *c, void *iv, int dir)
+srtp_err_status_t aes_icm_openssl_set_iv (aes_icm_ctx_t *c, void *iv, int dir)
 {
     const EVP_CIPHER *evp;
     v128_t *nonce = (v128_t*)iv;
@@ -272,15 +272,15 @@
         evp = EVP_aes_128_ctr();
         break;
     default:
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
         break;
     }
 
     if (!EVP_EncryptInit_ex(&c->ctx, evp,
                             NULL, c->key.v8, c->counter.v8)) {
-        return err_status_fail;
+        return srtp_err_status_fail;
     } else {
-        return err_status_ok;
+        return srtp_err_status_ok;
     }
 }
 
@@ -292,23 +292,23 @@
  *	buf	data to encrypt
  *	enc_len	length of encrypt buffer
  */
-err_status_t aes_icm_openssl_encrypt (aes_icm_ctx_t *c, unsigned char *buf, unsigned int *enc_len)
+srtp_err_status_t aes_icm_openssl_encrypt (aes_icm_ctx_t *c, unsigned char *buf, unsigned int *enc_len)
 {
     int len = 0;
 
     debug_print(mod_aes_icm, "rs0: %s", v128_hex_string(&c->counter));
 
     if (!EVP_EncryptUpdate(&c->ctx, buf, &len, buf, *enc_len)) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
     *enc_len = len;
 
     if (!EVP_EncryptFinal_ex(&c->ctx, buf, &len)) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
     *enc_len += len;
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 uint16_t aes_icm_bytes_encrypted(aes_icm_ctx_t *c)
@@ -476,7 +476,7 @@
     (char*)                        aes_icm_openssl_description,
     (cipher_test_case_t*)          &aes_icm_test_case_0,
     (debug_module_t*)              &mod_aes_icm,
-    (cipher_type_id_t)             AES_ICM
+    (srtp_cipher_type_id_t)        AES_ICM
 };
 
 /*
@@ -495,7 +495,7 @@
     (char*)                        aes_icm_192_openssl_description,
     (cipher_test_case_t*)          &aes_icm_192_test_case_1,
     (debug_module_t*)              &mod_aes_icm,
-    (cipher_type_id_t)             AES_192_ICM
+    (srtp_cipher_type_id_t)        AES_192_ICM
 };
 
 /*
@@ -514,6 +514,6 @@
     (char*)                        aes_icm_256_openssl_description,
     (cipher_test_case_t*)          &aes_icm_256_test_case_2,
     (debug_module_t*)              &mod_aes_icm,
-    (cipher_type_id_t)             AES_256_ICM
+    (srtp_cipher_type_id_t)        AES_256_ICM
 };
 
diff --git a/crypto/cipher/cipher.c b/crypto/cipher/cipher.c
index 15b9088..f66d32b 100644
--- a/crypto/cipher/cipher.c
+++ b/crypto/cipher/cipher.c
@@ -58,7 +58,7 @@
   "cipher"           /* printable module name       */
 };
 
-err_status_t
+srtp_err_status_t
 cipher_output(cipher_t *c, uint8_t *buffer, int num_octets_to_output) {
   
   /* zeroize the buffer */
@@ -85,11 +85,11 @@
 #define NUM_RAND_TESTS       128
 #define MAX_KEY_LEN          64
 
-err_status_t
+srtp_err_status_t
 cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
   const cipher_test_case_t *test_case = test_data;
   cipher_t *c;
-  err_status_t status;
+  srtp_err_status_t status;
   uint8_t buffer[SELF_TEST_BUF_OCTETS];
   uint8_t buffer2[SELF_TEST_BUF_OCTETS];
   int tag_len;
@@ -104,7 +104,7 @@
    * return an error if we don't - we need to be paranoid here
    */
   if (test_case == NULL)
-    return err_status_cant_check;
+    return srtp_err_status_cant_check;
 
   /*
    * loop over all test cases, perform known-answer tests of both the
@@ -131,7 +131,7 @@
     /* copy plaintext into test buffer */
     if (test_case->ciphertext_length_octets > SELF_TEST_BUF_OCTETS) {
       cipher_dealloc(c);    
-      return err_status_bad_param;
+      return srtp_err_status_bad_param;
     }
     for (i=0; i < test_case->plaintext_length_octets; i++)
       buffer[i] = test_case->plaintext[i];
@@ -191,11 +191,11 @@
 
     /* compare the resulting ciphertext with that in the test case */
     if (len != test_case->ciphertext_length_octets)
-      return err_status_algo_fail;
-    status = err_status_ok;
+      return srtp_err_status_algo_fail;
+    status = srtp_err_status_ok;
     for (i=0; i < test_case->ciphertext_length_octets; i++)
       if (buffer[i] != test_case->ciphertext[i]) {
-	status = err_status_algo_fail;
+	status = srtp_err_status_algo_fail;
 	debug_print(mod_cipher, "test case %d failed", case_num);
 	debug_print(mod_cipher, "(failure at byte %d)", i);
 	break;
@@ -210,7 +210,7 @@
 			  2*test_case->plaintext_length_octets));
 
       cipher_dealloc(c);
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }
 
     /*
@@ -228,7 +228,7 @@
     /* copy ciphertext into test buffer */
     if (test_case->ciphertext_length_octets > SELF_TEST_BUF_OCTETS) {
       cipher_dealloc(c);    
-      return err_status_bad_param;
+      return srtp_err_status_bad_param;
     }
     for (i=0; i < test_case->ciphertext_length_octets; i++)
       buffer[i] = test_case->ciphertext[i];
@@ -273,11 +273,11 @@
 
     /* compare the resulting plaintext with that in the test case */
     if (len != test_case->plaintext_length_octets)
-      return err_status_algo_fail;
-    status = err_status_ok;
+      return srtp_err_status_algo_fail;
+    status = srtp_err_status_ok;
     for (i=0; i < test_case->plaintext_length_octets; i++)
       if (buffer[i] != test_case->plaintext[i]) {
-	status = err_status_algo_fail;
+	status = srtp_err_status_algo_fail;
 	debug_print(mod_cipher, "test case %d failed", case_num);
 	debug_print(mod_cipher, "(failure at byte %d)", i);
       }
@@ -291,7 +291,7 @@
 			  2*test_case->plaintext_length_octets));
 
       cipher_dealloc(c);
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }
 
     /* deallocate the cipher */
@@ -338,7 +338,7 @@
     
     /* choose a key at random */
     if (test_case->key_length_octets > MAX_KEY_LEN)
-      return err_status_cant_check;
+      return srtp_err_status_cant_check;
     status = rand_source_get_octet_string(key, test_case->key_length_octets);
     if (status) return status;
 
@@ -435,18 +435,18 @@
 
     /* compare the resulting plaintext with the original one */
     if (length != plaintext_len) {
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }
-    status = err_status_ok;
+    status = srtp_err_status_ok;
     for (i=0; i < plaintext_len; i++)
       if (buffer[i] != buffer2[i]) {
-	status = err_status_algo_fail;
+	status = srtp_err_status_algo_fail;
 	debug_print(mod_cipher, "random test case %d failed", case_num);
 	debug_print(mod_cipher, "(failure at byte %d)", i);
       }
     if (status) {
       cipher_dealloc(c);
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }
         
   }
@@ -455,7 +455,7 @@
   if (status)
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -464,7 +464,7 @@
  * list of test data.
  */
 
-err_status_t
+srtp_err_status_t
 cipher_type_self_test(const cipher_type_t *ct) {
   return cipher_type_test(ct, ct->test_data);
 }
diff --git a/crypto/cipher/null_cipher.c b/crypto/cipher/null_cipher.c
index f8e947b..6fcb365 100644
--- a/crypto/cipher/null_cipher.c
+++ b/crypto/cipher/null_cipher.c
@@ -56,7 +56,7 @@
 
 extern debug_module_t mod_cipher;
 
-err_status_t
+srtp_err_status_t
 null_cipher_alloc(cipher_t **c, int key_len, int tlen) {
   extern cipher_type_t null_cipher;
   uint8_t *pointer;
@@ -67,7 +67,7 @@
   /* allocate memory a cipher of type null_cipher */
   pointer = (uint8_t*)crypto_alloc(sizeof(null_cipher_ctx_t) + sizeof(cipher_t));
   if (pointer == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
 
   /* set pointers */
   *c = (cipher_t *)pointer;
@@ -78,11 +78,11 @@
   /* set key size */
   (*c)->key_len = key_len;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
   
 }
 
-err_status_t
+srtp_err_status_t
 null_cipher_dealloc(cipher_t *c) {
   extern cipher_type_t null_cipher;
 
@@ -93,27 +93,27 @@
   /* free memory of type null_cipher */
   crypto_free(c);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
   
 }
 
-err_status_t
+srtp_err_status_t
 null_cipher_init(null_cipher_ctx_t *ctx, const uint8_t *key, int key_len) {
 
   debug_print(mod_cipher, "initializing null cipher", NULL);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 null_cipher_set_iv(null_cipher_ctx_t *c, void *iv) { 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 null_cipher_encrypt(null_cipher_ctx_t *c,
 		    unsigned char *buf, unsigned int *bytes_to_encr) {
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 char 
@@ -151,6 +151,6 @@
   (char *)                      null_cipher_description,
   (cipher_test_case_t *)       &null_cipher_test_0,
   (debug_module_t *)            NULL,
-  (cipher_type_id_t)            NULL_CIPHER
+  (srtp_cipher_type_id_t)       NULL_CIPHER
 };
 
diff --git a/crypto/hash/auth.c b/crypto/hash/auth.c
index c55edbb..c72024c 100644
--- a/crypto/hash/auth.c
+++ b/crypto/hash/auth.c
@@ -81,11 +81,11 @@
 /* should be big enough for most occasions */
 #define SELF_TEST_TAG_BUF_OCTETS 32
 
-err_status_t
+srtp_err_status_t
 auth_type_test(const auth_type_t *at, const auth_test_case_t *test_data) {
   const auth_test_case_t *test_case = test_data;
   auth_t *a;
-  err_status_t status;
+  srtp_err_status_t status;
   uint8_t tag[SELF_TEST_TAG_BUF_OCTETS];
   int i, case_num = 0;
 
@@ -97,14 +97,14 @@
    * return an error if we don't - we need to be paranoid here
    */
   if (test_case == NULL)
-    return err_status_cant_check;
+    return srtp_err_status_cant_check;
 
   /* loop over all test cases */  
   while (test_case != NULL) {
 
     /* check test case parameters */
     if (test_case->tag_length_octets > SELF_TEST_TAG_BUF_OCTETS)
-      return err_status_bad_param;
+      return srtp_err_status_bad_param;
     
     /* allocate auth */
     status = auth_type_alloc(at, &a, test_case->key_length_octets,
@@ -141,16 +141,16 @@
 				   test_case->tag_length_octets));
 
     /* check the result */
-    status = err_status_ok;
+    status = srtp_err_status_ok;
     for (i=0; i < test_case->tag_length_octets; i++)
       if (tag[i] != test_case->tag[i]) {
-	status = err_status_algo_fail;
+	status = srtp_err_status_algo_fail;
 	debug_print(mod_auth, "test case %d failed", case_num);
 	debug_print(mod_auth, "  (mismatch at octet %d)", i);
       }
     if (status) {
       auth_dealloc(a);
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }
     
     /* deallocate the auth function */
@@ -166,7 +166,7 @@
     ++case_num;
   }
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -175,7 +175,7 @@
  * list of test data.
  */
 
-err_status_t
+srtp_err_status_t
 auth_type_self_test(const auth_type_t *at) {
   return auth_type_test(at, at->test_data);
 }
diff --git a/crypto/hash/hmac.c b/crypto/hash/hmac.c
index 49fb004..b90b924 100644
--- a/crypto/hash/hmac.c
+++ b/crypto/hash/hmac.c
@@ -57,7 +57,7 @@
 };
 
 
-err_status_t
+srtp_err_status_t
 hmac_alloc(auth_t **a, int key_len, int out_len) {
   extern auth_type_t hmac;
   uint8_t *pointer;
@@ -70,16 +70,16 @@
    * than 20 bytes yet
    */
   if (key_len > 20)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* check output length - should be less than 20 bytes */
   if (out_len > 20)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* allocate memory for auth and hmac_ctx_t structures */
   pointer = (uint8_t*)crypto_alloc(sizeof(hmac_ctx_t) + sizeof(auth_t));
   if (pointer == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
 
   /* set pointers */
   *a = (auth_t *)pointer;
@@ -89,10 +89,10 @@
   (*a)->key_len = key_len;
   (*a)->prefix_len = 0;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_dealloc(auth_t *a) {
   extern auth_type_t hmac;
   
@@ -103,10 +103,10 @@
   /* free memory */
   crypto_free(a);
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_init(hmac_ctx_t *state, const uint8_t *key, int key_len) {
   int i;
   uint8_t ipad[64]; 
@@ -116,7 +116,7 @@
    * than 20 bytes yet
    */
   if (key_len > 20)              
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   
   /*
    * set values of ipad and opad by exoring the key into the
@@ -141,18 +141,18 @@
   srtp_sha1_update(&state->init_ctx, ipad, 64);
   memcpy(&state->ctx, &state->init_ctx, sizeof(srtp_sha1_ctx_t)); 
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_start(hmac_ctx_t *state) {
     
   memcpy(&state->ctx, &state->init_ctx, sizeof(srtp_sha1_ctx_t));
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_update(hmac_ctx_t *state, const uint8_t *message, int msg_octets) {
 
   debug_print(mod_hmac, "input: %s", 
@@ -161,10 +161,10 @@
   /* hash message into sha1 context */
   srtp_sha1_update(&state->ctx, message, msg_octets);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_compute(hmac_ctx_t *state, const void *message,
 	     int msg_octets, int tag_len, uint8_t *result) {
   uint32_t hash_value[5];
@@ -173,7 +173,7 @@
 
   /* check tag length, return error if we can't provide the value expected */
   if (tag_len > 20)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   
   /* hash message, copy output into H */
   hmac_update(state, (const uint8_t*)message, msg_octets);
@@ -205,7 +205,7 @@
   debug_print(mod_hmac, "output: %s", 
 	      octet_string_hex_string((uint8_t *)hash_value, tag_len));
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -260,6 +260,6 @@
   (char *)               hmac_description,
   (auth_test_case_t *)  &hmac_test_case_0,
   (debug_module_t *)    &mod_hmac,
-  (auth_type_id_t)       HMAC_SHA1
+  (srtp_auth_type_id_t)  HMAC_SHA1
 };
 
diff --git a/crypto/hash/hmac_ossl.c b/crypto/hash/hmac_ossl.c
index 0cccb03..d99efc6 100644
--- a/crypto/hash/hmac_ossl.c
+++ b/crypto/hash/hmac_ossl.c
@@ -60,7 +60,7 @@
 };
 
 
-err_status_t
+srtp_err_status_t
 hmac_alloc (auth_t **a, int key_len, int out_len)
 {
     extern auth_type_t hmac;
@@ -75,18 +75,18 @@
      * than 20 bytes yet
      */
     if (key_len > HMAC_KEYLEN_MAX) {
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
     }
 
     /* check output length - should be less than 20 bytes */
     if (out_len > HMAC_KEYLEN_MAX) {
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
     }
 
     /* allocate memory for auth and hmac_ctx_t structures */
     pointer = (uint8_t*)crypto_alloc(sizeof(hmac_ctx_t) + sizeof(auth_t));
     if (pointer == NULL) {
-        return err_status_alloc_fail;
+        return srtp_err_status_alloc_fail;
     }
 
     /* set pointers */
@@ -99,10 +99,10 @@
     new_hmac_ctx = (hmac_ctx_t*)((*a)->state);
     memset(new_hmac_ctx, 0, sizeof(hmac_ctx_t));
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_dealloc (auth_t *a)
 {
     extern auth_type_t hmac;
@@ -123,10 +123,10 @@
     /* free memory */
     crypto_free(a);
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_init (hmac_ctx_t *state, const uint8_t *key, int key_len)
 {
     int i;
@@ -137,7 +137,7 @@
      * than 20 bytes yet
      */
     if (key_len > HMAC_KEYLEN_MAX) {
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
     }
 
     /*
@@ -165,21 +165,21 @@
     return (hmac_start(state));
 }
 
-err_status_t
+srtp_err_status_t
 hmac_start (hmac_ctx_t *state)
 {
     if (state->ctx_initialized) {
         EVP_MD_CTX_cleanup(&state->ctx);
     }
     if (!EVP_MD_CTX_copy(&state->ctx, &state->init_ctx)) {
-        return err_status_auth_fail;
+        return srtp_err_status_auth_fail;
     } else {
         state->ctx_initialized = 1;
-        return err_status_ok;
+        return srtp_err_status_ok;
     }
 }
 
-err_status_t
+srtp_err_status_t
 hmac_update (hmac_ctx_t *state, const uint8_t *message, int msg_octets)
 {
     debug_print(mod_hmac, "input: %s",
@@ -188,10 +188,10 @@
     /* hash message into sha1 context */
     srtp_sha1_update(&state->ctx, message, msg_octets);
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 hmac_compute (hmac_ctx_t *state, const void *message,
               int msg_octets, int tag_len, uint8_t *result)
 {
@@ -201,7 +201,7 @@
 
     /* check tag length, return error if we can't provide the value expected */
     if (tag_len > HMAC_KEYLEN_MAX) {
-        return err_status_bad_param;
+        return srtp_err_status_bad_param;
     }
 
     /* hash message, copy output into H */
@@ -235,7 +235,7 @@
     debug_print(mod_hmac, "output: %s",
                 octet_string_hex_string((uint8_t*)hash_value, tag_len));
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 
@@ -290,6 +290,6 @@
     (char*)		hmac_description,
     (auth_test_case_t*)	&hmac_test_case_0,
     (debug_module_t*)	&mod_hmac,
-    (auth_type_id_t)    HMAC_SHA1
+    (srtp_auth_type_id_t) HMAC_SHA1
 };
 
diff --git a/crypto/hash/null_auth.c b/crypto/hash/null_auth.c
index 2cb92ee..26032d7 100644
--- a/crypto/hash/null_auth.c
+++ b/crypto/hash/null_auth.c
@@ -55,7 +55,7 @@
 
 extern debug_module_t mod_auth;
 
-err_status_t
+srtp_err_status_t
 null_auth_alloc(auth_t **a, int key_len, int out_len) {
   extern auth_type_t null_auth;
   uint8_t *pointer;
@@ -66,7 +66,7 @@
   /* allocate memory for auth and null_auth_ctx_t structures */
   pointer = (uint8_t*)crypto_alloc(sizeof(null_auth_ctx_t) + sizeof(auth_t));
   if (pointer == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
 
   /* set pointers */
   *a = (auth_t *)pointer;
@@ -76,10 +76,10 @@
   (*a)->prefix_len = out_len;
   (*a)->key_len = key_len;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 null_auth_dealloc(auth_t *a) {
   extern auth_type_t null_auth;
   
@@ -90,34 +90,34 @@
   /* free memory */
   crypto_free(a);
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 null_auth_init(null_auth_ctx_t *state, const uint8_t *key, int key_len) {
 
   /* accept any length of key, and do nothing */
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 null_auth_compute(null_auth_ctx_t *state, uint8_t *message,
 		   int msg_octets, int tag_len, uint8_t *result) {
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 null_auth_update(null_auth_ctx_t *state, uint8_t *message,
 		   int msg_octets) {
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 null_auth_start(null_auth_ctx_t *state) {
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
@@ -153,6 +153,6 @@
   (char *)               null_auth_description,
   (auth_test_case_t *)   &null_auth_test_case_0,
   (debug_module_t *)     NULL,
-  (auth_type_id_t)       NULL_AUTH
+  (srtp_auth_type_id_t)  NULL_AUTH
 };
 
diff --git a/crypto/include/aes.h b/crypto/include/aes.h
index d88ce40..5fc7767 100644
--- a/crypto/include/aes.h
+++ b/crypto/include/aes.h
@@ -57,15 +57,15 @@
   int num_rounds;
 } aes_expanded_key_t;
 
-err_status_t
-aes_expand_encryption_key(const uint8_t *key,
-			  int key_len,
-			  aes_expanded_key_t *expanded_key);
+srtp_err_status_t aes_expand_encryption_key(
+	const uint8_t *key,
+	int key_len,
+	aes_expanded_key_t *expanded_key);
 
-err_status_t
-aes_expand_decryption_key(const uint8_t *key,
-			  int key_len,
-			  aes_expanded_key_t *expanded_key);
+srtp_err_status_t aes_expand_decryption_key(
+	const uint8_t *key,
+	int key_len,
+	aes_expanded_key_t *expanded_key);
 
 void
 aes_encrypt(v128_t *plaintext, const aes_expanded_key_t *exp_key);
diff --git a/crypto/include/aes_cbc.h b/crypto/include/aes_cbc.h
index f92591d..81a0409 100644
--- a/crypto/include/aes_cbc.h
+++ b/crypto/include/aes_cbc.h
@@ -22,31 +22,17 @@
   aes_expanded_key_t expanded_key; /* the cipher key                   */
 } aes_cbc_ctx_t;
 
-err_status_t
-aes_cbc_set_key(aes_cbc_ctx_t *c,
-		const unsigned char *key); 
+srtp_err_status_t aes_cbc_set_key(aes_cbc_ctx_t *c, const unsigned char *key); 
 
-err_status_t
-aes_cbc_encrypt(aes_cbc_ctx_t *c, 
-		unsigned char *buf, 
-		unsigned int  *bytes_in_data);
+srtp_err_status_t aes_cbc_encrypt(aes_cbc_ctx_t *c, unsigned char *buf, unsigned int  *bytes_in_data);
 
-err_status_t
-aes_cbc_context_init(aes_cbc_ctx_t *c, const uint8_t *key, 
-		     int key_len);
+srtp_err_status_t aes_cbc_context_init(aes_cbc_ctx_t *c, const uint8_t *key, int key_len);
 
-err_status_t
-aes_cbc_set_iv(aes_cbc_ctx_t *c, void *iv, int direction);
+srtp_err_status_t aes_cbc_set_iv(aes_cbc_ctx_t *c, void *iv, int direction);
 
-err_status_t
-aes_cbc_nist_encrypt(aes_cbc_ctx_t *c,
-		     unsigned char *data, 
-		     unsigned int *bytes_in_data);
+srtp_err_status_t aes_cbc_nist_encrypt(aes_cbc_ctx_t *c, unsigned char *data, unsigned int *bytes_in_data);
 
-err_status_t
-aes_cbc_nist_decrypt(aes_cbc_ctx_t *c,
-		     unsigned char *data, 
-		     unsigned int *bytes_in_data);
+srtp_err_status_t aes_cbc_nist_decrypt(aes_cbc_ctx_t *c, unsigned char *data, unsigned int *bytes_in_data);
 
 #endif /* AES_CBC_H */
 
diff --git a/crypto/include/aes_icm.h b/crypto/include/aes_icm.h
index 8b9f4ce..1356486 100644
--- a/crypto/include/aes_icm.h
+++ b/crypto/include/aes_icm.h
@@ -23,38 +23,26 @@
 } aes_icm_ctx_t;
 
 
-err_status_t
-aes_icm_context_init(aes_icm_ctx_t *c,
-		     const unsigned char *key,
-		     int key_len); 
+srtp_err_status_t aes_icm_context_init(aes_icm_ctx_t *c,
+	const unsigned char *key,
+	int key_len); 
 
-err_status_t
-aes_icm_set_iv(aes_icm_ctx_t *c, void *iv, int direction);
+srtp_err_status_t aes_icm_set_iv(aes_icm_ctx_t *c, void *iv, int direction);
 
-err_status_t
-aes_icm_encrypt(aes_icm_ctx_t *c,
-		unsigned char *buf, unsigned int *bytes_to_encr);
+srtp_err_status_t aes_icm_encrypt(aes_icm_ctx_t *c, unsigned char *buf, unsigned int *bytes_to_encr);
 
-err_status_t
-aes_icm_output(aes_icm_ctx_t *c,
-	       unsigned char *buf, unsigned int bytes_to_output);
+srtp_err_status_t aes_icm_output(aes_icm_ctx_t *c, unsigned char *buf, unsigned int bytes_to_output);
 
-err_status_t 
-aes_icm_dealloc(cipher_t *c);
+srtp_err_status_t aes_icm_dealloc(cipher_t *c);
  
-err_status_t 
-aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c, 
-			 unsigned char *buf, 
-			 unsigned int *enc_len, 
-			 int forIsmacryp);
+srtp_err_status_t aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c, 
+	unsigned char *buf, 
+	unsigned int *enc_len, 
+	int forIsmacryp);
  
-err_status_t 
-aes_icm_alloc_ismacryp(cipher_t **c, 
-		       int key_len, 
-		       int forIsmacryp);
+srtp_err_status_t aes_icm_alloc_ismacryp(cipher_t **c, int key_len, int forIsmacryp);
 
-uint16_t
-aes_icm_bytes_encrypted(aes_icm_ctx_t *c);
+uint16_t aes_icm_bytes_encrypted(aes_icm_ctx_t *c);
 
 #endif /* AES_ICM_H */
 
diff --git a/crypto/include/aes_icm_ossl.h b/crypto/include/aes_icm_ossl.h
index 90ec954..3d3864e 100644
--- a/crypto/include/aes_icm_ossl.h
+++ b/crypto/include/aes_icm_ossl.h
@@ -66,9 +66,9 @@
     EVP_CIPHER_CTX ctx;
 } aes_icm_ctx_t;
 
-err_status_t aes_icm_openssl_set_iv(aes_icm_ctx_t *c, void *iv, int dir);
-err_status_t aes_icm_openssl_context_init(aes_icm_ctx_t *c, const uint8_t *key, int len);
-err_status_t aes_icm_output(aes_icm_ctx_t *c, uint8_t *buffer, int num_octets_to_output);
+srtp_err_status_t aes_icm_openssl_set_iv(aes_icm_ctx_t *c, void *iv, int dir);
+srtp_err_status_t aes_icm_openssl_context_init(aes_icm_ctx_t *c, const uint8_t *key, int len);
+srtp_err_status_t aes_icm_output(aes_icm_ctx_t *c, uint8_t *buffer, int num_octets_to_output);
 uint16_t aes_icm_bytes_encrypted(aes_icm_ctx_t *c);
 
 
diff --git a/crypto/include/auth.h b/crypto/include/auth.h
index 4505c25..84f9ad2 100644
--- a/crypto/include/auth.h
+++ b/crypto/include/auth.h
@@ -54,25 +54,24 @@
 typedef struct auth_type_t *auth_type_pointer;
 typedef struct auth_t      *auth_pointer_t;
 
-typedef err_status_t (*auth_alloc_func)
+typedef srtp_err_status_t (*auth_alloc_func)
      (auth_pointer_t *ap, int key_len, int out_len);
 
-typedef err_status_t (*auth_init_func)
+typedef srtp_err_status_t (*auth_init_func)
      (void *state, const uint8_t *key, int key_len);
 
-typedef err_status_t (*auth_dealloc_func)(auth_pointer_t ap);
+typedef srtp_err_status_t (*auth_dealloc_func)(auth_pointer_t ap);
 
-typedef err_status_t (*auth_compute_func)
+typedef srtp_err_status_t (*auth_compute_func)
      (void *state, uint8_t *buffer, int octets_to_auth, 
       int tag_len, uint8_t *tag);
 
-typedef err_status_t (*auth_update_func)
+typedef srtp_err_status_t (*auth_update_func)
      (void *state, uint8_t *buffer, int octets_to_auth);
 
-typedef err_status_t (*auth_start_func)(void *state);
+typedef srtp_err_status_t (*auth_start_func)(void *state);
      
 /* some syntactic sugar on these function types */
-
 #define auth_type_alloc(at, a, klen, outlen)                        \
                  ((at)->alloc((a), (klen), (outlen)))
 
@@ -90,7 +89,6 @@
 #define auth_dealloc(c) (((c)->type)->dealloc(c))
 
 /* functions to get information about a particular auth_t */
-
 int
 auth_get_key_length(const struct auth_t *a);
 
@@ -107,7 +105,6 @@
  * correcness of the implementation.  (see the auth_type_self_test()
  * function below)
  */
-
 typedef struct auth_test_case_t {
   int key_length_octets;                    /* octets in key            */
   uint8_t *key;                             /* key                      */
@@ -119,7 +116,6 @@
 } auth_test_case_t;
 
 /* auth_type_t */
-
 typedef struct auth_type_t {
   auth_alloc_func      alloc;
   auth_dealloc_func    dealloc;
@@ -130,7 +126,7 @@
   char                *description;
   auth_test_case_t    *test_data;
   debug_module_t      *debug;
-  auth_type_id_t       id;
+  srtp_auth_type_id_t  id;
 } auth_type_t;
 
 typedef struct auth_t {
@@ -146,17 +142,13 @@
  * provided in an array of values of key/message/tag that is known to
  * be good
  */
-
-err_status_t
-auth_type_self_test(const auth_type_t *at);
+srtp_err_status_t auth_type_self_test(const auth_type_t *at);
 
 /* 
  * auth_type_test() tests an auth_type against external test cases
  * provided in an array of values of key/message/tag that is known to
  * be good
  */
-
-err_status_t
-auth_type_test(const auth_type_t *at, const auth_test_case_t *test_data);
+srtp_err_status_t auth_type_test(const auth_type_t *at, const auth_test_case_t *test_data);
 
 #endif /* AUTH_H */
diff --git a/crypto/include/cipher.h b/crypto/include/cipher.h
index 4be6b28..839f156 100644
--- a/crypto/include/cipher.h
+++ b/crypto/include/cipher.h
@@ -60,7 +60,6 @@
  * operation, i.e. encryption or decryption.  For some ciphers, this
  * distinction does not matter, but for others, it is essential.
  */
-
 typedef enum { 
   direction_encrypt, /**< encryption (convert plaintext to ciphertext) */
   direction_decrypt, /**< decryption (convert ciphertext to plaintext) */
@@ -71,62 +70,54 @@
  * the cipher_pointer and cipher_type_pointer definitions are needed
  * as cipher_t and cipher_type_t are not yet defined
  */
-
 typedef struct cipher_type_t *cipher_type_pointer_t;
 typedef struct cipher_t      *cipher_pointer_t;
 
 /*
  *  a cipher_alloc_func_t allocates (but does not initialize) a cipher_t 
  */
-
-typedef err_status_t (*cipher_alloc_func_t)
+typedef srtp_err_status_t (*cipher_alloc_func_t)
      (cipher_pointer_t *cp, int key_len, int tag_len);
 
 /* 
  * a cipher_init_func_t [re-]initializes a cipher_t with a given key
  */
-
-typedef err_status_t (*cipher_init_func_t)
+typedef srtp_err_status_t (*cipher_init_func_t)
 (void *state, const uint8_t *key, int key_len);
 
 /* a cipher_dealloc_func_t de-allocates a cipher_t */
-
-typedef err_status_t (*cipher_dealloc_func_t)(cipher_pointer_t cp);
+typedef srtp_err_status_t (*cipher_dealloc_func_t)(cipher_pointer_t cp);
 
 /* a cipher_set_segment_func_t sets the segment index of a cipher_t */
-
-typedef err_status_t (*cipher_set_segment_func_t)
+typedef srtp_err_status_t (*cipher_set_segment_func_t)
      (void *state, xtd_seq_num_t idx);
 
 /* 
  * a cipher_set_aad_func_t processes the AAD data for AEAD ciphers 
  */
-typedef err_status_t (*cipher_set_aad_func_t)
+typedef srtp_err_status_t (*cipher_set_aad_func_t)
      (void *state, uint8_t *aad, unsigned int aad_len);
 
 
 /* a cipher_encrypt_func_t encrypts data in-place */
-
-typedef err_status_t (*cipher_encrypt_func_t)
+typedef srtp_err_status_t (*cipher_encrypt_func_t)
      (void *state, uint8_t *buffer, unsigned int *octets_to_encrypt);
 
 /* a cipher_decrypt_func_t decrypts data in-place */
-
-typedef err_status_t (*cipher_decrypt_func_t)
+typedef srtp_err_status_t (*cipher_decrypt_func_t)
      (void *state, uint8_t *buffer, unsigned int *octets_to_decrypt);
 
 /* 
  * a cipher_set_iv_func_t function sets the current initialization vector
  */
-
-typedef err_status_t (*cipher_set_iv_func_t)
+typedef srtp_err_status_t (*cipher_set_iv_func_t)
      (cipher_pointer_t cp, void *iv, cipher_direction_t direction);
 
 /*
  * a cipher_get_tag_funct_t function is used to get the authentication
  * tag that was calculated by an AEAD cipher.
  */
-typedef err_status_t (*cipher_get_tag_func_t)
+typedef srtp_err_status_t (*cipher_get_tag_func_t)
      (void *state, void *tag, int *len);
 
 
@@ -137,7 +128,6 @@
  * in an on-the-fly self test of the correcness of the implementation.
  * (see the cipher_type_self_test() function below)
  */
-
 typedef struct cipher_test_case_t {
   int key_length_octets;                      /* octets in key            */
   uint8_t *key;                               /* key                      */
@@ -153,7 +143,6 @@
 } cipher_test_case_t;
 
 /* cipher_type_t defines the 'metadata' for a particular cipher type */
-
 typedef struct cipher_type_t {
   cipher_alloc_func_t         alloc;
   cipher_dealloc_func_t       dealloc;
@@ -166,14 +155,13 @@
   char                       *description;
   cipher_test_case_t         *test_data;
   debug_module_t             *debug;
-  cipher_type_id_t            id;
+  srtp_cipher_type_id_t       id;
 } cipher_type_t;
 
 /*
  * cipher_t defines an instantiation of a particular cipher, with fixed
  * key length, key and salt values
  */
-
 typedef struct cipher_t {
   cipher_type_t *type;
   void          *state;
@@ -182,7 +170,6 @@
 } cipher_t;
 
 /* some syntactic sugar on these function types */
-
 #define cipher_type_alloc(ct, c, klen, tlen) ((ct)->alloc((c), (klen), (tlen)))
 
 #define cipher_dealloc(c) (((c)->type)->dealloc(c))
@@ -200,20 +187,17 @@
 
 #define cipher_set_iv(c, n, dir)                           \
   ((c) ? (((c)->type)->set_iv(((cipher_pointer_t)(c)->state), (n), (dir))) :   \
-                                err_status_no_such_op)  
+                                srtp_err_status_no_such_op)  
 #define cipher_set_aad(c, a, l)                       \
   (((c) && (((c)->type)->set_aad)) ?                  \
   (((c)->type)->set_aad(((c)->state), (a), (l))) :    \
-                                err_status_no_such_op)  
+                                srtp_err_status_no_such_op)  
 
-err_status_t
-cipher_output(cipher_t *c, uint8_t *buffer, int num_octets_to_output);
+srtp_err_status_t cipher_output(cipher_t *c, uint8_t *buffer, int num_octets_to_output);
 
 
 /* some bookkeeping functions */
-
-int
-cipher_get_key_length(const cipher_t *c);
+int cipher_get_key_length(const cipher_t *c);
 
 
 /* 
@@ -221,9 +205,7 @@
  * an array of values of key/xtd_seq_num_t/plaintext/ciphertext 
  * that is known to be good
  */
-
-err_status_t
-cipher_type_self_test(const cipher_type_t *ct);
+srtp_err_status_t cipher_type_self_test(const cipher_type_t *ct);
 
 
 /* 
@@ -231,9 +213,7 @@
  * an array of values of key/xtd_seq_num_t/plaintext/ciphertext 
  * that is known to be good
  */
-
-err_status_t
-cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data);
+srtp_err_status_t cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data);
 
 
 /*
@@ -246,8 +226,6 @@
  *
  * if an error is encountered, then the value 0 is returned
  */
-
-uint64_t
-cipher_bits_per_second(cipher_t *c, int octets_in_buffer, int num_trials);
+uint64_t cipher_bits_per_second(cipher_t *c, int octets_in_buffer, int num_trials);
 
 #endif /* CIPHER_H */
diff --git a/crypto/include/crypto_kernel.h b/crypto/include/crypto_kernel.h
index cbc68a8..b4b9886 100644
--- a/crypto/include/crypto_kernel.h
+++ b/crypto/include/crypto_kernel.h
@@ -62,7 +62,6 @@
  *    insecure - not yet initialized
  *    secure   - initialized and passed self-tests
  */
-
 typedef enum {
   crypto_kernel_state_insecure,
   crypto_kernel_state_secure
@@ -71,9 +70,8 @@
 /* 
  * linked list of cipher types 
  */
-
 typedef struct kernel_cipher_type {
-  cipher_type_id_t  id;
+  srtp_cipher_type_id_t  id;
   cipher_type_t    *cipher_type;
   struct kernel_cipher_type *next;
 } kernel_cipher_type_t;
@@ -81,9 +79,8 @@
 /* 
  * linked list of auth types 
  */
-
 typedef struct kernel_auth_type {
-  auth_type_id_t  id;
+  srtp_auth_type_id_t  id;
   auth_type_t    *auth_type;
   struct kernel_auth_type *next;
 } kernel_auth_type_t;
@@ -91,7 +88,6 @@
 /*
  * linked list of debug modules 
  */
-
 typedef struct kernel_debug_module {
   debug_module_t *mod;
   struct kernel_debug_module *next;
@@ -104,7 +100,6 @@
  * note that there is *exactly one* instance of this data type,
  * a global variable defined in crypto_kernel.c
  */
-
 typedef struct {
   crypto_kernel_state_t state;              /* current state of kernel     */
   kernel_cipher_type_t *cipher_type_list;   /* list of all cipher types    */
@@ -129,9 +124,7 @@
  * If any value other than err_status_ok is returned, the
  * crypto_kernel MUST NOT be used.  
  */
-
-err_status_t
-crypto_kernel_init(void);
+srtp_err_status_t crypto_kernel_init(void);
 
 
 /*
@@ -144,9 +137,7 @@
  *    <other>           shutdown failure 
  *
  */
-
-err_status_t
-crypto_kernel_shutdown(void);
+srtp_err_status_t crypto_kernel_shutdown(void);
 
 /*
  * The function crypto_kernel_stats() checks the the crypto_kernel,
@@ -157,29 +148,22 @@
  *    <other>           a test failed 
  *
  */
-
-err_status_t
-crypto_kernel_status(void);
+srtp_err_status_t crypto_kernel_status(void);
 
 
 /*
  * crypto_kernel_list_debug_modules() outputs a list of debugging modules
  *
  */
-
-err_status_t
-crypto_kernel_list_debug_modules(void);
+srtp_err_status_t crypto_kernel_list_debug_modules(void);
 
 /*
  * crypto_kernel_load_cipher_type()
  *
  */
+srtp_err_status_t crypto_kernel_load_cipher_type(cipher_type_t *ct, srtp_cipher_type_id_t id);
 
-err_status_t
-crypto_kernel_load_cipher_type(cipher_type_t *ct, cipher_type_id_t id);
-
-err_status_t
-crypto_kernel_load_auth_type(auth_type_t *ct, auth_type_id_t id);
+srtp_err_status_t crypto_kernel_load_auth_type(auth_type_t *ct, srtp_auth_type_id_t id);
 
 /*
  * crypto_kernel_replace_cipher_type(ct, id)
@@ -188,8 +172,7 @@
  * with a new one passed in externally.  The new cipher must pass all the
  * existing cipher_type's self tests as well as its own.
  */
-err_status_t
-crypto_kernel_replace_cipher_type(cipher_type_t *ct, cipher_type_id_t id);
+srtp_err_status_t crypto_kernel_replace_cipher_type(cipher_type_t *ct, srtp_cipher_type_id_t id);
 
 
 /*
@@ -199,12 +182,10 @@
  * with a new one passed in externally.  The new auth type must pass all the
  * existing auth_type's self tests as well as its own.
  */
-err_status_t
-crypto_kernel_replace_auth_type(auth_type_t *ct, auth_type_id_t id);
+srtp_err_status_t crypto_kernel_replace_auth_type(auth_type_t *ct, srtp_auth_type_id_t id);
 
 
-err_status_t
-crypto_kernel_load_debug_module(debug_module_t *new_dm);
+srtp_err_status_t crypto_kernel_load_debug_module(debug_module_t *new_dm);
 
 /*
  * crypto_kernel_alloc_cipher(id, cp, key_len); 
@@ -216,12 +197,7 @@
  *    err_status_alloc_fail   an allocation failure occured
  *    err_status_fail         couldn't find cipher with identifier 'id'
  */
-
-err_status_t
-crypto_kernel_alloc_cipher(cipher_type_id_t id, 
-			   cipher_pointer_t *cp, 
-			   int key_len,
-			   int tag_len);
+srtp_err_status_t crypto_kernel_alloc_cipher(srtp_cipher_type_id_t id, cipher_pointer_t *cp, int key_len, int tag_len);
 
 /*
  * crypto_kernel_alloc_auth(id, ap, key_len, tag_len); 
@@ -234,12 +210,7 @@
  *    err_status_alloc_fail   an allocation failure occured
  *    err_status_fail         couldn't find auth with identifier 'id'
  */
-
-err_status_t
-crypto_kernel_alloc_auth(auth_type_id_t id, 
-			 auth_pointer_t *ap, 
-			 int key_len,
-			 int tag_len);
+srtp_err_status_t crypto_kernel_alloc_auth(srtp_auth_type_id_t id, auth_pointer_t *ap, int key_len, int tag_len);
 
 
 /*
@@ -250,8 +221,6 @@
  *
  * returns err_status_ok on success, err_status_fail otherwise
  */
-
-err_status_t
-crypto_kernel_set_debug_module(char *mod_name, int v);
+srtp_err_status_t crypto_kernel_set_debug_module(char *mod_name, int v);
 
 #endif /* CRYPTO_KERNEL */
diff --git a/crypto/include/cryptoalg.h b/crypto/include/cryptoalg.h
index d9f0441..bba9844 100644
--- a/crypto/include/cryptoalg.h
+++ b/crypto/include/cryptoalg.h
@@ -80,7 +80,7 @@
  *
  */
                     
-typedef err_status_t (*cryptoalg_func_t) 
+typedef srtp_err_status_t (*cryptoalg_func_t) 
      (void *key,            
       const void *clear,          
       unsigned clear_len,   
@@ -88,8 +88,7 @@
       void *protect,         
       unsigned *protected_len);
 
-typedef 
-err_status_t (*cryptoalg_inv_t)
+typedef srtp_err_status_t (*cryptoalg_inv_t)
      (void *key,            /* location of secret key                  */
       const void *clear,     /* data to be authenticated only           */
       unsigned clear_len,   /* length of data to be authenticated only */
diff --git a/crypto/include/err.h b/crypto/include/err.h
index b56416f..7858d47 100644
--- a/crypto/include/err.h
+++ b/crypto/include/err.h
@@ -53,7 +53,7 @@
 /**
  * @defgroup Error Error Codes
  * 
- * Error status codes are represented by the enumeration err_status_t.
+ * Error status codes are represented by the enumeration srtp_err_status_t.
  * 
  * @{
  */
@@ -83,8 +83,7 @@
  * all syslog messages.  It is conventionally argv[0].
  */
 
-err_status_t
-err_reporting_init(const char *ident);
+srtp_err_status_t err_reporting_init(const char *ident);
 
 #ifdef SRTP_KERNEL_LINUX
 extern err_reporting_level_t err_level;
diff --git a/crypto/include/hmac.h b/crypto/include/hmac.h
index 9fc664e..73c38b6 100644
--- a/crypto/include/hmac.h
+++ b/crypto/include/hmac.h
@@ -59,24 +59,17 @@
 #endif
 } hmac_ctx_t;
 
-err_status_t
-hmac_alloc(auth_t **a, int key_len, int out_len);
+srtp_err_status_t hmac_alloc(auth_t **a, int key_len, int out_len);
 
-err_status_t
-hmac_dealloc(auth_t *a);
+srtp_err_status_t hmac_dealloc(auth_t *a);
 
-err_status_t
-hmac_init(hmac_ctx_t *state, const uint8_t *key, int key_len);
+srtp_err_status_t hmac_init(hmac_ctx_t *state, const uint8_t *key, int key_len);
 
-err_status_t
-hmac_start(hmac_ctx_t *state);
+srtp_err_status_t hmac_start(hmac_ctx_t *state);
 
-err_status_t
-hmac_update(hmac_ctx_t *state, const uint8_t *message, int msg_octets);
+srtp_err_status_t hmac_update(hmac_ctx_t *state, const uint8_t *message, int msg_octets);
 
-err_status_t
-hmac_compute(hmac_ctx_t *state, const void *message,
-	     int msg_octets, int tag_len, uint8_t *result);
+srtp_err_status_t hmac_compute(hmac_ctx_t *state, const void *message, int msg_octets, int tag_len, uint8_t *result);
 
 
 #endif /* HMAC_H */
diff --git a/crypto/include/key.h b/crypto/include/key.h
index e7e0744..f17e086 100644
--- a/crypto/include/key.h
+++ b/crypto/include/key.h
@@ -56,17 +56,13 @@
    key_event_hard_limit
 } key_event_t;
 
-err_status_t
-key_limit_set(key_limit_t key, const xtd_seq_num_t s);
+srtp_err_status_t key_limit_set(key_limit_t key, const xtd_seq_num_t s);
 
-err_status_t
-key_limit_clone(key_limit_t original, key_limit_t *new_key);
+srtp_err_status_t key_limit_clone(key_limit_t original, key_limit_t *new_key);
 
-err_status_t
-key_limit_check(const key_limit_t key);
+srtp_err_status_t key_limit_check(const key_limit_t key);
 
-key_event_t
-key_limit_update(key_limit_t key);
+key_event_t key_limit_update(key_limit_t key);
 
 typedef enum { 
    key_state_normal,
diff --git a/crypto/include/null_auth.h b/crypto/include/null_auth.h
index 44f9a4a..84ea1e3 100644
--- a/crypto/include/null_auth.h
+++ b/crypto/include/null_auth.h
@@ -51,18 +51,13 @@
 	char foo;
 } null_auth_ctx_t;
 
-err_status_t
-null_auth_alloc(auth_t **a, int key_len, int out_len);
+srtp_err_status_t null_auth_alloc(auth_t **a, int key_len, int out_len);
 
-err_status_t
-null_auth_dealloc(auth_t *a);
+srtp_err_status_t null_auth_dealloc(auth_t *a);
 
-err_status_t
-null_auth_init(null_auth_ctx_t *state, const uint8_t *key, int key_len);
+srtp_err_status_t null_auth_init(null_auth_ctx_t *state, const uint8_t *key, int key_len);
 
-err_status_t
-null_auth_compute (null_auth_ctx_t *state, uint8_t *message,
-		   int msg_octets, int tag_len, uint8_t *result);
+srtp_err_status_t null_auth_compute (null_auth_ctx_t *state, uint8_t *message, int msg_octets, int tag_len, uint8_t *result);
 
 
 #endif /* NULL_AUTH_H */
diff --git a/crypto/include/null_cipher.h b/crypto/include/null_cipher.h
index 39da59a..d7d6dbb 100644
--- a/crypto/include/null_cipher.h
+++ b/crypto/include/null_cipher.h
@@ -60,21 +60,12 @@
  * none of these functions do anything (though future versions may keep
  * track of bytes encrypted, number of instances, and/or other info).
  */
+srtp_err_status_t null_cipher_init(null_cipher_ctx_t *c, const uint8_t *key, int key_len);
 
-err_status_t
-null_cipher_init(null_cipher_ctx_t *c, const uint8_t *key, int key_len);
+srtp_err_status_t null_cipher_set_segment(null_cipher_ctx_t *c, unsigned long segment_index);
 
-err_status_t
-null_cipher_set_segment(null_cipher_ctx_t *c,
-			unsigned long segment_index);
+srtp_err_status_t null_cipher_encrypt(null_cipher_ctx_t *c, unsigned char *buf, unsigned int *bytes_to_encr);
 
-err_status_t
-null_cipher_encrypt(null_cipher_ctx_t *c,
-		    unsigned char *buf, unsigned int *bytes_to_encr);
-
-
-err_status_t
-null_cipher_encrypt_aligned(null_cipher_ctx_t *c,
-			    unsigned char *buf, int bytes_to_encr);
+srtp_err_status_t null_cipher_encrypt_aligned(null_cipher_ctx_t *c, unsigned char *buf, int bytes_to_encr);
 
 #endif /* NULL_CIPHER_H */
diff --git a/crypto/include/prng.h b/crypto/include/prng.h
index c493383..1bcd471 100644
--- a/crypto/include/prng.h
+++ b/crypto/include/prng.h
@@ -32,11 +32,9 @@
   rand_source_func_t rand; /* random source for re-initialization     */
 } x917_prng_t;
 
-err_status_t
-x917_prng_init(rand_source_func_t random_source);
+srtp_err_status_t x917_prng_init(rand_source_func_t random_source);
 
-err_status_t
-x917_prng_get_octet_string(uint8_t *dest, uint32_t len);
+srtp_err_status_t x917_prng_get_octet_string(uint8_t *dest, uint32_t len);
 
 
 /*
@@ -49,11 +47,9 @@
   rand_source_func_t rand; /* random source for re-initialization     */
 } ctr_prng_t;
 
-err_status_t
-ctr_prng_init(rand_source_func_t random_source);
+srtp_err_status_t ctr_prng_init(rand_source_func_t random_source);
 
-err_status_t
-ctr_prng_get_octet_string(void *dest, uint32_t len);
+srtp_err_status_t ctr_prng_get_octet_string(void *dest, uint32_t len);
 
 
 #endif
diff --git a/crypto/include/rand_source.h b/crypto/include/rand_source.h
index b4c2110..3e45311 100644
--- a/crypto/include/rand_source.h
+++ b/crypto/include/rand_source.h
@@ -49,8 +49,7 @@
 #include "err.h"
 #include "datatypes.h"
 
-err_status_t
-rand_source_init(void);
+srtp_err_status_t rand_source_init(void);
 
 /*
  * rand_source_get_octet_string() writes a random octet string.
@@ -70,12 +69,9 @@
  *                        be made about the contents of the destination
  *                        buffer.
  */
+srtp_err_status_t rand_source_get_octet_string(void *dest, uint32_t length);
 
-err_status_t
-rand_source_get_octet_string(void *dest, uint32_t length);
-
-err_status_t
-rand_source_deinit(void);
+srtp_err_status_t rand_source_deinit(void);
 
 /* 
  * function prototype for a random source function
@@ -84,8 +80,6 @@
  * dest and returns err_status_ok.  Any other return value indicates
  * failure.
  */
-
-typedef err_status_t (*rand_source_func_t)
-     (void *dest, uint32_t num_octets);
+typedef srtp_err_status_t (*rand_source_func_t) (void *dest, uint32_t num_octets);
 
 #endif /* RAND_SOURCE */
diff --git a/crypto/include/rdb.h b/crypto/include/rdb.h
index 2ccb144..654b1c4 100644
--- a/crypto/include/rdb.h
+++ b/crypto/include/rdb.h
@@ -13,7 +13,7 @@
 
 #include "integers.h"         /* for uint32_t     */
 #include "datatypes.h"        /* for v128_t       */
-#include "err.h"              /* for err_status_t */
+#include "err.h"              /* for srtp_err_status_t */
 
 /*
  * if the ith least significant bit is one, then the packet index
@@ -32,11 +32,9 @@
  *
  * initalizes rdb
  *
- * returns err_status_ok on success, err_status_t_fail otherwise
+ * returns srtp_err_status_ok on success, srtp_err_status_t_fail otherwise
  */
-
-err_status_t
-rdb_init(rdb_t *rdb);
+srtp_err_status_t rdb_init(rdb_t *rdb);
 
 
 /*
@@ -44,24 +42,20 @@
  *
  * checks to see if index appears in rdb
  *
- * returns err_status_fail if the index already appears in rdb,
- * returns err_status_ok otherwise
+ * returns srtp_err_status_fail if the index already appears in rdb,
+ * returns srtp_err_status_ok otherwise
  */
-
-err_status_t
-rdb_check(const rdb_t *rdb, uint32_t rdb_index);  
+srtp_err_status_t rdb_check(const rdb_t *rdb, uint32_t rdb_index);  
 
 /*
  * rdb_add_index
  *
  * adds index to rdb_t (and does *not* check if index appears in db)
  *
- * returns err_status_ok on success, err_status_fail otherwise
+ * returns srtp_err_status_ok on success, srtp_err_status_fail otherwise
  *
  */
-
-err_status_t
-rdb_add_index(rdb_t *rdb, uint32_t rdb_index);
+srtp_err_status_t rdb_add_index(rdb_t *rdb, uint32_t rdb_index);
 
 /*
  * the functions rdb_increment() and rdb_get_value() are for use by 
@@ -76,12 +70,11 @@
  *
  * return values:
  * 
- *    err_status_ok            no problem
- *    err_status_key_expired   sequence number too high
+ *    srtp_err_status_ok            no problem
+ *    srtp_err_status_key_expired   sequence number too high
  *
  */
-err_status_t
-rdb_increment(rdb_t *rdb);
+srtp_err_status_t rdb_increment(rdb_t *rdb);
 
 /*
  * rdb_get_value(db) returns the current sequence number of db
diff --git a/crypto/include/rdbx.h b/crypto/include/rdbx.h
index 146fb42..e9e99d5 100644
--- a/crypto/include/rdbx.h
+++ b/crypto/include/rdbx.h
@@ -56,9 +56,7 @@
  * initializes the rdbx pointed to by its argument with the window size ws,
  * setting the rollover counter and sequence number to zero
  */
-
-err_status_t
-rdbx_init(rdbx_t *rdbx, unsigned long ws);
+srtp_err_status_t rdbx_init(rdbx_t *rdbx, unsigned long ws);
 
 
 /*
@@ -66,9 +64,7 @@
  *
  * frees memory associated with the rdbx
  */
-
-err_status_t
-rdbx_dealloc(rdbx_t *rdbx);
+srtp_err_status_t rdbx_dealloc(rdbx_t *rdbx);
 
 
 /*
@@ -92,9 +88,7 @@
  * which is at rdbx->window_start + delta is in the rdb
  *
  */
-
-err_status_t
-rdbx_check(const rdbx_t *rdbx, int difference);
+srtp_err_status_t rdbx_check(const rdbx_t *rdbx, int difference);
 
 /*
  * replay_add_index(rdbx, delta)
@@ -106,21 +100,17 @@
  * indicated that the index does not appear in the rdbx, and a mutex
  * should protect the rdbx between these calls if necessary.
  */
-
-err_status_t
-rdbx_add_index(rdbx_t *rdbx, int delta);
+srtp_err_status_t rdbx_add_index(rdbx_t *rdbx, int delta);
 
 
 /*
  * rdbx_set_roc(rdbx, roc) initalizes the rdbx_t at the location rdbx
  * to have the rollover counter value roc.  If that value is less than
  * the current rollover counter value, then the function returns
- * err_status_replay_old; otherwise, err_status_ok is returned.
+ * srtp_err_status_replay_old; otherwise, srtp_err_status_ok is returned.
  * 
  */
-
-err_status_t
-rdbx_set_roc(rdbx_t *rdbx, uint32_t roc);
+srtp_err_status_t rdbx_set_roc(rdbx_t *rdbx, uint32_t roc);
 
 /*
  * rdbx_get_roc(rdbx) returns the value of the rollover counter for
diff --git a/crypto/include/stat.h b/crypto/include/stat.h
index e28b131..1f02b54 100644
--- a/crypto/include/stat.h
+++ b/crypto/include/stat.h
@@ -48,22 +48,17 @@
 #define STAT_H
 
 #include "datatypes.h"       /* for uint8_t                       */
-#include "err.h"             /* for err_status_t                  */
+#include "err.h"             /* for srtp_err_status_t             */
 #include "rand_source.h"     /* for rand_source_func_t definition */
 
-err_status_t
-stat_test_monobit(uint8_t *data);
+srtp_err_status_t stat_test_monobit(uint8_t *data);
 
-err_status_t
-stat_test_poker(uint8_t *data);
+srtp_err_status_t stat_test_poker(uint8_t *data);
 
-err_status_t
-stat_test_runs(uint8_t *data);
+srtp_err_status_t stat_test_runs(uint8_t *data);
 
-err_status_t
-stat_test_rand_source(rand_source_func_t rs);
+srtp_err_status_t stat_test_rand_source(rand_source_func_t rs);
 
-err_status_t
-stat_test_rand_source_with_repetition(rand_source_func_t source, unsigned num_trials);
+srtp_err_status_t stat_test_rand_source_with_repetition(rand_source_func_t source, unsigned num_trials);
 
 #endif /* STAT_H */
diff --git a/crypto/kernel/crypto_kernel.c b/crypto/kernel/crypto_kernel.c
index 9f066f6..fad8acc 100644
--- a/crypto/kernel/crypto_kernel.c
+++ b/crypto/kernel/crypto_kernel.c
@@ -100,9 +100,9 @@
 
 #define MAX_RNG_TRIALS 25
 
-err_status_t
+srtp_err_status_t
 crypto_kernel_init() {
-  err_status_t status;  
+  srtp_err_status_t status;  
 
   /* check the security state */
   if (crypto_kernel.state == crypto_kernel_state_secure) {
@@ -191,12 +191,12 @@
   /* change state to secure */
   crypto_kernel.state = crypto_kernel_state_secure;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 crypto_kernel_status() {
-  err_status_t status;
+  srtp_err_status_t status;
   kernel_cipher_type_t  *ctype = crypto_kernel.cipher_type_list;
   kernel_auth_type_t    *atype = crypto_kernel.auth_type_list;
   kernel_debug_module_t *dm    = crypto_kernel.debug_module_list;
@@ -248,10 +248,10 @@
     dm = dm->next;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 crypto_kernel_list_debug_modules() {
   kernel_debug_module_t *dm = crypto_kernel.debug_module_list;
 
@@ -266,12 +266,12 @@
     dm = dm->next;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 crypto_kernel_shutdown() {
-  err_status_t status;
+  srtp_err_status_t status;
 
   /*
    * free dynamic memory used in crypto_kernel at present
@@ -314,21 +314,21 @@
   /* return to insecure state */
   crypto_kernel.state = crypto_kernel_state_insecure;
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-static inline err_status_t
-crypto_kernel_do_load_cipher_type(cipher_type_t *new_ct, cipher_type_id_t id,
+static inline srtp_err_status_t
+crypto_kernel_do_load_cipher_type(cipher_type_t *new_ct, srtp_cipher_type_id_t id,
 				  int replace) {
   kernel_cipher_type_t *ctype, *new_ctype;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* defensive coding */
   if (new_ct == NULL)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   if (new_ct->id != id)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* check cipher type by running self-test */
   status = cipher_type_self_test(new_ct);
@@ -341,7 +341,7 @@
   while (ctype != NULL) {
     if (id == ctype->id) {
       if (!replace)
-	return err_status_bad_param;
+	return srtp_err_status_bad_param;
       status = cipher_type_test(new_ct, ctype->cipher_type->test_data);
       if (status)
 	return status;
@@ -349,7 +349,7 @@
       break;
     }
     else if (new_ct == ctype->cipher_type)
-      return err_status_bad_param;    
+      return srtp_err_status_bad_param;    
     ctype = ctype->next;
   }
 
@@ -358,7 +358,7 @@
   /* allocate memory */
     new_ctype = (kernel_cipher_type_t *) crypto_alloc(sizeof(kernel_cipher_type_t));
     if (new_ctype == NULL)
-      return err_status_alloc_fail;
+      return srtp_err_status_alloc_fail;
     new_ctype->next = crypto_kernel.cipher_type_list;
 
     /* set head of list to new cipher type */
@@ -374,31 +374,31 @@
     crypto_kernel_load_debug_module(new_ct->debug);
   /* we could check for errors here */
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
-crypto_kernel_load_cipher_type(cipher_type_t *new_ct, cipher_type_id_t id) {
+srtp_err_status_t
+crypto_kernel_load_cipher_type(cipher_type_t *new_ct, srtp_cipher_type_id_t id) {
   return crypto_kernel_do_load_cipher_type(new_ct, id, 0);
 }
 
-err_status_t
-crypto_kernel_replace_cipher_type(cipher_type_t *new_ct, cipher_type_id_t id) {
+srtp_err_status_t
+crypto_kernel_replace_cipher_type(cipher_type_t *new_ct, srtp_cipher_type_id_t id) {
   return crypto_kernel_do_load_cipher_type(new_ct, id, 1);
 }
 
-err_status_t
-crypto_kernel_do_load_auth_type(auth_type_t *new_at, auth_type_id_t id,
+srtp_err_status_t
+crypto_kernel_do_load_auth_type(auth_type_t *new_at, srtp_auth_type_id_t id,
 				int replace) {
   kernel_auth_type_t *atype, *new_atype;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* defensive coding */
   if (new_at == NULL)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   if (new_at->id != id)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* check auth type by running self-test */
   status = auth_type_self_test(new_at);
@@ -411,7 +411,7 @@
   while (atype != NULL) {
     if (id == atype->id) {
       if (!replace)
-	return err_status_bad_param;
+	return srtp_err_status_bad_param;
       status = auth_type_test(new_at, atype->auth_type->test_data);
       if (status)
 	return status;
@@ -419,7 +419,7 @@
       break;
     }
     else if (new_at == atype->auth_type)
-      return err_status_bad_param;    
+      return srtp_err_status_bad_param;    
     atype = atype->next;
   }
 
@@ -428,7 +428,7 @@
     /* allocate memory */
     new_atype = (kernel_auth_type_t *)crypto_alloc(sizeof(kernel_auth_type_t));
     if (new_atype == NULL)
-      return err_status_alloc_fail;
+      return srtp_err_status_alloc_fail;
 
     new_atype->next = crypto_kernel.auth_type_list;
     /* set head of list to new auth type */
@@ -444,23 +444,23 @@
     crypto_kernel_load_debug_module(new_at->debug);
   /* we could check for errors here */
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 
 }
 
-err_status_t
-crypto_kernel_load_auth_type(auth_type_t *new_at, auth_type_id_t id) {
+srtp_err_status_t
+crypto_kernel_load_auth_type(auth_type_t *new_at, srtp_auth_type_id_t id) {
   return crypto_kernel_do_load_auth_type(new_at, id, 0);
 }
 
-err_status_t
-crypto_kernel_replace_auth_type(auth_type_t *new_at, auth_type_id_t id) {
+srtp_err_status_t
+crypto_kernel_replace_auth_type(auth_type_t *new_at, srtp_auth_type_id_t id) {
   return crypto_kernel_do_load_auth_type(new_at, id, 1);
 }
 
 
 cipher_type_t *
-crypto_kernel_get_cipher_type(cipher_type_id_t id) {
+crypto_kernel_get_cipher_type(srtp_cipher_type_id_t id) {
   kernel_cipher_type_t *ctype;
   
   /* walk down list, looking for id  */
@@ -476,8 +476,8 @@
 }
 
 
-err_status_t
-crypto_kernel_alloc_cipher(cipher_type_id_t id, 
+srtp_err_status_t
+crypto_kernel_alloc_cipher(srtp_cipher_type_id_t id, 
 			      cipher_pointer_t *cp, 
 			      int key_len,
 			      int tag_len) {
@@ -488,11 +488,11 @@
    * any ciphers - this is a bit extra-paranoid
    */
   if (crypto_kernel.state != crypto_kernel_state_secure)
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
 
   ct = crypto_kernel_get_cipher_type(id);
   if (!ct)
-    return err_status_fail;
+    return srtp_err_status_fail;
   
   return ((ct)->alloc(cp, key_len, tag_len));
 }
@@ -500,7 +500,7 @@
 
 
 auth_type_t *
-crypto_kernel_get_auth_type(auth_type_id_t id) {
+crypto_kernel_get_auth_type(srtp_auth_type_id_t id) {
   kernel_auth_type_t *atype;
   
   /* walk down list, looking for id  */
@@ -515,8 +515,8 @@
   return NULL;
 }
 
-err_status_t
-crypto_kernel_alloc_auth(auth_type_id_t id, 
+srtp_err_status_t
+crypto_kernel_alloc_auth(srtp_auth_type_id_t id, 
 			 auth_pointer_t *ap, 
 			 int key_len,
 			 int tag_len) {
@@ -527,28 +527,28 @@
    * any auth functions - this is a bit extra-paranoid
    */
   if (crypto_kernel.state != crypto_kernel_state_secure)
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
 
   at = crypto_kernel_get_auth_type(id);
   if (!at)
-    return err_status_fail;
+    return srtp_err_status_fail;
   
   return ((at)->alloc(ap, key_len, tag_len));
 }
 
-err_status_t
+srtp_err_status_t
 crypto_kernel_load_debug_module(debug_module_t *new_dm) {
   kernel_debug_module_t *kdm, *new;
 
   /* defensive coding */
   if (new_dm == NULL)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* walk down list, checking if this type is in the list already  */
   kdm = crypto_kernel.debug_module_list;
   while (kdm != NULL) {
     if (strncmp(new_dm->name, kdm->mod->name, 64) == 0)
-      return err_status_bad_param;    
+      return srtp_err_status_bad_param;    
     kdm = kdm->next;
   }
 
@@ -556,7 +556,7 @@
   /* allocate memory */
   new = (kernel_debug_module_t *)crypto_alloc(sizeof(kernel_debug_module_t));
   if (new == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
     
   /* set fields */
   new->mod = new_dm;
@@ -565,10 +565,10 @@
   /* set head of list to new cipher type */
   crypto_kernel.debug_module_list = new;    
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 crypto_kernel_set_debug_module(char *name, int on) {
   kernel_debug_module_t *kdm;
   
@@ -577,10 +577,10 @@
   while (kdm != NULL) {
     if (strncmp(name, kdm->mod->name, 64) == 0) {
       kdm->mod->on = on;
-      return err_status_ok;
+      return srtp_err_status_ok;
     }
     kdm = kdm->next;
   }
 
-  return err_status_fail;
+  return srtp_err_status_fail;
 }
diff --git a/crypto/kernel/err.c b/crypto/kernel/err.c
index be5d272..4a6142a 100644
--- a/crypto/kernel/err.c
+++ b/crypto/kernel/err.c
@@ -54,10 +54,10 @@
 err_reporting_level_t err_level = err_level_none;
 
 #ifdef SRTP_KERNEL_LINUX
-err_status_t
+srtp_err_status_t
 err_reporting_init(const char *ident) {
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 #else /* SRTP_KERNEL_LINUX */	
@@ -66,7 +66,7 @@
 
 static FILE *err_file = NULL;
 
-err_status_t
+srtp_err_status_t
 err_reporting_init(const char *ident) {
   
   /*
@@ -80,10 +80,10 @@
   /* open file for error reporting */
   err_file = fopen(ERR_REPORTING_FILE, "w");
   if (err_file == NULL)
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
 #endif
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 void
diff --git a/crypto/kernel/key.c b/crypto/kernel/key.c
index 3521e2f..9f82027 100644
--- a/crypto/kernel/key.c
+++ b/crypto/kernel/key.c
@@ -50,33 +50,33 @@
 
 #define soft_limit 0x10000
 
-err_status_t
+srtp_err_status_t
 key_limit_set(key_limit_t key, const xtd_seq_num_t s) {
 #ifdef NO_64BIT_MATH
   if (high32(s) == 0 && low32(s) < soft_limit)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 #else
   if (s < soft_limit)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 #endif
   key->num_left = s;
   key->state = key_state_normal;
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 key_limit_clone(key_limit_t original, key_limit_t *new_key) {
   if (original == NULL)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   *new_key = original;
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 key_limit_check(const key_limit_t key) {
   if (key->state == key_state_expired)
-    return err_status_key_expired;
-  return err_status_ok;
+    return srtp_err_status_key_expired;
+  return srtp_err_status_ok;
 }
 
 key_event_t
diff --git a/crypto/math/stat.c b/crypto/math/stat.c
index 84cdf2f..4b92e81 100644
--- a/crypto/math/stat.c
+++ b/crypto/math/stat.c
@@ -25,7 +25,7 @@
 
 #define STAT_TEST_DATA_LEN 2500
 
-err_status_t
+srtp_err_status_t
 stat_test_monobit(uint8_t *data) {
   uint8_t *data_end = data + STAT_TEST_DATA_LEN;
   uint16_t ones_count;
@@ -39,12 +39,12 @@
   debug_print(mod_stat, "bit count: %d", ones_count);
   
   if ((ones_count < 9725) || (ones_count > 10275))
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 stat_test_poker(uint8_t *data) {
   int i;
   uint8_t *data_end = data + STAT_TEST_DATA_LEN;
@@ -70,9 +70,9 @@
   debug_print(mod_stat, "poker test: %f\n", poker);
     
   if ((poker < 2.16) || (poker > 46.17))
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -80,7 +80,7 @@
  * runs[i] holds the number of runs of size (i-1)
  */
 
-err_status_t
+srtp_err_status_t
 stat_test_runs(uint8_t *data) {
   uint8_t *data_end = data + STAT_TEST_DATA_LEN;
   uint16_t runs[6] = { 0, 0, 0, 0, 0, 0 }; 
@@ -111,7 +111,7 @@
 	  /* check for long runs */ 
 	  if (state > 25) {
 		debug_print(mod_stat, ">25 runs: %d", state);
-		return err_status_algo_fail;
+		return srtp_err_status_algo_fail;
 	  }
 
 	} else if (state < 0) {
@@ -119,7 +119,7 @@
 	  /* prefix is a gap  */
 	  if (state < -25) {
 		debug_print(mod_stat, ">25 gaps: %d", state);
-	    return err_status_algo_fail;    /* long-runs test failed   */
+	    return srtp_err_status_algo_fail;    /* long-runs test failed   */
 	  }
 	  if (state < -6) {
 	    state = -6;                     /* group together gaps > 5 */
@@ -139,7 +139,7 @@
 	  /* prefix is a run */
 	  if (state > 25) {
 		debug_print(mod_stat, ">25 runs (2): %d", state);
-	    return err_status_algo_fail;    /* long-runs test failed   */
+	    return srtp_err_status_algo_fail;    /* long-runs test failed   */
 	  }
 	  if (state > 6) {
 	    state = 6;                      /* group together runs > 5 */
@@ -154,7 +154,7 @@
 	  /* check for long gaps */ 
 	  if (state < -25) {
 		debug_print(mod_stat, ">25 gaps (2): %d", state);
-	    return err_status_algo_fail;
+	    return srtp_err_status_algo_fail;
 	  }
 
 	} else {
@@ -181,10 +181,10 @@
   for (i=0; i < 6; i++) 
     if (   (runs[i] < lo_value[i] ) || (runs[i] > hi_value[i])
 	|| (gaps[i] < lo_value[i] ) || (gaps[i] > hi_value[i]))
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
 
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -196,7 +196,7 @@
 
 #define RAND_SRC_BUF_OCTETS 50 /* this value MUST divide 2500! */ 
 
-err_status_t
+srtp_err_status_t
 stat_test_rand_source(rand_source_func_t get_rand_bytes) {
   int i;
   double poker;
@@ -206,7 +206,7 @@
     0, 0, 0, 0, 0, 0, 0, 0
   };
   uint8_t buffer[RAND_SRC_BUF_OCTETS];
-  err_status_t status;
+  srtp_err_status_t status;
   int ones_count = 0;
   uint16_t runs[6] = { 0, 0, 0, 0, 0, 0 }; 
   uint16_t gaps[6] = { 0, 0, 0, 0, 0, 0 };
@@ -257,7 +257,7 @@
 	    /* check for long runs */ 
 	    if (state > 25) {
 		  debug_print(mod_stat, ">25 runs (3): %d", state);
-	      return err_status_algo_fail;
+	      return srtp_err_status_algo_fail;
 		}
 	    
 	  } else if (state < 0) {
@@ -265,7 +265,7 @@
 	    /* prefix is a gap  */
 	    if (state < -25) {
 		  debug_print(mod_stat, ">25 gaps (3): %d", state);
-	      return err_status_algo_fail;    /* long-runs test failed   */
+	      return srtp_err_status_algo_fail;    /* long-runs test failed   */
 	    }
 	    if (state < -6) {
 	      state = -6;                     /* group together gaps > 5 */
@@ -285,7 +285,7 @@
 	    /* prefix is a run */
 	    if (state > 25) {
 		  debug_print(mod_stat, ">25 runs (4): %d", state);
-	      return err_status_algo_fail;    /* long-runs test failed   */
+	      return srtp_err_status_algo_fail;    /* long-runs test failed   */
 	    }
 	    if (state > 6) {
 	      state = 6;                      /* group together runs > 5 */
@@ -300,7 +300,7 @@
 	    /* check for long gaps */ 
 	    if (state < -25) {
 		  debug_print(mod_stat, ">25 gaps (4): %d", state);
-	      return err_status_algo_fail;
+	      return srtp_err_status_algo_fail;
 		}
 	    
 	  } else {
@@ -324,7 +324,7 @@
   
   if ((ones_count < 9725) || (ones_count > 10275)) {
     debug_print(mod_stat, "stat: failed monobit test %d", ones_count);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }
   
   /* check poker test data */
@@ -339,7 +339,7 @@
     
   if ((poker < 2.16) || (poker > 46.17)) {
     debug_print(mod_stat, "stat: failed poker test", NULL);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }
 
   /* check run and gap counts against the fixed limits */
@@ -347,22 +347,22 @@
     if ((runs[i] < lo_value[i] ) || (runs[i] > hi_value[i])
 	 || (gaps[i] < lo_value[i] ) || (gaps[i] > hi_value[i])) {
       debug_print(mod_stat, "stat: failed run/gap test", NULL);
-      return err_status_algo_fail; 
+      return srtp_err_status_algo_fail; 
     }
 
   debug_print(mod_stat, "passed random stat test", NULL);
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 stat_test_rand_source_with_repetition(rand_source_func_t source, unsigned num_trials) {
   unsigned int i;
-  err_status_t err = err_status_algo_fail;
+  srtp_err_status_t err = srtp_err_status_algo_fail;
 
   for (i=0; i < num_trials; i++) {
     err = stat_test_rand_source(source);
-    if (err == err_status_ok) {
-      return err_status_ok;  
+    if (err == srtp_err_status_ok) {
+      return srtp_err_status_ok;  
     }
     debug_print(mod_stat, "failed stat test (try number %d)\n", i);
   }
diff --git a/crypto/replay/rdb.c b/crypto/replay/rdb.c
index c84222f..cb35b8a 100644
--- a/crypto/replay/rdb.c
+++ b/crypto/replay/rdb.c
@@ -62,34 +62,34 @@
 
 /* rdb_init initalizes rdb */
 
-err_status_t
+srtp_err_status_t
 rdb_init(rdb_t *rdb) {
   v128_set_to_zero(&rdb->bitmask);
   rdb->window_start = 0;
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
  * rdb_check checks to see if index appears in rdb
  */
 
-err_status_t
+srtp_err_status_t
 rdb_check(const rdb_t *rdb, uint32_t p_index) {
   
   /* if the index appears after (or at very end of) the window, its good */
   if (p_index >= rdb->window_start + rdb_bits_in_bitmask)
-    return err_status_ok;
+    return srtp_err_status_ok;
   
   /* if the index appears before the window, its bad */
   if (p_index < rdb->window_start)
-    return err_status_replay_old;
+    return srtp_err_status_replay_old;
 
   /* otherwise, the index appears within the window, so check the bitmask */
   if (v128_get_bit(&rdb->bitmask, (p_index - rdb->window_start)) == 1)
-    return err_status_replay_fail;    
+    return srtp_err_status_replay_fail;    
       
   /* otherwise, the index is okay */
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
@@ -101,7 +101,7 @@
  * should protect the rdb between these calls
  */
 
-err_status_t
+srtp_err_status_t
 rdb_add_index(rdb_t *rdb, uint32_t p_index) {
   int delta;  
 
@@ -124,15 +124,15 @@
 
   }    
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 rdb_increment(rdb_t *rdb) {
 
   if (rdb->window_start++ > 0x7fffffff)
-    return err_status_key_expired;
-  return err_status_ok;
+    return srtp_err_status_key_expired;
+  return srtp_err_status_ok;
 }
 
 uint32_t
diff --git a/crypto/replay/rdbx.c b/crypto/replay/rdbx.c
index 153676f..fce8f0a 100644
--- a/crypto/replay/rdbx.c
+++ b/crypto/replay/rdbx.c
@@ -186,39 +186,39 @@
  *  rdbx_init(&r, ws) initializes the rdbx_t pointed to by r with window size ws
  */
 
-err_status_t
+srtp_err_status_t
 rdbx_init(rdbx_t *rdbx, unsigned long ws) {
   if (ws == 0)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   if (bitvector_alloc(&rdbx->bitmask, ws) != 0)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
 
   index_init(&rdbx->index);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
  *  rdbx_dealloc(&r) frees memory for the rdbx_t pointed to by r
  */
 
-err_status_t
+srtp_err_status_t
 rdbx_dealloc(rdbx_t *rdbx) {
   bitvector_dealloc(&rdbx->bitmask);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
  * rdbx_set_roc(rdbx, roc) initalizes the rdbx_t at the location rdbx
  * to have the rollover counter value roc.  If that value is less than
  * the current rollover counter value, then the function returns
- * err_status_replay_old; otherwise, err_status_ok is returned.
+ * srtp_err_status_replay_old; otherwise, srtp_err_status_ok is returned.
  * 
  */
 
-err_status_t
+srtp_err_status_t
 rdbx_set_roc(rdbx_t *rdbx, uint32_t roc) {
   bitvector_set_to_zero(&rdbx->bitmask);
 
@@ -228,13 +228,13 @@
 
   /* make sure that we're not moving backwards */
   if (roc < (rdbx->index >> 16))
-    return err_status_replay_old;
+    return srtp_err_status_replay_old;
 
   rdbx->index &= 0xffff;   /* retain lowest 16 bits */
   rdbx->index |= ((uint64_t)roc) << 16;  /* set ROC */
 #endif
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
@@ -264,22 +264,22 @@
  * which is at rdbx->index + delta is in the rdb
  */
 
-err_status_t
+srtp_err_status_t
 rdbx_check(const rdbx_t *rdbx, int delta) {
   
   if (delta > 0) {       /* if delta is positive, it's good */
-    return err_status_ok;
+    return srtp_err_status_ok;
   } else if ((int)(bitvector_get_length(&rdbx->bitmask) - 1) + delta < 0) {   
                          /* if delta is lower than the bitmask, it's bad */
-    return err_status_replay_old; 
+    return srtp_err_status_replay_old; 
   } else if (bitvector_get_bit(&rdbx->bitmask, 
 			       (int)(bitvector_get_length(&rdbx->bitmask) - 1) + delta) == 1) {
                          /* delta is within the window, so check the bitmask */
-    return err_status_replay_fail;    
+    return srtp_err_status_replay_fail;    
   }
  /* otherwise, the index is okay */
 
-  return err_status_ok; 
+  return srtp_err_status_ok; 
 }
 
 /*
@@ -291,7 +291,7 @@
  * should protect the rdbx between these calls if need be
  */
 
-err_status_t
+srtp_err_status_t
 rdbx_add_index(rdbx_t *rdbx, int delta) {
   
   if (delta > 0) {
@@ -306,7 +306,7 @@
 
   /* note that we need not consider the case that delta == 0 */
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
diff --git a/crypto/rng/ctr_prng.c b/crypto/rng/ctr_prng.c
index e24b0ab..cc6fcf6 100644
--- a/crypto/rng/ctr_prng.c
+++ b/crypto/rng/ctr_prng.c
@@ -53,10 +53,10 @@
 
 ctr_prng_t ctr_prng;
 
-err_status_t
+srtp_err_status_t
 ctr_prng_init(rand_source_func_t random_source) {
   uint8_t tmp_key[32];
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* initialize output count to zero */
   ctr_prng.octet_count = 0;
@@ -78,12 +78,12 @@
   if (status) 
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 ctr_prng_get_octet_string(void *dest, uint32_t len) {
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* 
    * if we need to re-initialize the prng, do so now 
@@ -102,13 +102,13 @@
   if (status)
     return status;
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 ctr_prng_deinit(void) {
 
   /* nothing */
   
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
diff --git a/crypto/rng/prng.c b/crypto/rng/prng.c
index 208e268..80ff53e 100644
--- a/crypto/rng/prng.c
+++ b/crypto/rng/prng.c
@@ -53,10 +53,10 @@
 
 x917_prng_t x917_prng;
 
-err_status_t
+srtp_err_status_t
 x917_prng_init(rand_source_func_t random_source) {
   uint8_t tmp_key[16];
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* initialize output count to zero */
   x917_prng.octet_count = 0;
@@ -77,15 +77,15 @@
   if (status) 
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 x917_prng_get_octet_string(uint8_t *dest, uint32_t len) {
   uint32_t t;
   v128_t buffer;
   uint32_t i, tail_len;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* 
    * if we need to re-initialize the prng, do so now 
@@ -174,11 +174,11 @@
 
   }
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 x917_prng_deinit(void) {
   
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
diff --git a/crypto/rng/rand_source.c b/crypto/rng/rand_source.c
index 1eb6fbb..fe4e0a1 100644
--- a/crypto/rng/rand_source.c
+++ b/crypto/rng/rand_source.c
@@ -75,17 +75,17 @@
 static int dev_random_fdes = RAND_SOURCE_NOT_READY;
 
 
-err_status_t
+srtp_err_status_t
 rand_source_init(void) {
   if (dev_random_fdes >= 0) {
     /* already open */
-    return err_status_ok;
+    return srtp_err_status_ok;
   }
 #ifdef DEV_URANDOM
   /* open random source for reading */
   dev_random_fdes = open(DEV_URANDOM, O_RDONLY);
   if (dev_random_fdes < 0)
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
 #elif defined(HAVE_RAND_S)
   dev_random_fdes = RAND_SOURCE_READY;
 #else
@@ -93,10 +93,10 @@
   fprintf(stderr, "WARNING: no real random source present!\n");
   dev_random_fdes = RAND_SOURCE_READY;
 #endif
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 rand_source_get_octet_string(void *dest, uint32_t len) {
 
   /* 
@@ -110,7 +110,7 @@
   {
     ssize_t num_read = read(dev_random_fdes, dst, len);
     if (num_read <= 0 || num_read > len)
-      return err_status_fail;
+      return srtp_err_status_fail;
     len -= num_read;
     dst += num_read;
   }
@@ -122,7 +122,7 @@
     errno_t err = rand_s(&val);
 
     if (err != 0)
-      return err_status_fail;
+      return srtp_err_status_fail;
   
     *dst++ = val & 0xff;
     len--;
@@ -141,18 +141,18 @@
 	  len--;
   }
 #endif
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
  
-err_status_t
+srtp_err_status_t
 rand_source_deinit(void) {
   if (dev_random_fdes < 0)
-    return err_status_dealloc_fail;  /* well, we haven't really failed, *
+    return srtp_err_status_dealloc_fail;  /* well, we haven't really failed, *
 				      * but there is something wrong    */
 #ifdef DEV_URANDOM
   close(dev_random_fdes);  
 #endif
   dev_random_fdes = RAND_SOURCE_NOT_READY;
   
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
diff --git a/crypto/rng/rand_source_ossl.c b/crypto/rng/rand_source_ossl.c
index 4bca6ac..56d138c 100644
--- a/crypto/rng/rand_source_ossl.c
+++ b/crypto/rng/rand_source_ossl.c
@@ -50,21 +50,21 @@
 #include <openssl/rand.h>
 
 
-err_status_t rand_source_init (void)
+srtp_err_status_t rand_source_init (void)
 {
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
-err_status_t rand_source_get_octet_string (void *dest, uint32_t len)
+srtp_err_status_t rand_source_get_octet_string (void *dest, uint32_t len)
 {
     if (RAND_bytes(dest, len) == 1) {
-        return err_status_ok;
+        return srtp_err_status_ok;
     } else {
-        return err_status_fail;
+        return srtp_err_status_fail;
     }
 }
 
-err_status_t rand_source_deinit (void)
+srtp_err_status_t rand_source_deinit (void)
 {
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
diff --git a/crypto/test/aes_calc.c b/crypto/test/aes_calc.c
index 64c79db..b647418 100644
--- a/crypto/test/aes_calc.c
+++ b/crypto/test/aes_calc.c
@@ -41,7 +41,7 @@
   aes_expanded_key_t exp_key;
   int key_len, len;
   int verbose = 0;
-  err_status_t status;
+  srtp_err_status_t status;
 
   if (argc == 3) {
     /* we're not in verbose mode */
diff --git a/crypto/test/cipher_driver.c b/crypto/test/cipher_driver.c
index a85cdc1..4fe9370 100644
--- a/crypto/test/cipher_driver.c
+++ b/crypto/test/cipher_driver.c
@@ -65,7 +65,7 @@
 void
 cipher_driver_test_throughput(cipher_t *c);
 
-err_status_t
+srtp_err_status_t
 cipher_driver_self_test(cipher_type_t *ct);
 
 
@@ -75,14 +75,14 @@
  * calls
  */
 
-err_status_t
+srtp_err_status_t
 cipher_driver_test_buffering(cipher_t *c);
 
 
 /*
  * functions for testing cipher cache thrash
  */
-err_status_t
+srtp_err_status_t
 cipher_driver_test_array_throughput(cipher_type_t *ct, 
 				    int klen, int num_cipher);
 
@@ -93,10 +93,10 @@
 cipher_array_bits_per_second(cipher_t *cipher_array[], int num_cipher, 
 			     unsigned octets_in_buffer, int num_trials);
 
-err_status_t
+srtp_err_status_t
 cipher_array_delete(cipher_t *cipher_array[], int num_cipher);
 
-err_status_t
+srtp_err_status_t
 cipher_array_alloc_init(cipher_t ***cipher_array, int num_ciphers,
 			cipher_type_t *ctype, int klen);
 
@@ -107,7 +107,7 @@
 }
 
 void
-check_status(err_status_t s) {
+check_status(srtp_err_status_t s) {
   if (s) {
     printf("error (code %d)\n", s);
     exit(s);
@@ -135,7 +135,7 @@
 int
 main(int argc, char *argv[]) {
   cipher_t *c = NULL;
-  err_status_t status;
+  srtp_err_status_t status;
   unsigned char test_key[48] = {
     0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
     0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
@@ -204,11 +204,11 @@
       cipher_driver_test_array_throughput(&aes_icm_256, 46, num_cipher); 
 
     for (num_cipher=1; num_cipher < max_num_cipher; num_cipher *=8) {
-	cipher_driver_test_array_throughput(&aes_gcm_128_openssl, AES_128_GCM_KEYSIZE_WSALT, num_cipher);         
+	cipher_driver_test_array_throughput(&aes_gcm_128_openssl, SRTP_AES_128_GCM_KEYSIZE_WSALT, num_cipher);         
     }
 
     for (num_cipher=1; num_cipher < max_num_cipher; num_cipher *=8) {
-	cipher_driver_test_array_throughput(&aes_gcm_256_openssl, AES_256_GCM_KEYSIZE_WSALT, num_cipher);         
+	cipher_driver_test_array_throughput(&aes_gcm_256_openssl, SRTP_AES_256_GCM_KEYSIZE_WSALT, num_cipher);         
     }
 #endif
   }
@@ -291,7 +291,7 @@
 
 #ifdef OPENSSL
     /* run the throughput test on the aes_gcm_128_openssl cipher */
-    status = cipher_type_alloc(&aes_gcm_128_openssl, &c, AES_128_GCM_KEYSIZE_WSALT, 8);
+    status = cipher_type_alloc(&aes_gcm_128_openssl, &c, SRTP_AES_128_GCM_KEYSIZE_WSALT, 8);
     if (status) {
         fprintf(stderr, "error: can't allocate GCM 128 cipher\n");
         exit(status);
@@ -310,7 +310,7 @@
     check_status(status);
 
     /* run the throughput test on the aes_gcm_256_openssl cipher */
-    status = cipher_type_alloc(&aes_gcm_256_openssl, &c, AES_256_GCM_KEYSIZE_WSALT, 16);
+    status = cipher_type_alloc(&aes_gcm_256_openssl, &c, SRTP_AES_256_GCM_KEYSIZE_WSALT, 16);
     if (status) {
         fprintf(stderr, "error: can't allocate GCM 256 cipher\n");
         exit(status);
@@ -347,9 +347,9 @@
 
 }
 
-err_status_t
+srtp_err_status_t
 cipher_driver_self_test(cipher_type_t *ct) {
-  err_status_t status;
+  srtp_err_status_t status;
   
   printf("running cipher self-test for %s...", ct->description);
   status = cipher_type_self_test(ct);
@@ -359,7 +359,7 @@
   }
   printf("passed\n");
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
@@ -368,7 +368,7 @@
  * calls
  */
 
-err_status_t
+srtp_err_status_t
 cipher_driver_test_buffering(cipher_t *c) {
   int i, j, num_trials = 1000;
   unsigned len, buflen = 1024;
@@ -377,7 +377,7 @@
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x34
   };
-  err_status_t status;
+  srtp_err_status_t status;
   
   printf("testing output buffering for cipher %s...",
 	 c->type->description);
@@ -435,13 +435,13 @@
 	printf("computed: %s\n", octet_string_hex_string(buffer1, buflen));
 	printf("expected: %s\n", octet_string_hex_string(buffer0, buflen));
 #endif 
-	return err_status_algo_fail;
+	return srtp_err_status_algo_fail;
       }
   }
   
   printf("passed\n");
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -453,11 +453,11 @@
  * of cipher_t of type ctype
  */
 
-err_status_t
+srtp_err_status_t
 cipher_array_alloc_init(cipher_t ***ca, int num_ciphers,
 			cipher_type_t *ctype, int klen) {
   int i, j;
-  err_status_t status;
+  srtp_err_status_t status;
   uint8_t *key;
   cipher_t **cipher_array;
   /* pad klen allocation, to handle aes_icm reading 16 bytes for the
@@ -467,7 +467,7 @@
   /* allocate array of pointers to ciphers */
   cipher_array = (cipher_t **) malloc(sizeof(cipher_t *) * num_ciphers);
   if (cipher_array == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
 
   /* set ca to location of cipher_array */
   *ca = cipher_array;
@@ -476,7 +476,7 @@
   key = crypto_alloc(klen_pad);
   if (key == NULL) {
     free(cipher_array);
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   }
   
   /* allocate and initialize an array of ciphers */
@@ -506,10 +506,10 @@
 
   crypto_free(key);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 cipher_array_delete(cipher_t *cipher_array[], int num_cipher) {
   int i;
   
@@ -519,7 +519,7 @@
 
   free(cipher_array);
   
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -593,11 +593,11 @@
 
 }
 
-err_status_t
+srtp_err_status_t
 cipher_driver_test_array_throughput(cipher_type_t *ct, 
 				    int klen, int num_cipher) {
   cipher_t **ca = NULL;
-  err_status_t status;
+  srtp_err_status_t status;
 
   status = cipher_array_alloc_init(&ca, num_cipher, ct, klen);
   if (status) {
@@ -610,5 +610,5 @@
   
   cipher_array_delete(ca, num_cipher);    
  
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
diff --git a/crypto/test/kernel_driver.c b/crypto/test/kernel_driver.c
index c0f12c1..e4b604e 100644
--- a/crypto/test/kernel_driver.c
+++ b/crypto/test/kernel_driver.c
@@ -62,7 +62,7 @@
   extern char *optarg;
   int q;
   int do_validation      = 0;
-  err_status_t status;
+  srtp_err_status_t status;
 
   if (argc == 1)
     usage(argv[0]);
@@ -121,10 +121,10 @@
  * of the crypto_kernel
  */
 
-err_status_t
+srtp_err_status_t
 crypto_kernel_cipher_test(void) {
 
   /* not implemented yet! */
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
diff --git a/crypto/test/sha1_driver.c b/crypto/test/sha1_driver.c
index 2e19479..9bfa8c4 100644
--- a/crypto/test/sha1_driver.c
+++ b/crypto/test/sha1_driver.c
@@ -68,7 +68,7 @@
 
 hash_test_case_t *sha1_test_case_list;
 
-err_status_t
+srtp_err_status_t
 hash_test_case_add(hash_test_case_t **list_ptr, 
 		   char *hex_data, 
 		   unsigned data_len, 
@@ -80,15 +80,15 @@
 
   test_case = malloc(sizeof(hash_test_case_t));
   if (test_case == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   
   tmp_len = hex_string_to_octet_string((char *)test_case->data, hex_data, data_len*2);
   if (tmp_len != data_len*2)
-    return err_status_parse_err;
+    return srtp_err_status_parse_err;
 
   tmp_len = hex_string_to_octet_string((char *)test_case->hash, hex_hash, hash_len*2);
   if (tmp_len != hash_len*2)
-    return err_status_parse_err;
+    return srtp_err_status_parse_err;
 
   test_case->data_len = data_len;
   test_case->hash_len = hash_len;
@@ -97,21 +97,21 @@
   test_case->next_test_case = list_head;
   *list_ptr = test_case;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 sha1_test_case_validate(const hash_test_case_t *test_case) {
   srtp_sha1_ctx_t ctx;
   uint32_t hash_value[5];
 
   if (test_case == NULL)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   if (test_case->hash_len != 20)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   if (test_case->data_len > MAX_HASH_DATA_LEN)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   srtp_sha1_init(&ctx);
   srtp_sha1_update(&ctx, test_case->data, test_case->data_len);
@@ -123,7 +123,7 @@
     printf("PASSED: computed value:  %s\n", 
 	   octet_string_hex_string((const uint8_t *)hash_value, 20));   
 #endif 
-    return err_status_ok;
+    return srtp_err_status_ok;
   }
 
   printf("reference value: %s\n", 
@@ -131,7 +131,7 @@
   printf("computed value:  %s\n", 
 	 octet_string_hex_string((const uint8_t *)hash_value, 20));
 
-  return err_status_algo_fail;
+  return srtp_err_status_algo_fail;
   
 }
 
@@ -141,10 +141,10 @@
   char hex_hash[40];
 };
 
-err_status_t
+srtp_err_status_t
 sha1_add_test_cases(void) {
   int i;
-  err_status_t err;
+  srtp_err_status_t err;
 
   /*
    * these test cases are taken from the "SHA-1 Sample Vectors"
@@ -488,10 +488,10 @@
     }
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 sha1_dealloc_test_cases(void) {
   hash_test_case_t *t, *next;
 
@@ -502,15 +502,15 @@
 
   sha1_test_case_list = NULL;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
 
-err_status_t
+srtp_err_status_t
 sha1_validate(void) {
   hash_test_case_t *test_case;
-  err_status_t err;
+  srtp_err_status_t err;
 
   err = sha1_add_test_cases();
   if (err) {
@@ -519,7 +519,7 @@
   }  
 
   if (sha1_test_case_list == NULL)
-    return err_status_cant_check;
+    return srtp_err_status_cant_check;
   
   test_case = sha1_test_case_list;
   while (test_case != NULL) {
@@ -533,14 +533,14 @@
 
   sha1_dealloc_test_cases();
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
 
 int
 main (void) {
-  err_status_t err;
+  srtp_err_status_t err;
 
   printf("sha1 test driver\n");
 
diff --git a/crypto/test/stat_driver.c b/crypto/test/stat_driver.c
index 6e92f93..ec6361d 100644
--- a/crypto/test/stat_driver.c
+++ b/crypto/test/stat_driver.c
@@ -24,11 +24,11 @@
   void *state;
 } random_source_t;
 
-err_status_t
+srtp_err_status_t
 random_source_alloc(void);
 
 void
-err_check(err_status_t s) {
+err_check(srtp_err_status_t s) {
   if (s) {
     printf("error (code %d)\n", s);
     exit(1);
@@ -146,7 +146,7 @@
     for (i=0; i < 2500; i++) {
 	buffer[i] = 0;
     }
-    err_check(cipher_type_alloc(&aes_gcm_128_openssl, &c, AES_128_GCM_KEYSIZE_WSALT, 8));
+    err_check(cipher_type_alloc(&aes_gcm_128_openssl, &c, SRTP_AES_128_GCM_KEYSIZE_WSALT, 8));
     err_check(cipher_init(c, key));
     err_check(cipher_set_iv(c, &nonce, direction_encrypt));
     err_check(cipher_encrypt(c, buffer, &buf_len));
@@ -175,7 +175,7 @@
     for (i=0; i < 2500; i++) {
 	buffer[i] = 0;
     }
-    err_check(cipher_type_alloc(&aes_gcm_256_openssl, &c, AES_256_GCM_KEYSIZE_WSALT, 16));
+    err_check(cipher_type_alloc(&aes_gcm_256_openssl, &c, SRTP_AES_256_GCM_KEYSIZE_WSALT, 16));
     err_check(cipher_init(c, key));
     err_check(cipher_set_iv(c, &nonce, direction_encrypt));
     err_check(cipher_encrypt(c, buffer, &buf_len));
diff --git a/include/ekt.h b/include/ekt.h
index b0d888b..118e4c1 100644
--- a/include/ekt.h
+++ b/include/ekt.h
@@ -123,32 +123,18 @@
 
 
 
-err_status_t 
-ekt_alloc(ekt_stream_t *stream_data, ekt_policy_t policy);
+srtp_err_status_t ekt_alloc(ekt_stream_t *stream_data, ekt_policy_t policy);
 
-err_status_t
-ekt_stream_init(ekt_stream_t e, 
-		ekt_spi_t spi,
-		void *ekt_key,
-		unsigned ekt_cipher_type);
+srtp_err_status_t ekt_stream_init(ekt_stream_t e, ekt_spi_t spi, void *ekt_key, unsigned ekt_cipher_type);
 
-err_status_t
-ekt_stream_init_from_policy(ekt_stream_t e, ekt_policy_t p);
+srtp_err_status_t ekt_stream_init_from_policy(ekt_stream_t e, ekt_policy_t p);
   
 
 
-err_status_t
-srtp_stream_init_from_ekt(srtp_stream_t stream,			  
-			  const void *srtcp_hdr,
-			  unsigned pkt_octet_len);
+srtp_err_status_t srtp_stream_init_from_ekt(srtp_stream_t stream, const void *srtcp_hdr, unsigned pkt_octet_len);
 		
 
-void
-ekt_write_data(ekt_stream_t ekt,
-	       uint8_t *base_tag, 
-	       unsigned base_tag_len, 
-	       int *packet_len,
-	       xtd_seq_num_t pkt_index);		
+void ekt_write_data(ekt_stream_t ekt, uint8_t *base_tag, unsigned base_tag_len, int *packet_len, xtd_seq_num_t pkt_index);		
 
 /*
  * We handle EKT by performing some additional steps before
@@ -158,16 +144,9 @@
  * With EKT, the tag_len parameter is actually the base tag
  * length
  */
+srtp_err_status_t ekt_tag_verification_preproces(uint8_t *pkt_tag, uint8_t *pkt_tag_copy, unsigned tag_len);
 
-err_status_t
-ekt_tag_verification_preproces(uint8_t *pkt_tag, 
-			       uint8_t *pkt_tag_copy, 
-			       unsigned tag_len);
-
-err_status_t
-ekt_tag_verification_postproces(uint8_t *pkt_tag,
-				uint8_t *pkt_tag_copy,
-				unsigned tag_len);
+srtp_err_status_t ekt_tag_verification_postproces(uint8_t *pkt_tag, uint8_t *pkt_tag_copy, unsigned tag_len);
 
 
 /*
@@ -182,16 +161,10 @@
  * When EKT is not used, this function is a no-op.
  * 
  */
-
-err_status_t
-srtp_stream_srtcp_auth_tag_generation_preprocess(const srtp_stream_t *s,
-						 uint8_t *pkt_tag,
-						 unsigned pkt_octet_len);
+srtp_err_status_t srtp_stream_srtcp_auth_tag_generation_preprocess(const srtp_stream_t *s, uint8_t *pkt_tag, unsigned pkt_octet_len);
 
 /* it's not clear that a tag_generation_postprocess function is needed */
-
-err_status_t
-srtcp_auth_tag_generation_postprocess(void);
+srtp_err_status_t srtcp_auth_tag_generation_postprocess(void);
 
 
 #ifdef __cplusplus
diff --git a/include/rtp.h b/include/rtp.h
index 2e8201a..58d9ab2 100644
--- a/include/rtp.h
+++ b/include/rtp.h
@@ -120,14 +120,14 @@
 int
 srtp_sender_init(rtp_sender_t rtp_ctx,          /* structure to be init'ed */
 		 struct sockaddr_in name,       /* socket name             */
-		 sec_serv_t security_services,  /* sec. servs. to be used  */
+		 srtp_sec_serv_t security_services,  /* sec. servs. to be used  */
 		 unsigned char *input_key       /* master key/salt in hex  */
 		 );
 
 int
 srtp_receiver_init(rtp_receiver_t rtp_ctx,       /* structure to be init'ed */
 		   struct sockaddr_in name, 	 /* socket name             */
-		   sec_serv_t security_services, /* sec. servs. to be used  */
+		   srtp_sec_serv_t security_services, /* sec. servs. to be used  */
 		   unsigned char *input_key	 /* master key/salt in hex  */
 		   );
 
diff --git a/include/srtp.h b/include/srtp.h
index eb8630c..66af1f3 100644
--- a/include/srtp.h
+++ b/include/srtp.h
@@ -94,9 +94,9 @@
  * as part of the IV formation logic applied to each RTP packet.
  */
 #define SRTP_AEAD_SALT_LEN	12
-#define AES_128_GCM_KEYSIZE_WSALT   SRTP_AEAD_SALT_LEN + 16
-#define AES_192_GCM_KEYSIZE_WSALT   SRTP_AEAD_SALT_LEN + 24
-#define AES_256_GCM_KEYSIZE_WSALT   SRTP_AEAD_SALT_LEN + 32
+#define SRTP_AES_128_GCM_KEYSIZE_WSALT   SRTP_AEAD_SALT_LEN + 16
+#define SRTP_AES_192_GCM_KEYSIZE_WSALT   SRTP_AEAD_SALT_LEN + 24
+#define SRTP_AES_256_GCM_KEYSIZE_WSALT   SRTP_AEAD_SALT_LEN + 32
 
 /*
  * an srtp_hdr_t represents the srtp header
@@ -207,10 +207,10 @@
 
 
 /** 
- *  @brief A cipher_type_id_t is an identifier for a particular cipher
+ *  @brief A srtp_cipher_type_id_t is an identifier for a particular cipher
  *  type.
  *
- *  A cipher_type_id_t is an integer that represents a particular
+ *  A srtp_cipher_type_id_t is an integer that represents a particular
  *  cipher type, e.g. the Advanced Encryption Standard (AES).  A
  *  NULL_CIPHER is avaliable; this cipher leaves the data unchanged,
  *  and can be selected to indicate that no encryption is to take
@@ -218,13 +218,13 @@
  * 
  *  @ingroup Ciphers
  */
-typedef uint32_t cipher_type_id_t; 
+typedef uint32_t srtp_cipher_type_id_t; 
 
 /**
- *  @brief An auth_type_id_t is an identifier for a particular authentication
+ *  @brief An srtp_auth_type_id_t is an identifier for a particular authentication
  *   function.
  *
- *  An auth_type_id_t is an integer that represents a particular
+ *  An srtp_auth_type_id_t is an integer that represents a particular
  *  authentication function type, e.g. HMAC-SHA1.  A NULL_AUTH is
  *  avaliable; this authentication function performs no computation,
  *  and can be selected to indicate that no authentication is to take
@@ -232,43 +232,43 @@
  *  
  *  @ingroup Authentication
  */
-typedef uint32_t auth_type_id_t;
+typedef uint32_t srtp_auth_type_id_t;
 
 /*
- * @brief err_status_t defines error codes.
+ * @brief srtp_err_status_t defines error codes.
  *
- * The enumeration err_status_t defines error codes.  Note that the
- * value of err_status_ok is equal to zero, which can simplify error
+ * The enumeration srtp_err_status_t defines error codes.  Note that the
+ * value of srtp_err_status_ok is equal to zero, which can simplify error
  * checking somewhat.
  *
  */
 typedef enum {
-  err_status_ok           = 0,  /**< nothing to report                       */
-  err_status_fail         = 1,  /**< unspecified failure                     */
-  err_status_bad_param    = 2,  /**< unsupported parameter                   */
-  err_status_alloc_fail   = 3,  /**< couldn't allocate memory                */
-  err_status_dealloc_fail = 4,  /**< couldn't deallocate properly            */
-  err_status_init_fail    = 5,  /**< couldn't initialize                     */
-  err_status_terminus     = 6,  /**< can't process as much data as requested */
-  err_status_auth_fail    = 7,  /**< authentication failure                  */
-  err_status_cipher_fail  = 8,  /**< cipher failure                          */
-  err_status_replay_fail  = 9,  /**< replay check failed (bad index)         */
-  err_status_replay_old   = 10, /**< replay check failed (index too old)     */
-  err_status_algo_fail    = 11, /**< algorithm failed test routine           */
-  err_status_no_such_op   = 12, /**< unsupported operation                   */
-  err_status_no_ctx       = 13, /**< no appropriate context found            */
-  err_status_cant_check   = 14, /**< unable to perform desired validation    */
-  err_status_key_expired  = 15, /**< can't use key any more                  */
-  err_status_socket_err   = 16, /**< error in use of socket                  */
-  err_status_signal_err   = 17, /**< error in use POSIX signals              */
-  err_status_nonce_bad    = 18, /**< nonce check failed                      */
-  err_status_read_fail    = 19, /**< couldn't read data                      */
-  err_status_write_fail   = 20, /**< couldn't write data                     */
-  err_status_parse_err    = 21, /**< error parsing data                      */
-  err_status_encode_err   = 22, /**< error encoding data                     */
-  err_status_semaphore_err = 23,/**< error while using semaphores            */
-  err_status_pfkey_err    = 24  /**< error while using pfkey                 */
-} err_status_t;
+  srtp_err_status_ok           = 0,  /**< nothing to report                       */
+  srtp_err_status_fail         = 1,  /**< unspecified failure                     */
+  srtp_err_status_bad_param    = 2,  /**< unsupported parameter                   */
+  srtp_err_status_alloc_fail   = 3,  /**< couldn't allocate memory                */
+  srtp_err_status_dealloc_fail = 4,  /**< couldn't deallocate properly            */
+  srtp_err_status_init_fail    = 5,  /**< couldn't initialize                     */
+  srtp_err_status_terminus     = 6,  /**< can't process as much data as requested */
+  srtp_err_status_auth_fail    = 7,  /**< authentication failure                  */
+  srtp_err_status_cipher_fail  = 8,  /**< cipher failure                          */
+  srtp_err_status_replay_fail  = 9,  /**< replay check failed (bad index)         */
+  srtp_err_status_replay_old   = 10, /**< replay check failed (index too old)     */
+  srtp_err_status_algo_fail    = 11, /**< algorithm failed test routine           */
+  srtp_err_status_no_such_op   = 12, /**< unsupported operation                   */
+  srtp_err_status_no_ctx       = 13, /**< no appropriate context found            */
+  srtp_err_status_cant_check   = 14, /**< unable to perform desired validation    */
+  srtp_err_status_key_expired  = 15, /**< can't use key any more                  */
+  srtp_err_status_socket_err   = 16, /**< error in use of socket                  */
+  srtp_err_status_signal_err   = 17, /**< error in use POSIX signals              */
+  srtp_err_status_nonce_bad    = 18, /**< nonce check failed                      */
+  srtp_err_status_read_fail    = 19, /**< couldn't read data                      */
+  srtp_err_status_write_fail   = 20, /**< couldn't write data                     */
+  srtp_err_status_parse_err    = 21, /**< error parsing data                      */
+  srtp_err_status_encode_err   = 22, /**< error encoding data                     */
+  srtp_err_status_semaphore_err = 23,/**< error while using semaphores            */
+  srtp_err_status_pfkey_err    = 24  /**< error while using pfkey                 */
+} srtp_err_status_t;
 
 typedef struct srtp_stream_ctx_t_ srtp_stream_ctx_t;
 typedef struct srtp_ctx_t_ srtp_ctx_t;
@@ -279,9 +279,9 @@
  */
 
 /**
- * @brief sec_serv_t describes a set of security services. 
+ * @brief srtp_sec_serv_t describes a set of security services. 
  *
- * A sec_serv_t enumeration is used to describe the particular
+ * A srtp_sec_serv_t enumeration is used to describe the particular
  * security services that will be applied by a particular crypto
  * policy (or other mechanism).  
  */
@@ -291,38 +291,38 @@
   sec_serv_conf          = 1, /**< confidentiality                    */
   sec_serv_auth          = 2, /**< authentication                     */
   sec_serv_conf_and_auth = 3  /**< confidentiality and authentication */
-} sec_serv_t;
+} srtp_sec_serv_t;
 
 /** 
- * @brief crypto_policy_t describes a particular crypto policy that
+ * @brief srtp_crypto_policy_t describes a particular crypto policy that
  * can be applied to an SRTP stream.
  *
- * A crypto_policy_t describes a particular cryptographic policy that
+ * A srtp_crypto_policy_t describes a particular cryptographic policy that
  * can be applied to an SRTP or SRTCP stream.  An SRTP session policy
  * consists of a list of these policies, one for each SRTP stream 
  * in the session.
  */
 
-typedef struct crypto_policy_t {
-  cipher_type_id_t cipher_type;    /**< An integer representing
-				    *   the type of cipher.  */
+typedef struct srtp_crypto_policy_t {
+  srtp_cipher_type_id_t cipher_type;    /**< An integer representing
+				         *   the type of cipher.  */
   int              cipher_key_len; /**< The length of the cipher key
 				    *   in octets.                       */
-  auth_type_id_t   auth_type;      /**< An integer representing the
-				    *   authentication function.         */
+  srtp_auth_type_id_t   auth_type;      /**< An integer representing the
+				         *   authentication function.         */
   int              auth_key_len;   /**< The length of the authentication 
 				    *   function key in octets.          */
   int              auth_tag_len;   /**< The length of the authentication 
 				    *   tag in octets.                   */
-  sec_serv_t       sec_serv;       /**< The flag indicating the security
+  srtp_sec_serv_t  sec_serv;       /**< The flag indicating the security
 				    *   services to be applied.          */
-} crypto_policy_t;
+} srtp_crypto_policy_t;
 
 
 /** 
- * @brief ssrc_type_t describes the type of an SSRC.
+ * @brief srtp_ssrc_type_t describes the type of an SSRC.
  * 
- * An ssrc_type_t enumeration is used to indicate a type of SSRC.  See
+ * An srtp_ssrc_type_t enumeration is used to indicate a type of SSRC.  See
  * @ref srtp_policy_t for more informataion.
  */
 
@@ -335,12 +335,12 @@
   ssrc_any_outbound = 3  /**< Indicates any outbound SSRC value 
 			    (i.e. a value that is used in the 
 			    function srtp_protect())		  */
-} ssrc_type_t;
+} srtp_ssrc_type_t;
 
 /**
- * @brief An ssrc_t represents a particular SSRC value, or a `wildcard' SSRC.
+ * @brief An srtp_ssrc_t represents a particular SSRC value, or a `wildcard' SSRC.
  * 
- * An ssrc_t represents a particular SSRC value (if its type is
+ * An srtp_ssrc_t represents a particular SSRC value (if its type is
  * ssrc_specific), or a wildcard SSRC value that will match all
  * outbound SSRCs (if its type is ssrc_any_outbound) or all inbound
  * SSRCs (if its type is ssrc_any_inbound).  
@@ -348,9 +348,9 @@
  */
 
 typedef struct { 
-  ssrc_type_t type;   /**< The type of this particular SSRC */
-  unsigned int value; /**< The value of this SSRC, if it is not a wildcard */
-} ssrc_t;
+  srtp_ssrc_type_t type;  /**< The type of this particular SSRC */
+  unsigned int     value; /**< The value of this SSRC, if it is not a wildcard */
+} srtp_ssrc_t;
 
 
 /**
@@ -393,13 +393,13 @@
  */
 
 typedef struct srtp_policy_t {
-  ssrc_t        ssrc;        /**< The SSRC value of stream, or the 
+  srtp_ssrc_t   ssrc;        /**< The SSRC value of stream, or the 
 			      *   flags SSRC_ANY_INBOUND or 
 			      *   SSRC_ANY_OUTBOUND if key sharing
 			      *   is used for this policy element.
 			      */
-  crypto_policy_t rtp;         /**< SRTP crypto policy.                  */
-  crypto_policy_t rtcp;        /**< SRTCP crypto policy.                 */
+  srtp_crypto_policy_t rtp;    /**< SRTP crypto policy.                  */
+  srtp_crypto_policy_t rtcp;   /**< SRTCP crypto policy.                 */
   unsigned char *key;          /**< Pointer to the SRTP master key for
 				*    this stream.                        */
   ekt_policy_t ekt;            /**< Pointer to the EKT policy structure
@@ -457,8 +457,7 @@
  * functions.
  */
 
-err_status_t
-srtp_init(void);
+srtp_err_status_t srtp_init(void);
 
 /**
  * @brief srtp_shutdown() de-initializes the srtp library.
@@ -466,8 +465,7 @@
  * @warning No srtp functions may be called after calling this function.
  */
 
-err_status_t
-srtp_shutdown(void);
+srtp_err_status_t srtp_shutdown(void);
 
 /**
  * @brief srtp_protect() is the Secure RTP sender-side packet processing
@@ -475,7 +473,7 @@
  * 
  * The function call srtp_protect(ctx, rtp_hdr, len_ptr) applies SRTP
  * protection to the RTP packet rtp_hdr (which has length *len_ptr) using
- * the SRTP context ctx.  If err_status_ok is returned, then rtp_hdr
+ * the SRTP context ctx.  If srtp_err_status_ok is returned, then rtp_hdr
  * points to the resulting SRTP packet and *len_ptr is the number of
  * octets in that packet; otherwise, no assumptions should be made
  * about the value of either data elements.
@@ -501,17 +499,16 @@
  *
  * @param len_ptr is a pointer to the length in octets of the complete
  * RTP packet (header and body) before the function call, and of the
- * complete SRTP packet after the call, if err_status_ok was returned.
+ * complete SRTP packet after the call, if srtp_err_status_ok was returned.
  * Otherwise, the value of the data to which it points is undefined.
  *
  * @return 
- *    - err_status_ok            no problems
- *    - err_status_replay_fail   rtp sequence number was non-increasing
+ *    - srtp_err_status_ok            no problems
+ *    - srtp_err_status_replay_fail   rtp sequence number was non-increasing
  *    - @e other                 failure in cryptographic mechanisms
  */
 
-err_status_t
-srtp_protect(srtp_t ctx, void *rtp_hdr, int *len_ptr);
+srtp_err_status_t srtp_protect(srtp_t ctx, void *rtp_hdr, int *len_ptr);
 	     
 /**
  * @brief srtp_unprotect() is the Secure RTP receiver-side packet
@@ -520,7 +517,7 @@
  * The function call srtp_unprotect(ctx, srtp_hdr, len_ptr) verifies
  * the Secure RTP protection of the SRTP packet pointed to by srtp_hdr
  * (which has length *len_ptr), using the SRTP context ctx.  If
- * err_status_ok is returned, then srtp_hdr points to the resulting
+ * srtp_err_status_ok is returned, then srtp_hdr points to the resulting
  * RTP packet and *len_ptr is the number of octets in that packet;
  * otherwise, no assumptions should be made about the value of either
  * data elements.  
@@ -536,26 +533,25 @@
  *
  * @param srtp_hdr is a pointer to the header of the SRTP packet
  * (before the call).  after the function returns, it points to the
- * rtp packet if err_status_ok was returned; otherwise, the value of
+ * rtp packet if srtp_err_status_ok was returned; otherwise, the value of
  * the data to which it points is undefined.
  *
  * @param len_ptr is a pointer to the length in octets of the complete
  * srtp packet (header and body) before the function call, and of the
- * complete rtp packet after the call, if err_status_ok was returned.
+ * complete rtp packet after the call, if srtp_err_status_ok was returned.
  * Otherwise, the value of the data to which it points is undefined.
  *
  * @return 
- *    - err_status_ok          if the RTP packet is valid.
- *    - err_status_auth_fail   if the SRTP packet failed the message 
+ *    - srtp_err_status_ok          if the RTP packet is valid.
+ *    - srtp_err_status_auth_fail   if the SRTP packet failed the message 
  *                             authentication check.
- *    - err_status_replay_fail if the SRTP packet is a replay (e.g. packet has
+ *    - srtp_err_status_replay_fail if the SRTP packet is a replay (e.g. packet has
  *                             already been processed and accepted).
  *    - [other]  if there has been an error in the cryptographic mechanisms.
  *
  */
 
-err_status_t
-srtp_unprotect(srtp_t ctx, void *srtp_hdr, int *len_ptr);
+srtp_err_status_t srtp_unprotect(srtp_t ctx, void *srtp_hdr, int *len_ptr);
 
 
 /**
@@ -576,13 +572,12 @@
  * have its `next' field set to NULL.
  * 
  * @return
- *    - err_status_ok           if creation succeded.
- *    - err_status_alloc_fail   if allocation failed.
- *    - err_status_init_fail    if initialization failed.
+ *    - srtp_err_status_ok           if creation succeded.
+ *    - srtp_err_status_alloc_fail   if allocation failed.
+ *    - srtp_err_status_init_fail    if initialization failed.
  */
 
-err_status_t
-srtp_create(srtp_t *session, const srtp_policy_t *policy);
+srtp_err_status_t srtp_create(srtp_t *session, const srtp_policy_t *policy);
 
 
 /**
@@ -595,14 +590,12 @@
  * stream.
  *
  * @return values:
- *    - err_status_ok           if stream creation succeded.
- *    - err_status_alloc_fail   if stream allocation failed
- *    - err_status_init_fail    if stream initialization failed.
+ *    - srtp_err_status_ok           if stream creation succeded.
+ *    - srtp_err_status_alloc_fail   if stream allocation failed
+ *    - srtp_err_status_init_fail    if stream initialization failed.
  */
 
-err_status_t
-srtp_add_stream(srtp_t session, 
-		const srtp_policy_t *policy);
+srtp_err_status_t srtp_add_stream(srtp_t session, const srtp_policy_t *policy);
 
 
 /**
@@ -621,16 +614,15 @@
  *          session.
  * 
  * @return
- *    - err_status_ok     if the stream deallocation succeded.
+ *    - srtp_err_status_ok     if the stream deallocation succeded.
  *    - [other]           otherwise.
  *
  */
 
-err_status_t
-srtp_remove_stream(srtp_t session, unsigned int ssrc);
+srtp_err_status_t srtp_remove_stream(srtp_t session, unsigned int ssrc);
 
 /**
- * @brief crypto_policy_set_rtp_default() sets a crypto policy
+ * @brief srtp_crypto_policy_set_rtp_default() sets a crypto policy
  * structure to the SRTP default policy for RTP protection.
  *
  * @param p is a pointer to the policy structure to be set 
@@ -648,39 +640,37 @@
  * 
  */
 
-void
-crypto_policy_set_rtp_default(crypto_policy_t *p);
+void srtp_crypto_policy_set_rtp_default(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_rtcp_default() sets a crypto policy
+ * @brief srtp_crypto_policy_set_rtcp_default() sets a crypto policy
  * structure to the SRTP default policy for RTCP protection.
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_rtcp_default(&p) sets the
- * crypto_policy_t at location p to the SRTP default policy for RTCP
+ * The function call srtp_crypto_policy_set_rtcp_default(&p) sets the
+ * srtp_crypto_policy_t at location p to the SRTP default policy for RTCP
  * protection, as defined in the specification.  This function is a
  * convenience that helps to avoid dealing directly with the policy
  * data structure.  You are encouraged to initialize policy elements
  * with this function call.  Doing so may allow your code to be
  * forward compatible with later versions of libSRTP that include more
- * elements in the crypto_policy_t datatype.
+ * elements in the srtp_crypto_policy_t datatype.
  * 
  * @return void.
  * 
  */
 
-void
-crypto_policy_set_rtcp_default(crypto_policy_t *p);
+void srtp_crypto_policy_set_rtcp_default(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_cm_128_hmac_sha1_80() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80() sets a crypto
  * policy structure to the SRTP default policy for RTP protection.
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function crypto_policy_set_aes_cm_128_hmac_sha1_80() is a
- * synonym for crypto_policy_set_rtp_default().  It conforms to the
+ * The function srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80() is a
+ * synonym for srtp_crypto_policy_set_rtp_default().  It conforms to the
  * naming convention used in RFC 4568 (SDP Security Descriptions for
  * Media Streams).
  * 
@@ -688,17 +678,17 @@
  * 
  */
 
-#define crypto_policy_set_aes_cm_128_hmac_sha1_80(p) crypto_policy_set_rtp_default(p)
+#define srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(p) srtp_crypto_policy_set_rtp_default(p)
 
 
 /**
- * @brief crypto_policy_set_aes_cm_128_hmac_sha1_32() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32() sets a crypto
  * policy structure to a short-authentication tag policy
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_cm_128_hmac_sha1_32(&p)
- * sets the crypto_policy_t at location p to use policy
+ * The function call srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(&p)
+ * sets the srtp_crypto_policy_t at location p to use policy
  * AES_CM_128_HMAC_SHA1_32 as defined in RFC 4568.
  * This policy uses AES-128
  * Counter Mode encryption and HMAC-SHA1 authentication, with an
@@ -711,7 +701,7 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @warning This crypto policy is intended for use in SRTP, but not in
  * SRTCP.  It is recommended that a policy that uses longer
@@ -722,19 +712,18 @@
  * 
  */
 
-void
-crypto_policy_set_aes_cm_128_hmac_sha1_32(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(srtp_crypto_policy_t *p);
 
 
 
 /**
- * @brief crypto_policy_set_aes_cm_128_null_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_cm_128_null_auth() sets a crypto
  * policy structure to an encryption-only policy
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_cm_128_null_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_cm_128_null_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-128 Counter Mode), but to use no authentication method.  This
  * policy is NOT RECOMMENDED unless it is unavoidable; see Section 7.5
  * of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt).
@@ -743,7 +732,7 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @warning This policy is NOT RECOMMENDED for SRTP unless it is
  * unavoidable, and it is NOT RECOMMENDED at all for SRTCP; see
@@ -753,18 +742,17 @@
  * 
  */
 
-void
-crypto_policy_set_aes_cm_128_null_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_cm_128_null_auth(srtp_crypto_policy_t *p);
 
 
 /**
- * @brief crypto_policy_set_null_cipher_hmac_sha1_80() sets a crypto
+ * @brief srtp_crypto_policy_set_null_cipher_hmac_sha1_80() sets a crypto
  * policy structure to an authentication-only policy
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_null_cipher_hmac_sha1_80(&p)
- * sets the crypto_policy_t at location p to use HMAC-SHA1 with an 80
+ * The function call srtp_crypto_policy_set_null_cipher_hmac_sha1_80(&p)
+ * sets the srtp_crypto_policy_t at location p to use HMAC-SHA1 with an 80
  * bit authentication tag to provide message authentication, but to
  * use no encryption.  This policy is NOT RECOMMENDED for SRTP unless
  * there is a requirement to forego encryption.  
@@ -773,7 +761,7 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @warning This policy is NOT RECOMMENDED for SRTP unless there is a
  * requirement to forego encryption.  
@@ -782,19 +770,18 @@
  * 
  */
 
-void
-crypto_policy_set_null_cipher_hmac_sha1_80(crypto_policy_t *p);
+void srtp_crypto_policy_set_null_cipher_hmac_sha1_80(srtp_crypto_policy_t *p);
 
 
 /**
- * @brief crypto_policy_set_aes_cm_256_hmac_sha1_80() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80() sets a crypto
  * policy structure to a encryption and authentication policy using AES-256 
  * for RTP protection.
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_cm_256_hmac_sha1_80(&p)
- * sets the crypto_policy_t at location p to use policy
+ * The function call srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&p)
+ * sets the srtp_crypto_policy_t at location p to use policy
  * AES_CM_256_HMAC_SHA1_80 as defined in
  * draft-ietf-avt-srtp-big-aes-03.txt.  This policy uses AES-256
  * Counter Mode encryption and HMAC-SHA1 authentication, with an 80 bit
@@ -804,24 +791,24 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @return void.
  * 
  */
 
-void crypto_policy_set_aes_cm_256_hmac_sha1_80(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(srtp_crypto_policy_t *p);
 
 
 /**
- * @brief crypto_policy_set_aes_cm_256_hmac_sha1_32() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32() sets a crypto
  * policy structure to a short-authentication tag policy using AES-256
  * encryption.
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_cm_256_hmac_sha1_32(&p)
- * sets the crypto_policy_t at location p to use policy
+ * The function call srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32(&p)
+ * sets the srtp_crypto_policy_t at location p to use policy
  * AES_CM_256_HMAC_SHA1_32 as defined in
  * draft-ietf-avt-srtp-big-aes-03.txt.  This policy uses AES-256
  * Counter Mode encryption and HMAC-SHA1 authentication, with an
@@ -834,7 +821,7 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @warning This crypto policy is intended for use in SRTP, but not in
  * SRTCP.  It is recommended that a policy that uses longer
@@ -845,17 +832,16 @@
  * 
  */
 
-void
-crypto_policy_set_aes_cm_256_hmac_sha1_32(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_cm_256_null_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_cm_256_null_auth() sets a crypto
  * policy structure to an encryption-only policy
  *
  * @param p is a pointer to the policy structure to be set
  *
- * The function call crypto_policy_set_aes_cm_256_null_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_cm_256_null_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-256 Counter Mode), but to use no authentication method.  This
  * policy is NOT RECOMMENDED unless it is unavoidable; see Section 7.5
  * of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt).
@@ -864,7 +850,7 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @warning This policy is NOT RECOMMENDED for SRTP unless it is
  * unavoidable, and it is NOT RECOMMENDED at all for SRTCP; see
@@ -873,17 +859,16 @@
  * @return void.
  *
  */
-void
-crypto_policy_set_aes_cm_256_null_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_cm_256_null_auth(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_gcm_128_8_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_gcm_128_8_auth() sets a crypto
  * policy structure to an AEAD encryption policy.
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_gcm_128_8_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_gcm_128_8_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-128 Galois Counter Mode) with 8 octet auth tag.  This
  * policy applies confidentiality and authentication to both the
  * RTP and RTCP packets.
@@ -892,22 +877,21 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @return void.
  * 
  */
-void
-crypto_policy_set_aes_gcm_128_8_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_gcm_128_8_auth(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_gcm_256_8_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_gcm_256_8_auth() sets a crypto
  * policy structure to an AEAD encryption policy
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_gcm_256_8_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_gcm_256_8_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-256 Galois Counter Mode) with 8 octet auth tag.  This 
  * policy applies confidentiality and authentication to both the
  * RTP and RTCP packets.
@@ -916,22 +900,21 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @return void.
  * 
  */
-void
-crypto_policy_set_aes_gcm_256_8_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_gcm_256_8_auth(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_gcm_128_8_only_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_gcm_128_8_only_auth() sets a crypto
  * policy structure to an AEAD authentication-only policy
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_gcm_128_8_only_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_gcm_128_8_only_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-128 Galois Counter Mode) with 8 octet auth tag.  This policy 
  * applies confidentiality and authentication to the RTP packets, 
  * but only authentication to the RTCP packets.
@@ -940,22 +923,21 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @return void.
  * 
  */
-void
-crypto_policy_set_aes_gcm_128_8_only_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_gcm_128_8_only_auth(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_gcm_256_8_only_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_gcm_256_8_only_auth() sets a crypto
  * policy structure to an AEAD authentication-only policy
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_gcm_256_8_only_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_gcm_256_8_only_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-256 Galois Counter Mode) with 8 octet auth tag.  This policy 
  * applies confidentiality and authentication to the RTP packets, 
  * but only authentication to the RTCP packets.
@@ -964,22 +946,21 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @return void.
  * 
  */
-void
-crypto_policy_set_aes_gcm_256_8_only_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_gcm_256_8_only_auth(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_gcm_128_16_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_gcm_128_16_auth() sets a crypto
  * policy structure to an AEAD encryption policy.
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_gcm_128_16_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_gcm_128_16_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-128 Galois Counter Mode) with 16 octet auth tag.  This
  * policy applies confidentiality and authentication to both the
  * RTP and RTCP packets.
@@ -988,22 +969,21 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @return void.
  * 
  */
-void
-crypto_policy_set_aes_gcm_128_16_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_gcm_128_16_auth(srtp_crypto_policy_t *p);
 
 /**
- * @brief crypto_policy_set_aes_gcm_256_16_auth() sets a crypto
+ * @brief srtp_crypto_policy_set_aes_gcm_256_16_auth() sets a crypto
  * policy structure to an AEAD encryption policy
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_aes_gcm_256_16_auth(&p) sets
- * the crypto_policy_t at location p to use the SRTP default cipher
+ * The function call srtp_crypto_policy_set_aes_gcm_256_16_auth(&p) sets
+ * the srtp_crypto_policy_t at location p to use the SRTP default cipher
  * (AES-256 Galois Counter Mode) with 16 octet auth tag.  This 
  * policy applies confidentiality and authentication to both the
  * RTP and RTCP packets.
@@ -1012,13 +992,12 @@
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  *
  * @return void.
  * 
  */
-void
-crypto_policy_set_aes_gcm_256_16_auth(crypto_policy_t *p);
+void srtp_crypto_policy_set_aes_gcm_256_16_auth(srtp_crypto_policy_t *p);
 
 
 /**
@@ -1033,12 +1012,11 @@
  * @param s is the srtp_t for the session to be deallocated.
  *
  * @return
- *    - err_status_ok             if there no problems.
- *    - err_status_dealloc_fail   a memory deallocation failure occured.
+ *    - srtp_err_status_ok             if there no problems.
+ *    - srtp_err_status_dealloc_fail   a memory deallocation failure occured.
  */
 
-err_status_t
-srtp_dealloc(srtp_t s);
+srtp_err_status_t srtp_dealloc(srtp_t s);
 
 
 /*
@@ -1061,57 +1039,53 @@
 
 
 /**
- * @brief crypto_policy_set_from_profile_for_rtp() sets a crypto policy
+ * @brief srtp_crypto_policy_set_from_profile_for_rtp() sets a crypto policy
  * structure to the appropriate value for RTP based on an srtp_profile_t
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_rtp_default(&policy, profile)
- * sets the crypto_policy_t at location policy to the policy for RTP
+ * The function call srtp_crypto_policy_set_rtp_default(&policy, profile)
+ * sets the srtp_crypto_policy_t at location policy to the policy for RTP
  * protection, as defined by the srtp_profile_t profile.
  * 
  * This function is a convenience that helps to avoid dealing directly
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  * 
  * @return values
- *     - err_status_ok         no problems were encountered
- *     - err_status_bad_param  the profile is not supported 
+ *     - srtp_err_status_ok         no problems were encountered
+ *     - srtp_err_status_bad_param  the profile is not supported 
  * 
  */
-err_status_t
-crypto_policy_set_from_profile_for_rtp(crypto_policy_t *policy, 
-				       srtp_profile_t profile);
+srtp_err_status_t srtp_crypto_policy_set_from_profile_for_rtp(srtp_crypto_policy_t *policy, srtp_profile_t profile);
 
 
 
 
 /**
- * @brief crypto_policy_set_from_profile_for_rtcp() sets a crypto policy
+ * @brief srtp_crypto_policy_set_from_profile_for_rtcp() sets a crypto policy
  * structure to the appropriate value for RTCP based on an srtp_profile_t
  *
  * @param p is a pointer to the policy structure to be set 
  * 
- * The function call crypto_policy_set_rtcp_default(&policy, profile)
- * sets the crypto_policy_t at location policy to the policy for RTCP
+ * The function call srtp_crypto_policy_set_rtcp_default(&policy, profile)
+ * sets the srtp_crypto_policy_t at location policy to the policy for RTCP
  * protection, as defined by the srtp_profile_t profile.
  * 
  * This function is a convenience that helps to avoid dealing directly
  * with the policy data structure.  You are encouraged to initialize
  * policy elements with this function call.  Doing so may allow your
  * code to be forward compatible with later versions of libSRTP that
- * include more elements in the crypto_policy_t datatype.
+ * include more elements in the srtp_crypto_policy_t datatype.
  * 
  * @return values
- *     - err_status_ok         no problems were encountered
- *     - err_status_bad_param  the profile is not supported 
+ *     - srtp_err_status_ok         no problems were encountered
+ *     - srtp_err_status_bad_param  the profile is not supported 
  * 
  */
-err_status_t
-crypto_policy_set_from_profile_for_rtcp(crypto_policy_t *policy, 
-				       srtp_profile_t profile);
+srtp_err_status_t srtp_crypto_policy_set_from_profile_for_rtcp(srtp_crypto_policy_t *policy, srtp_profile_t profile);
 
 /**
  * @brief returns the master key length for a given SRTP profile
@@ -1129,7 +1103,7 @@
 /**
  * @brief appends the salt to the key
  *
- * The function call append_salt_to_key(k, klen, s, slen) 
+ * The function call srtp_append_salt_to_key(k, klen, s, slen) 
  * copies the string s to the location at klen bytes following
  * the location k.  
  *
@@ -1139,8 +1113,8 @@
  */
 
 void
-append_salt_to_key(unsigned char *key, unsigned int bytes_in_key,
-		   unsigned char *salt, unsigned int bytes_in_salt);
+srtp_append_salt_to_key(unsigned char *key, unsigned int bytes_in_key,
+	  	        unsigned char *salt, unsigned int bytes_in_salt);
 
 
 
@@ -1175,7 +1149,7 @@
  * 
  * The function call srtp_protect_rtcp(ctx, rtp_hdr, len_ptr) applies
  * SRTCP protection to the RTCP packet rtcp_hdr (which has length
- * *len_ptr) using the SRTP session context ctx.  If err_status_ok is
+ * *len_ptr) using the SRTP session context ctx.  If srtp_err_status_ok is
  * returned, then rtp_hdr points to the resulting SRTCP packet and
  * *len_ptr is the number of octets in that packet; otherwise, no
  * assumptions should be made about the value of either data elements.
@@ -1197,19 +1171,18 @@
  *
  * @param pkt_octet_len is a pointer to the length in octets of the
  * complete RTCP packet (header and body) before the function call,
- * and of the complete SRTCP packet after the call, if err_status_ok
+ * and of the complete SRTCP packet after the call, if srtp_err_status_ok
  * was returned.  Otherwise, the value of the data to which it points
  * is undefined.
  *
  * @return 
- *    - err_status_ok            if there were no problems.
+ *    - srtp_err_status_ok            if there were no problems.
  *    - [other]                  if there was a failure in 
  *                               the cryptographic mechanisms.
  */
 	     
 
-err_status_t 
-srtp_protect_rtcp(srtp_t ctx, void *rtcp_hdr, int *pkt_octet_len);
+srtp_err_status_t srtp_protect_rtcp(srtp_t ctx, void *rtcp_hdr, int *pkt_octet_len);
 
 /**
  * @brief srtp_unprotect_rtcp() is the Secure RTCP receiver-side packet
@@ -1218,7 +1191,7 @@
  * The function call srtp_unprotect_rtcp(ctx, srtp_hdr, len_ptr)
  * verifies the Secure RTCP protection of the SRTCP packet pointed to
  * by srtcp_hdr (which has length *len_ptr), using the SRTP session
- * context ctx.  If err_status_ok is returned, then srtcp_hdr points
+ * context ctx.  If srtp_err_status_ok is returned, then srtcp_hdr points
  * to the resulting RTCP packet and *len_ptr is the number of octets
  * in that packet; otherwise, no assumptions should be made about the
  * value of either data elements.
@@ -1231,27 +1204,26 @@
  *
  * @param srtcp_hdr is a pointer to the header of the SRTCP packet
  * (before the call).  After the function returns, it points to the
- * rtp packet if err_status_ok was returned; otherwise, the value of
+ * rtp packet if srtp_err_status_ok was returned; otherwise, the value of
  * the data to which it points is undefined.
  *
  * @param pkt_octet_len is a pointer to the length in octets of the
  * complete SRTCP packet (header and body) before the function call,
- * and of the complete rtp packet after the call, if err_status_ok was
+ * and of the complete rtp packet after the call, if srtp_err_status_ok was
  * returned.  Otherwise, the value of the data to which it points is
  * undefined.
  *
  * @return 
- *    - err_status_ok          if the RTCP packet is valid.
- *    - err_status_auth_fail   if the SRTCP packet failed the message 
+ *    - srtp_err_status_ok          if the RTCP packet is valid.
+ *    - srtp_err_status_auth_fail   if the SRTCP packet failed the message 
  *                             authentication check.
- *    - err_status_replay_fail if the SRTCP packet is a replay (e.g. has
+ *    - srtp_err_status_replay_fail if the SRTCP packet is a replay (e.g. has
  *                             already been processed and accepted).
  *    - [other]  if there has been an error in the cryptographic mechanisms.
  *
  */
 
-err_status_t 
-srtp_unprotect_rtcp(srtp_t ctx, void *srtcp_hdr, int *pkt_octet_len);
+srtp_err_status_t srtp_unprotect_rtcp(srtp_t ctx, void *srtcp_hdr, int *pkt_octet_len);
 
 /**
  * @}
@@ -1405,8 +1377,7 @@
  *             will be used by libSRTP to handle events.
  */
 
-err_status_t
-srtp_install_event_handler(srtp_event_handler_func_t func);
+srtp_err_status_t srtp_install_event_handler(srtp_event_handler_func_t func);
 
 /**
  * @brief Returns the version string of the library. 
diff --git a/include/srtp_priv.h b/include/srtp_priv.h
index de6bf6c..9af1b69 100644
--- a/include/srtp_priv.h
+++ b/include/srtp_priv.h
@@ -67,27 +67,20 @@
  * srtp_get_stream(ssrc) returns a pointer to the stream corresponding
  * to ssrc, or NULL if no stream exists for that ssrc
  */
-
-srtp_stream_t 
-srtp_get_stream(srtp_t srtp, uint32_t ssrc);
+srtp_stream_t srtp_get_stream(srtp_t srtp, uint32_t ssrc);
 
 
 /*
  * srtp_stream_init_keys(s, k) (re)initializes the srtp_stream_t s by
  * deriving all of the needed keys using the KDF and the key k.
  */
-
-
-err_status_t
-srtp_stream_init_keys(srtp_stream_t srtp, const void *key);
+srtp_err_status_t srtp_stream_init_keys(srtp_stream_t srtp, const void *key);
 
 /*
  * srtp_stream_init(s, p) initializes the srtp_stream_t s to 
  * use the policy at the location p
  */
-err_status_t
-srtp_stream_init(srtp_stream_t srtp, 
-		 const srtp_policy_t *p);
+srtp_err_status_t srtp_stream_init(srtp_stream_t srtp, const srtp_policy_t *p);
 
 
 /*
@@ -113,11 +106,11 @@
   cipher_t  *rtp_cipher;
   auth_t    *rtp_auth;
   rdbx_t     rtp_rdbx;
-  sec_serv_t rtp_services;
+  srtp_sec_serv_t rtp_services;
   cipher_t  *rtcp_cipher;
   auth_t    *rtcp_auth;
   rdb_t      rtcp_rdb;
-  sec_serv_t rtcp_services;
+  srtp_sec_serv_t rtcp_services;
   key_limit_ctx_t *limit;
   direction_t direction;
   int        allow_repeat_tx;
diff --git a/srtp/ekt.c b/srtp/ekt.c
index 335a21f..a42e488 100644
--- a/srtp/ekt.c
+++ b/srtp/ekt.c
@@ -119,7 +119,7 @@
 }
 
 
-err_status_t 
+srtp_err_status_t 
 ekt_alloc(ekt_stream_t *stream_data, ekt_policy_t policy) {
 
   /*
@@ -128,21 +128,21 @@
    */
   if (!policy) {
     *stream_data = NULL;
-    return err_status_ok;
+    return srtp_err_status_ok;
   }
 
   /* TODO */
   *stream_data = NULL;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 ekt_stream_init_from_policy(ekt_stream_t stream_data, ekt_policy_t policy) {
   if (!stream_data)
-    return err_status_ok;
+    return srtp_err_status_ok;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -162,11 +162,11 @@
  * the EKT data from an SRTCP trailer.  
  */
 
-err_status_t
+srtp_err_status_t
 srtp_stream_init_from_ekt(srtp_stream_t stream,			  
 			  const void *srtcp_hdr,
 			  unsigned pkt_octet_len) {
-  err_status_t err;
+  srtp_err_status_t err;
   const uint8_t *master_key;
   srtp_policy_t srtp_policy;
   uint32_t roc;
@@ -176,10 +176,10 @@
    */
   if (stream->ekt->data->spi != 
       srtcp_packet_get_ekt_spi(srtcp_hdr, pkt_octet_len))
-    return err_status_no_ctx;
+    return srtp_err_status_no_ctx;
 
   if (stream->ekt->data->ekt_cipher_type != EKT_CIPHER_AES_128_ECB)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* decrypt the Encrypted Master Key field */
   master_key = srtcp_packet_get_emk_location(srtcp_hdr, pkt_octet_len);
@@ -196,7 +196,7 @@
   err = srtp_stream_init(stream, &srtp_policy);
   if (err) return err;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 void
diff --git a/srtp/srtp.c b/srtp/srtp.c
index 1c3aaa7..f5a3764 100644
--- a/srtp/srtp.c
+++ b/srtp/srtp.c
@@ -113,11 +113,11 @@
     return rv;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_stream_alloc(srtp_stream_ctx_t **str_ptr,
 		  const srtp_policy_t *p) {
   srtp_stream_ctx_t *str;
-  err_status_t stat;
+  srtp_err_status_t stat;
 
   /*
    * This function allocates the stream context, rtp and rtcp ciphers
@@ -130,7 +130,7 @@
   /* allocate srtp stream and set str_ptr */
   str = (srtp_stream_ctx_t *) crypto_alloc(sizeof(srtp_stream_ctx_t));
   if (str == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   *str_ptr = str;  
   
   /* allocate cipher */
@@ -160,7 +160,7 @@
     auth_dealloc(str->rtp_auth);
     cipher_dealloc(str->rtp_cipher);
     crypto_free(str); 
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   }
 
   /*
@@ -205,12 +205,12 @@
    return stat;    
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_stream_dealloc(srtp_t session, srtp_stream_ctx_t *stream) { 
-  err_status_t status;
+  srtp_err_status_t status;
   
   /*
    * we use a conservative deallocation strategy - if any deallocation
@@ -288,7 +288,7 @@
   /* deallocate srtp stream context */
   crypto_free(stream);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -300,11 +300,11 @@
  * the SSRC
  */
 
-err_status_t
+srtp_err_status_t
 srtp_stream_clone(const srtp_stream_ctx_t *stream_template, 
 		  uint32_t ssrc, 
 		  srtp_stream_ctx_t **str_ptr) {
-  err_status_t status;
+  srtp_err_status_t status;
   srtp_stream_ctx_t *str;
 
   debug_print(mod_srtp, "cloning stream (SSRC: 0x%08x)", ssrc);
@@ -312,7 +312,7 @@
   /* allocate srtp stream and set str_ptr */
   str = (srtp_stream_ctx_t *) crypto_alloc(sizeof(srtp_stream_ctx_t));
   if (str == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   *str_ptr = str;  
 
   /* set cipher and auth pointers to those of the template */
@@ -358,7 +358,7 @@
   /* defensive coding */
   str->next = NULL;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -397,10 +397,10 @@
   cipher_t *cipher;    /* cipher used for key derivation  */  
 } srtp_kdf_t;
 
-err_status_t
-srtp_kdf_init(srtp_kdf_t *kdf, cipher_type_id_t cipher_id, const uint8_t *key, int length) {
+srtp_err_status_t
+srtp_kdf_init(srtp_kdf_t *kdf, srtp_cipher_type_id_t cipher_id, const uint8_t *key, int length) {
 
-  err_status_t stat;
+  srtp_err_status_t stat;
   stat = crypto_kernel_alloc_cipher(cipher_id, &kdf->cipher, length, 0);
   if (stat)
     return stat;
@@ -411,15 +411,15 @@
     return stat;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_kdf_generate(srtp_kdf_t *kdf, srtp_prf_label label,
 		  uint8_t *key, unsigned int length) {
 
   v128_t nonce;
-  err_status_t status;
+  srtp_err_status_t status;
   
   /* set eigth octet of nonce to <label>, set the rest of it to zero */
   v128_set_to_zero(&nonce);
@@ -435,18 +435,18 @@
   if (status)
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_kdf_clear(srtp_kdf_t *kdf) {
-  err_status_t status;
+  srtp_err_status_t status;
   status = cipher_dealloc(kdf->cipher);
   if (status)
     return status;
   kdf->cipher = NULL;
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
 /*
@@ -483,9 +483,9 @@
   }
 }
 
-err_status_t
+srtp_err_status_t
 srtp_stream_init_keys(srtp_stream_ctx_t *srtp, const void *key) {
-  err_status_t stat;
+  srtp_err_status_t stat;
   srtp_kdf_t kdf;
   uint8_t tmp_key[MAX_SRTP_KEY_LEN];
   int kdf_keylen = 30, rtp_keylen, rtcp_keylen;
@@ -525,7 +525,7 @@
   /* initialize KDF state     */
   stat = srtp_kdf_init(&kdf, AES_ICM, (const uint8_t *)tmp_key, kdf_keylen);
   if (stat) {
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
   
   /* generate encryption key  */
@@ -534,7 +534,7 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
   debug_print(mod_srtp, "cipher key: %s", 
 	      octet_string_hex_string(tmp_key, rtp_base_key_len));
@@ -552,7 +552,7 @@
     if (stat) {
       /* zeroize temp buffer */
       octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-      return err_status_init_fail;
+      return srtp_err_status_init_fail;
     }
     memcpy(srtp->salt, tmp_key + rtp_base_key_len, SRTP_AEAD_SALT_LEN);
   }
@@ -566,7 +566,7 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /* generate authentication key */
@@ -575,7 +575,7 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
   debug_print(mod_srtp, "auth key:   %s",
 	      octet_string_hex_string(tmp_key, 
@@ -586,7 +586,7 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /*
@@ -603,7 +603,7 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /* 
@@ -620,7 +620,7 @@
     if (stat) {
       /* zeroize temp buffer */
       octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-      return err_status_init_fail;
+      return srtp_err_status_init_fail;
     }
     memcpy(srtp->c_salt, tmp_key + rtcp_base_key_len, SRTP_AEAD_SALT_LEN);
   }
@@ -636,7 +636,7 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /* generate authentication key */
@@ -645,7 +645,7 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   debug_print(mod_srtp, "rtcp auth key:   %s",
@@ -657,22 +657,22 @@
   if (stat) {
     /* zeroize temp buffer */
     octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /* clear memory then return */
   stat = srtp_kdf_clear(&kdf);
   octet_string_set_to_zero(tmp_key, MAX_SRTP_KEY_LEN);  
   if (stat)
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_stream_init(srtp_stream_ctx_t *srtp, 
 		  const srtp_policy_t *p) {
-  err_status_t err;
+  srtp_err_status_t err;
 
    debug_print(mod_srtp, "initializing stream (SSRC: 0x%08x)", 
 	       p->ssrc.value);
@@ -683,7 +683,7 @@
     * calculated.   Let a window size of 0 imply the default value. */
 
    if (p->window_size != 0 && (p->window_size < 64 || p->window_size >= 0x8000))
-     return err_status_bad_param;
+     return srtp_err_status_bad_param;
 
    if (p->window_size != 0)
      err = rdbx_init(&srtp->rtp_rdbx, p->window_size);
@@ -723,7 +723,7 @@
    /* guard against uninitialized memory: allow only 0 or 1 here */
    if (p->allow_repeat_tx != 0 && p->allow_repeat_tx != 1) {
      rdbx_dealloc(&srtp->rtp_rdbx);
-     return err_status_bad_param;
+     return srtp_err_status_bad_param;
    }
    srtp->allow_repeat_tx = p->allow_repeat_tx;
 
@@ -746,7 +746,7 @@
      return err;
    }
 
-   return err_status_ok;  
+   return srtp_err_status_ok;  
  }
 
 
@@ -791,7 +791,7 @@
 
  static srtp_event_handler_func_t *srtp_event_handler = srtp_event_reporter;
 
- err_status_t
+ srtp_err_status_t
  srtp_install_event_handler(srtp_event_handler_func_t func) {
 
    /* 
@@ -802,7 +802,7 @@
 
    /* set global event handling function */
    srtp_event_handler = func;
-   return err_status_ok;
+   return srtp_err_status_ok;
  }
 
 /*
@@ -879,7 +879,7 @@
  * which currently supports AES-GCM encryption.  All packets are
  * encrypted and authenticated.
  */
-static err_status_t
+static srtp_err_status_t
 srtp_protect_aead (srtp_ctx_t *ctx, srtp_stream_ctx_t *stream, 
 	           void *rtp_hdr, unsigned int *pkt_octet_len)
 {
@@ -888,7 +888,7 @@
     unsigned int enc_octet_len = 0; /* number of octets in encrypted portion  */
     xtd_seq_num_t est;          /* estimated xtd_seq_num_t of *hdr        */
     int delta;                  /* delta of local pkt idx and that in hdr */
-    err_status_t status;
+    srtp_err_status_t status;
     int tag_len;
     v128_t iv;
     unsigned int aad_len;
@@ -905,7 +905,7 @@
         break;
     case key_event_hard_limit:
         srtp_handle_event(ctx, stream, event_key_hard_limit);
-        return err_status_key_expired;
+        return srtp_err_status_key_expired;
     case key_event_soft_limit:
     default:
         srtp_handle_event(ctx, stream, event_key_soft_limit);
@@ -927,7 +927,7 @@
          enc_start += (ntohs(xtn_hdr->length) + 1);
      }
      if (!((uint8_t*)enc_start < (uint8_t*)hdr + *pkt_octet_len))
-         return err_status_parse_err;
+         return srtp_err_status_parse_err;
      enc_octet_len = (unsigned int)(*pkt_octet_len -
                                     ((uint8_t*)enc_start - (uint8_t*)hdr));
 
@@ -938,7 +938,7 @@
     delta = rdbx_estimate_index(&stream->rtp_rdbx, &est, ntohs(hdr->seq));
     status = rdbx_check(&stream->rtp_rdbx, delta);
     if (status) {
-	if (status != err_status_replay_fail || !stream->allow_repeat_tx) {
+	if (status != srtp_err_status_replay_fail || !stream->allow_repeat_tx) {
 	    return status;  /* we've been asked to reuse an index */
 	}
     } else {
@@ -958,7 +958,7 @@
     srtp_calc_aead_iv(stream, &iv, &est, hdr);
     status = cipher_set_iv(stream->rtp_cipher, &iv, direction_encrypt);
     if (status) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
 
     /* shift est, put into network byte order */
@@ -976,14 +976,14 @@
     aad_len = (uint8_t *)enc_start - (uint8_t *)hdr;
     status = cipher_set_aad(stream->rtp_cipher, (uint8_t*)hdr, aad_len);
     if (status) {
-        return ( err_status_cipher_fail);
+        return ( srtp_err_status_cipher_fail);
     }
 
     /* Encrypt the payload  */
     status = cipher_encrypt(stream->rtp_cipher,
                             (uint8_t*)enc_start, &enc_octet_len);
     if (status) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
     /*
      * If we're doing GCM, we need to get the tag
@@ -992,14 +992,14 @@
     status = cipher_get_tag(stream->rtp_cipher, 
                             (uint8_t*)enc_start+enc_octet_len, &tag_len);
     if (status) {
-	return ( err_status_cipher_fail);
+	return ( srtp_err_status_cipher_fail);
     }
     enc_octet_len += tag_len;
 
     /* increase the packet length by the length of the auth tag */
     *pkt_octet_len += tag_len;
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 
@@ -1010,7 +1010,7 @@
  * of the packet stream and is automatically checked by GCM
  * when decrypting the payload.
  */
-static err_status_t
+static srtp_err_status_t
 srtp_unprotect_aead (srtp_ctx_t *ctx, srtp_stream_ctx_t *stream, int delta, 
 	             xtd_seq_num_t est, void *srtp_hdr, unsigned int *pkt_octet_len)
 {
@@ -1018,7 +1018,7 @@
     uint32_t *enc_start;        /* pointer to start of encrypted portion  */
     unsigned int enc_octet_len = 0; /* number of octets in encrypted portion */
     v128_t iv;
-    err_status_t status;
+    srtp_err_status_t status;
     int tag_len;
     unsigned int aad_len;
 
@@ -1039,7 +1039,7 @@
     srtp_calc_aead_iv(stream, &iv, &est, hdr);
     status = cipher_set_iv(stream->rtp_cipher, &iv, direction_decrypt);
     if (status) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
 
     /*
@@ -1054,7 +1054,7 @@
         enc_start += (ntohs(xtn_hdr->length) + 1);
     }
     if (!((uint8_t*)enc_start < (uint8_t*)hdr + *pkt_octet_len))
-        return err_status_parse_err;
+        return srtp_err_status_parse_err;
     /*
      * We pass the tag down to the cipher when doing GCM mode 
      */
@@ -1067,7 +1067,7 @@
      * as the tag length.
      */
     if (enc_octet_len < tag_len) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
 
     /*
@@ -1083,7 +1083,7 @@
         break;
     case key_event_hard_limit:
         srtp_handle_event(ctx, stream, event_key_hard_limit);
-        return err_status_key_expired;
+        return srtp_err_status_key_expired;
     default:
         break;
     }
@@ -1094,7 +1094,7 @@
     aad_len = (uint8_t *)enc_start - (uint8_t *)hdr;
     status = cipher_set_aad(stream->rtp_cipher, (uint8_t*)hdr, aad_len);
     if (status) {
-        return ( err_status_cipher_fail);
+        return ( srtp_err_status_cipher_fail);
     }
 
     /* Decrypt the ciphertext.  This also checks the auth tag based 
@@ -1160,13 +1160,13 @@
     /* decrease the packet length by the length of the auth tag */
     *pkt_octet_len -= tag_len;
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 
 
 
- err_status_t
+ srtp_err_status_t
  srtp_protect(srtp_ctx_t *ctx, void *rtp_hdr, int *pkt_octet_len) {
    srtp_hdr_t *hdr = (srtp_hdr_t *)rtp_hdr;
    uint32_t *enc_start;        /* pointer to start of encrypted portion  */
@@ -1175,7 +1175,7 @@
    xtd_seq_num_t est;          /* estimated xtd_seq_num_t of *hdr        */
    int delta;                  /* delta of local pkt idx and that in hdr */
    uint8_t *auth_tag = NULL;   /* location of auth_tag within packet     */
-   err_status_t status;   
+   srtp_err_status_t status;   
    int tag_len;
    srtp_stream_ctx_t *stream;
    int prefix_len;
@@ -1186,7 +1186,7 @@
 
    /* check the packet length - it must at least contain a full header */
    if (*pkt_octet_len < octets_in_rtp_header)
-     return err_status_bad_param;
+     return srtp_err_status_bad_param;
 
    /*
     * look up ssrc in srtp_stream list, and process the packet with
@@ -1217,7 +1217,7 @@
        stream = new_stream;
      } else {
        /* no template stream, so we return an error */
-       return err_status_no_ctx;
+       return srtp_err_status_no_ctx;
      } 
    }
 
@@ -1257,7 +1257,7 @@
     break; 
   case key_event_hard_limit:
     srtp_handle_event(ctx, stream, event_key_hard_limit);
-	return err_status_key_expired;
+	return srtp_err_status_key_expired;
   default:
     break;
   }
@@ -1279,7 +1279,7 @@
        srtp_hdr_xtnd_t *xtn_hdr = (srtp_hdr_xtnd_t *)enc_start;
        enc_start += (ntohs(xtn_hdr->length) + 1);
        if (!((uint8_t*)enc_start < (uint8_t*)hdr + *pkt_octet_len))
-         return err_status_parse_err;
+         return srtp_err_status_parse_err;
      }
      enc_octet_len = (unsigned int)(*pkt_octet_len -
                                     ((uint8_t*)enc_start - (uint8_t*)hdr));
@@ -1307,7 +1307,7 @@
    delta = rdbx_estimate_index(&stream->rtp_rdbx, &est, ntohs(hdr->seq));
    status = rdbx_check(&stream->rtp_rdbx, delta);
    if (status) {
-     if (status != err_status_replay_fail || !stream->allow_repeat_tx)
+     if (status != srtp_err_status_replay_fail || !stream->allow_repeat_tx)
        return status;  /* we've been asked to reuse an index */
    }
    else
@@ -1351,7 +1351,7 @@
      status = cipher_set_iv(stream->rtp_cipher, &iv, direction_encrypt);
    }
    if (status)
-     return err_status_cipher_fail;
+     return srtp_err_status_cipher_fail;
 
    /* shift est, put into network byte order */
 #ifdef NO_64BIT_MATH
@@ -1372,7 +1372,7 @@
     if (prefix_len) {
       status = cipher_output(stream->rtp_cipher, auth_tag, prefix_len);
       if (status)
-	return err_status_cipher_fail;
+	return srtp_err_status_cipher_fail;
       debug_print(mod_srtp, "keystream prefix: %s", 
 		  octet_string_hex_string(auth_tag, prefix_len));
     }
@@ -1383,7 +1383,7 @@
     status = cipher_encrypt(stream->rtp_cipher, 
 			    (uint8_t *)enc_start, &enc_octet_len);
     if (status)
-      return err_status_cipher_fail;
+      return srtp_err_status_cipher_fail;
   }
 
   /*
@@ -1407,7 +1407,7 @@
     debug_print(mod_srtp, "srtp auth tag:    %s", 
 		octet_string_hex_string(auth_tag, tag_len));
     if (status)
-      return err_status_auth_fail;   
+      return srtp_err_status_auth_fail;   
 
   }
 
@@ -1417,11 +1417,11 @@
     *pkt_octet_len += tag_len;
   }
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
 
-err_status_t
+srtp_err_status_t
 srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
   srtp_hdr_t *hdr = (srtp_hdr_t *)srtp_hdr;
   uint32_t *enc_start;      /* pointer to start of encrypted portion  */
@@ -1431,7 +1431,7 @@
   xtd_seq_num_t est;        /* estimated xtd_seq_num_t of *hdr        */
   int delta;                /* delta of local pkt idx and that in hdr */
   v128_t iv;
-  err_status_t status;
+  srtp_err_status_t status;
   srtp_stream_ctx_t *stream;
   uint8_t tmp_tag[SRTP_MAX_TAG_LEN];
   int tag_len, prefix_len;
@@ -1442,7 +1442,7 @@
 
   /* check the packet length - it must at least contain a full header */
   if (*pkt_octet_len < octets_in_rtp_header)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /*
    * look up ssrc in srtp_stream list, and process the packet with 
@@ -1475,7 +1475,7 @@
        * no stream corresponding to SSRC found, and we don't do
        * key-sharing, so return an error
        */
-      return err_status_no_ctx;
+      return srtp_err_status_no_ctx;
     }
   } else {
   
@@ -1536,7 +1536,7 @@
     status = cipher_set_iv(stream->rtp_cipher, &iv, direction_decrypt);
   }
   if (status)
-    return err_status_cipher_fail;
+    return srtp_err_status_cipher_fail;
 
   /* shift est, put into network byte order */
 #ifdef NO_64BIT_MATH
@@ -1562,7 +1562,7 @@
       enc_start += (ntohs(xtn_hdr->length) + 1);
     }  
     if (!((uint8_t*)enc_start < (uint8_t*)hdr + *pkt_octet_len))
-      return err_status_parse_err;
+      return srtp_err_status_parse_err;
     enc_octet_len = (uint32_t)(*pkt_octet_len - tag_len -
                                ((uint8_t*)enc_start - (uint8_t*)hdr));
   } else {
@@ -1602,7 +1602,7 @@
       debug_print(mod_srtp, "keystream prefix: %s", 
 		  octet_string_hex_string(tmp_tag, prefix_len));
       if (status)
-	return err_status_cipher_fail;
+	return srtp_err_status_cipher_fail;
     } 
 
     /* initialize auth func context */
@@ -1621,10 +1621,10 @@
     debug_print(mod_srtp, "packet auth tag:      %s", 
 		octet_string_hex_string(auth_tag, tag_len));
     if (status)
-      return err_status_auth_fail;   
+      return srtp_err_status_auth_fail;   
 
     if (octet_string_is_eq(tmp_tag, auth_tag, tag_len))
-      return err_status_auth_fail;
+      return srtp_err_status_auth_fail;
   }
 
   /* 
@@ -1640,7 +1640,7 @@
     break; 
   case key_event_hard_limit:
     srtp_handle_event(ctx, stream, event_key_hard_limit);
-    return err_status_key_expired;
+    return srtp_err_status_key_expired;
   default:
     break;
   }
@@ -1650,7 +1650,7 @@
     status = cipher_decrypt(stream->rtp_cipher, 
 			    (uint8_t *)enc_start, &enc_octet_len);
     if (status)
-      return err_status_cipher_fail;
+      return srtp_err_status_cipher_fail;
   }
 
   /* 
@@ -1707,12 +1707,12 @@
   /* decrease the packet length by the length of the auth tag */
   *pkt_octet_len -= tag_len;
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
-err_status_t
+srtp_err_status_t
 srtp_init() {
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* initialize crypto kernel */
   status = crypto_kernel_init();
@@ -1724,12 +1724,12 @@
   if (status)
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_shutdown() {
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* shut down crypto kernel */
   status = crypto_kernel_shutdown();
@@ -1738,7 +1738,7 @@
 
   /* shutting down crypto kernel frees the srtp debug module as well */
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -1784,10 +1784,10 @@
   return NULL;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_dealloc(srtp_t session) {
   srtp_stream_ctx_t *stream;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /*
    * we take a conservative deallocation strategy - if we encounter an
@@ -1829,19 +1829,19 @@
   /* deallocate session context */
   crypto_free(session);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 srtp_add_stream(srtp_t session, 
 		const srtp_policy_t *policy)  {
-  err_status_t status;
+  srtp_err_status_t status;
   srtp_stream_t tmp;
 
   /* sanity check arguments */
   if ((session == NULL) || (policy == NULL) || (policy->key == NULL))
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* allocate stream  */
   status = srtp_stream_alloc(&tmp, policy);
@@ -1867,14 +1867,14 @@
   switch (policy->ssrc.type) {
   case (ssrc_any_outbound):
     if (session->stream_template) {
-      return err_status_bad_param;
+      return srtp_err_status_bad_param;
     }
     session->stream_template = tmp;
     session->stream_template->direction = dir_srtp_sender;
     break;
   case (ssrc_any_inbound):
     if (session->stream_template) {
-      return err_status_bad_param;
+      return srtp_err_status_bad_param;
     }
     session->stream_template = tmp;
     session->stream_template->direction = dir_srtp_receiver;
@@ -1886,27 +1886,27 @@
   case (ssrc_undefined):
   default:
     crypto_free(tmp);
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   }
     
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 srtp_create(srtp_t *session,               /* handle for session     */ 
 	    const srtp_policy_t *policy) { /* SRTP policy (list)     */
-  err_status_t stat;
+  srtp_err_status_t stat;
   srtp_ctx_t *ctx;
 
   /* sanity check arguments */
   if (session == NULL)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* allocate srtp context and set ctx_ptr */
   ctx = (srtp_ctx_t *) crypto_alloc(sizeof(srtp_ctx_t));
   if (ctx == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   *session = ctx;
 
   /* 
@@ -1929,18 +1929,18 @@
     policy = policy->next;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 srtp_remove_stream(srtp_t session, uint32_t ssrc) {
   srtp_stream_ctx_t *stream, *last_stream;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* sanity check arguments */
   if (session == NULL)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   
   /* find stream in list; complain if not found */
   last_stream = stream = session->stream_list;
@@ -1949,7 +1949,7 @@
     stream = stream->next;
   }
   if (stream == NULL)
-    return err_status_no_ctx;
+    return srtp_err_status_no_ctx;
 
   /* remove stream from the list */
   if (last_stream == stream)
@@ -1963,7 +1963,7 @@
   if (status)
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -1982,7 +1982,7 @@
 /* There are hard-coded 16's for base_key_len in the key generation code */
 
 void
-crypto_policy_set_rtp_default(crypto_policy_t *p) {
+srtp_crypto_policy_set_rtp_default(srtp_crypto_policy_t *p) {
 
   p->cipher_type     = AES_ICM;           
   p->cipher_key_len  = 30;                /* default 128 bits per RFC 3711 */
@@ -1994,7 +1994,7 @@
 }
 
 void
-crypto_policy_set_rtcp_default(crypto_policy_t *p) {
+srtp_crypto_policy_set_rtcp_default(srtp_crypto_policy_t *p) {
 
   p->cipher_type     = AES_ICM;           
   p->cipher_key_len  = 30;                 /* default 128 bits per RFC 3711 */
@@ -2006,7 +2006,7 @@
 }
 
 void
-crypto_policy_set_aes_cm_128_hmac_sha1_32(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(srtp_crypto_policy_t *p) {
 
   /*
    * corresponds to RFC 4568
@@ -2025,7 +2025,7 @@
 
 
 void
-crypto_policy_set_aes_cm_128_null_auth(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_cm_128_null_auth(srtp_crypto_policy_t *p) {
 
   /*
    * corresponds to RFC 4568
@@ -2044,7 +2044,7 @@
 
 
 void
-crypto_policy_set_null_cipher_hmac_sha1_80(crypto_policy_t *p) {
+srtp_crypto_policy_set_null_cipher_hmac_sha1_80(srtp_crypto_policy_t *p) {
 
   /*
    * corresponds to RFC 4568
@@ -2061,7 +2061,7 @@
 
 
 void
-crypto_policy_set_aes_cm_256_hmac_sha1_80(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(srtp_crypto_policy_t *p) {
 
   /*
    * corresponds to draft-ietf-avt-big-aes-03.txt
@@ -2077,7 +2077,7 @@
 
 
 void
-crypto_policy_set_aes_cm_256_hmac_sha1_32(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32(srtp_crypto_policy_t *p) {
 
   /*
    * corresponds to draft-ietf-avt-big-aes-03.txt
@@ -2097,7 +2097,7 @@
  * AES-256 with no authentication.
  */
 void
-crypto_policy_set_aes_cm_256_null_auth (crypto_policy_t *p)
+srtp_crypto_policy_set_aes_cm_256_null_auth (srtp_crypto_policy_t *p)
 {
     p->cipher_type     = AES_ICM;
     p->cipher_key_len  = 46;
@@ -2112,9 +2112,9 @@
  * AES-128 GCM mode with 8 octet auth tag. 
  */
 void
-crypto_policy_set_aes_gcm_128_8_auth(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_gcm_128_8_auth(srtp_crypto_policy_t *p) {
   p->cipher_type     = AES_128_GCM;           
-  p->cipher_key_len  = AES_128_GCM_KEYSIZE_WSALT; 
+  p->cipher_key_len  = SRTP_AES_128_GCM_KEYSIZE_WSALT; 
   p->auth_type       = NULL_AUTH; /* GCM handles the auth for us */            
   p->auth_key_len    = 0; 
   p->auth_tag_len    = 8;   /* 8 octet tag length */
@@ -2125,9 +2125,9 @@
  * AES-256 GCM mode with 8 octet auth tag. 
  */
 void
-crypto_policy_set_aes_gcm_256_8_auth(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_gcm_256_8_auth(srtp_crypto_policy_t *p) {
   p->cipher_type     = AES_256_GCM;           
-  p->cipher_key_len  = AES_256_GCM_KEYSIZE_WSALT; 
+  p->cipher_key_len  = SRTP_AES_256_GCM_KEYSIZE_WSALT; 
   p->auth_type       = NULL_AUTH; /* GCM handles the auth for us */ 
   p->auth_key_len    = 0; 
   p->auth_tag_len    = 8;   /* 8 octet tag length */
@@ -2138,9 +2138,9 @@
  * AES-128 GCM mode with 8 octet auth tag, no RTCP encryption. 
  */
 void
-crypto_policy_set_aes_gcm_128_8_only_auth(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_gcm_128_8_only_auth(srtp_crypto_policy_t *p) {
   p->cipher_type     = AES_128_GCM;           
-  p->cipher_key_len  = AES_128_GCM_KEYSIZE_WSALT; 
+  p->cipher_key_len  = SRTP_AES_128_GCM_KEYSIZE_WSALT; 
   p->auth_type       = NULL_AUTH; /* GCM handles the auth for us */ 
   p->auth_key_len    = 0; 
   p->auth_tag_len    = 8;   /* 8 octet tag length */
@@ -2151,9 +2151,9 @@
  * AES-256 GCM mode with 8 octet auth tag, no RTCP encryption. 
  */
 void
-crypto_policy_set_aes_gcm_256_8_only_auth(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_gcm_256_8_only_auth(srtp_crypto_policy_t *p) {
   p->cipher_type     = AES_256_GCM;           
-  p->cipher_key_len  = AES_256_GCM_KEYSIZE_WSALT; 
+  p->cipher_key_len  = SRTP_AES_256_GCM_KEYSIZE_WSALT; 
   p->auth_type       = NULL_AUTH; /* GCM handles the auth for us */ 
   p->auth_key_len    = 0; 
   p->auth_tag_len    = 8;   /* 8 octet tag length */
@@ -2164,9 +2164,9 @@
  * AES-128 GCM mode with 16 octet auth tag. 
  */
 void
-crypto_policy_set_aes_gcm_128_16_auth(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_gcm_128_16_auth(srtp_crypto_policy_t *p) {
   p->cipher_type     = AES_128_GCM;           
-  p->cipher_key_len  = AES_128_GCM_KEYSIZE_WSALT; 
+  p->cipher_key_len  = SRTP_AES_128_GCM_KEYSIZE_WSALT; 
   p->auth_type       = NULL_AUTH; /* GCM handles the auth for us */            
   p->auth_key_len    = 0; 
   p->auth_tag_len    = 16;   /* 16 octet tag length */
@@ -2177,9 +2177,9 @@
  * AES-256 GCM mode with 16 octet auth tag. 
  */
 void
-crypto_policy_set_aes_gcm_256_16_auth(crypto_policy_t *p) {
+srtp_crypto_policy_set_aes_gcm_256_16_auth(srtp_crypto_policy_t *p) {
   p->cipher_type     = AES_256_GCM;           
-  p->cipher_key_len  = AES_256_GCM_KEYSIZE_WSALT; 
+  p->cipher_key_len  = SRTP_AES_256_GCM_KEYSIZE_WSALT; 
   p->auth_type       = NULL_AUTH; /* GCM handles the auth for us */ 
   p->auth_key_len    = 0; 
   p->auth_tag_len    = 16;   /* 16 octet tag length */
@@ -2249,7 +2249,7 @@
  * This code handles AEAD ciphers for outgoing RTCP.  We currently support
  * AES-GCM mode with 128 or 256 bit keys. 
  */
-static err_status_t
+static srtp_err_status_t
 srtp_protect_rtcp_aead (srtp_t ctx, srtp_stream_ctx_t *stream, 
                         void *rtcp_hdr, unsigned int *pkt_octet_len)
 {
@@ -2258,7 +2258,7 @@
     uint32_t *trailer;          /* pointer to start of trailer            */
     unsigned int enc_octet_len = 0; /* number of octets in encrypted portion */
     uint8_t *auth_tag = NULL;   /* location of auth_tag within packet     */
-    err_status_t status;
+    srtp_err_status_t status;
     int tag_len;
     uint32_t seq_num;
     v128_t iv;
@@ -2315,7 +2315,7 @@
     srtp_calc_aead_iv_srtcp(stream, &iv, seq_num, hdr);
     status = cipher_set_iv(stream->rtcp_cipher, &iv, direction_encrypt);
     if (status) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
 
     /*
@@ -2329,7 +2329,7 @@
 	status = cipher_set_aad(stream->rtcp_cipher, (uint8_t*)hdr, 
                                 octets_in_rtcp_header);
 	if (status) {
-	    return ( err_status_cipher_fail);
+	    return ( srtp_err_status_cipher_fail);
 	}
     } else {
 	/*
@@ -2340,7 +2340,7 @@
 	status = cipher_set_aad(stream->rtcp_cipher, (uint8_t*)hdr, 
                                 *pkt_octet_len);
 	if (status) {
-	    return ( err_status_cipher_fail);
+	    return ( srtp_err_status_cipher_fail);
 	}
     }
     /* 
@@ -2350,7 +2350,7 @@
     status = cipher_set_aad(stream->rtcp_cipher, (uint8_t*)&tseq, 
                             sizeof(srtcp_trailer_t));
     if (status) {
-        return ( err_status_cipher_fail);
+        return ( srtp_err_status_cipher_fail);
     }
 
     /* if we're encrypting, exor keystream into the message */
@@ -2358,7 +2358,7 @@
         status = cipher_encrypt(stream->rtcp_cipher,
                                 (uint8_t*)enc_start, &enc_octet_len);
         if (status) {
-            return err_status_cipher_fail;
+            return srtp_err_status_cipher_fail;
         }
 	/*
 	 * Get the tag and append that to the output
@@ -2366,7 +2366,7 @@
 	status = cipher_get_tag(stream->rtcp_cipher, (uint8_t*)auth_tag, 
                                 &tag_len);
 	if (status) {
-	    return ( err_status_cipher_fail);
+	    return ( srtp_err_status_cipher_fail);
 	}
 	enc_octet_len += tag_len;
     } else {
@@ -2377,7 +2377,7 @@
 	unsigned int nolen = 0;
         status = cipher_encrypt(stream->rtcp_cipher, NULL, &nolen);
         if (status) {
-            return err_status_cipher_fail;
+            return srtp_err_status_cipher_fail;
         }
 	/*
 	 * Get the tag and append that to the output
@@ -2385,7 +2385,7 @@
 	status = cipher_get_tag(stream->rtcp_cipher, (uint8_t*)auth_tag, 
                                 &tag_len);
 	if (status) {
-	    return ( err_status_cipher_fail);
+	    return ( srtp_err_status_cipher_fail);
 	}
 	enc_octet_len += tag_len;
     }
@@ -2393,7 +2393,7 @@
     /* increase the packet length by the length of the auth tag and seq_num*/
     *pkt_octet_len += (tag_len + sizeof(srtcp_trailer_t));
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
 /*
@@ -2402,7 +2402,7 @@
  * at the end of the packet stream and is automatically checked by GCM
  * when decrypting the payload.
  */
-static err_status_t
+static srtp_err_status_t
 srtp_unprotect_rtcp_aead (srtp_t ctx, srtp_stream_ctx_t *stream, 
                           void *srtcp_hdr, unsigned int *pkt_octet_len)
 {
@@ -2411,7 +2411,7 @@
     uint32_t *trailer;          /* pointer to start of trailer            */
     unsigned int enc_octet_len = 0; /* number of octets in encrypted portion */
     uint8_t *auth_tag = NULL;   /* location of auth_tag within packet     */
-    err_status_t status;
+    srtp_err_status_t status;
     int tag_len;
     unsigned int tmp_len;
     uint32_t seq_num;
@@ -2465,7 +2465,7 @@
     srtp_calc_aead_iv_srtcp(stream, &iv, seq_num, hdr);
     status = cipher_set_iv(stream->rtcp_cipher, &iv, direction_decrypt);
     if (status) {
-        return err_status_cipher_fail;
+        return srtp_err_status_cipher_fail;
     }
 
     /*
@@ -2479,7 +2479,7 @@
 	status = cipher_set_aad(stream->rtcp_cipher, (uint8_t*)hdr, 
                                 octets_in_rtcp_header);
 	if (status) {
-	    return ( err_status_cipher_fail);
+	    return ( srtp_err_status_cipher_fail);
 	}
     } else {
 	/*
@@ -2490,7 +2490,7 @@
 	status = cipher_set_aad(stream->rtcp_cipher, (uint8_t*)hdr, 
 			       (*pkt_octet_len - tag_len - sizeof(srtcp_trailer_t)));
 	if (status) {
-	    return ( err_status_cipher_fail);
+	    return ( srtp_err_status_cipher_fail);
 	}
     }
 
@@ -2501,7 +2501,7 @@
     status = cipher_set_aad(stream->rtcp_cipher, (uint8_t*)&tseq, 
                             sizeof(srtcp_trailer_t));
     if (status) {
-	return ( err_status_cipher_fail);
+	return ( srtp_err_status_cipher_fail);
     }
 
     /* if we're decrypting, exor keystream into the message */
@@ -2575,10 +2575,10 @@
     /* we've passed the authentication check, so add seq_num to the rdb */
     rdb_add_index(&stream->rtcp_rdb, seq_num);
 
-    return err_status_ok;
+    return srtp_err_status_ok;
 }
 
-err_status_t 
+srtp_err_status_t 
 srtp_protect_rtcp(srtp_t ctx, void *rtcp_hdr, int *pkt_octet_len) {
   srtcp_hdr_t *hdr = (srtcp_hdr_t *)rtcp_hdr;
   uint32_t *enc_start;      /* pointer to start of encrypted portion  */
@@ -2586,7 +2586,7 @@
   uint32_t *trailer;        /* pointer to start of trailer            */
   unsigned int enc_octet_len = 0;/* number of octets in encrypted portion */
   uint8_t *auth_tag = NULL; /* location of auth_tag within packet     */
-  err_status_t status;   
+  srtp_err_status_t status;   
   int tag_len;
   srtp_stream_ctx_t *stream;
   int prefix_len;
@@ -2596,7 +2596,7 @@
 
   /* check the packet length - it must at least contain a full header */
   if (*pkt_octet_len < octets_in_rtcp_header)
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /*
    * look up ssrc in srtp_stream list, and process the packet with 
@@ -2624,7 +2624,7 @@
       stream = new_stream;
     } else {
       /* no template stream, so we return an error */
-      return err_status_no_ctx;
+      return srtp_err_status_no_ctx;
     } 
   }
   
@@ -2723,7 +2723,7 @@
     status = cipher_set_iv(stream->rtcp_cipher, &iv, direction_encrypt);
   }
   if (status)
-    return err_status_cipher_fail;
+    return srtp_err_status_cipher_fail;
 
   /* 
    * if we're authenticating using a universal hash, put the keystream
@@ -2741,7 +2741,7 @@
 		octet_string_hex_string(auth_tag, prefix_len));
 
     if (status)
-      return err_status_cipher_fail;
+      return srtp_err_status_cipher_fail;
   }
 
   /* if we're encrypting, exor keystream into the message */
@@ -2749,7 +2749,7 @@
     status = cipher_encrypt(stream->rtcp_cipher, 
 			    (uint8_t *)enc_start, &enc_octet_len);
     if (status)
-      return err_status_cipher_fail;
+      return srtp_err_status_cipher_fail;
   }
 
   /* initialize auth func context */
@@ -2766,16 +2766,16 @@
   debug_print(mod_srtp, "srtcp auth tag:    %s", 
 	      octet_string_hex_string(auth_tag, tag_len));
   if (status)
-    return err_status_auth_fail;   
+    return srtp_err_status_auth_fail;   
     
   /* increase the packet length by the length of the auth tag and seq_num*/
   *pkt_octet_len += (tag_len + sizeof(srtcp_trailer_t));
     
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
 
-err_status_t 
+srtp_err_status_t 
 srtp_unprotect_rtcp(srtp_t ctx, void *srtcp_hdr, int *pkt_octet_len) {
   srtcp_hdr_t *hdr = (srtcp_hdr_t *)srtcp_hdr;
   uint32_t *enc_start;      /* pointer to start of encrypted portion  */
@@ -2785,7 +2785,7 @@
   uint8_t *auth_tag = NULL; /* location of auth_tag within packet     */
   uint8_t tmp_tag[SRTP_MAX_TAG_LEN];
   uint8_t tag_copy[SRTP_MAX_TAG_LEN];
-  err_status_t status;   
+  srtp_err_status_t status;   
   unsigned int auth_len;
   int tag_len;
   srtp_stream_ctx_t *stream;
@@ -2800,7 +2800,7 @@
      know the tag length, but we at least want to know that it is
      a positive value */
   if (*pkt_octet_len < octets_in_rtcp_header + sizeof(srtcp_trailer_t))
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /*
    * look up ssrc in srtp_stream list, and process the packet with 
@@ -2834,7 +2834,7 @@
 		  hdr->ssrc);
     } else {
       /* no template stream, so we return an error */
-      return err_status_no_ctx;
+      return srtp_err_status_no_ctx;
     } 
   }
   
@@ -2845,7 +2845,7 @@
      header, an auth tag (if applicable), and the SRTCP encrypted flag
      and 31-bit index value */
   if (*pkt_octet_len < (octets_in_rtcp_header + tag_len + sizeof(srtcp_trailer_t))) {
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   }
 
   /*
@@ -2879,7 +2879,7 @@
   e_bit_in_packet =
       (*((unsigned char *) trailer) & SRTCP_E_BYTE_BIT) == SRTCP_E_BYTE_BIT;
   if (e_bit_in_packet != sec_serv_confidentiality) {
-    return err_status_cant_check;
+    return srtp_err_status_cant_check;
   }
   if (sec_serv_confidentiality) {
     enc_start = (uint32_t *)hdr + uint32s_in_rtcp_header;  
@@ -2945,7 +2945,7 @@
 
   }
   if (status)
-    return err_status_cipher_fail;
+    return srtp_err_status_cipher_fail;
 
   /* initialize auth func context */
   auth_start(stream->rtcp_auth);
@@ -2956,13 +2956,13 @@
   debug_print(mod_srtp, "srtcp computed tag:       %s", 
 	      octet_string_hex_string(tmp_tag, tag_len));
   if (status)
-    return err_status_auth_fail;   
+    return srtp_err_status_auth_fail;   
   
   /* compare the tag just computed with the one in the packet */
   debug_print(mod_srtp, "srtcp tag from packet:    %s", 
 	      octet_string_hex_string(auth_tag, tag_len));  
   if (octet_string_is_eq(tmp_tag, auth_tag, tag_len))
-    return err_status_auth_fail;
+    return srtp_err_status_auth_fail;
 
   /* 
    * if we're authenticating using a universal hash, put the keystream
@@ -2974,7 +2974,7 @@
     debug_print(mod_srtp, "keystream prefix: %s", 
 		octet_string_hex_string(auth_tag, prefix_len));
     if (status)
-      return err_status_cipher_fail;
+      return srtp_err_status_cipher_fail;
   }
 
   /* if we're decrypting, exor keystream into the message */
@@ -2982,7 +2982,7 @@
     status = cipher_decrypt(stream->rtcp_cipher, 
 			    (uint8_t *)enc_start, &enc_octet_len);
     if (status)
-      return err_status_cipher_fail;
+      return srtp_err_status_cipher_fail;
   }
 
   /* decrease the packet length by the length of the auth tag and seq_num */
@@ -3043,7 +3043,7 @@
   rdb_add_index(&stream->rtcp_rdb, seq_num);
     
     
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
 
@@ -3066,76 +3066,72 @@
  * dtls keying for srtp 
  */
 
-err_status_t
-crypto_policy_set_from_profile_for_rtp(crypto_policy_t *policy, 
-				       srtp_profile_t profile) {
+srtp_err_status_t
+srtp_crypto_policy_set_from_profile_for_rtp(srtp_crypto_policy_t *policy, 
+				            srtp_profile_t profile) {
 
   /* set SRTP policy from the SRTP profile in the key set */
   switch(profile) {
   case srtp_profile_aes128_cm_sha1_80:
-    crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
     break;
   case srtp_profile_aes128_cm_sha1_32:
-    crypto_policy_set_aes_cm_128_hmac_sha1_32(policy);
+    srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(policy);
     break;
   case srtp_profile_null_sha1_80:
-    crypto_policy_set_null_cipher_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_null_cipher_hmac_sha1_80(policy);
     break;
   case srtp_profile_aes256_cm_sha1_80:
-    crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
     break;
   case srtp_profile_aes256_cm_sha1_32:
-    crypto_policy_set_aes_cm_256_hmac_sha1_32(policy);
+    srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32(policy);
     break;
     /* the following profiles are not (yet) supported */
   case srtp_profile_null_sha1_32:
   default:
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
-crypto_policy_set_from_profile_for_rtcp(crypto_policy_t *policy, 
-					srtp_profile_t profile) {
+srtp_err_status_t
+srtp_crypto_policy_set_from_profile_for_rtcp(srtp_crypto_policy_t *policy, 
+					     srtp_profile_t profile) {
 
   /* set SRTP policy from the SRTP profile in the key set */
   switch(profile) {
   case srtp_profile_aes128_cm_sha1_80:
-    crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
     break;
   case srtp_profile_aes128_cm_sha1_32:
     /* We do not honor the 32-bit auth tag request since
      * this is not compliant with RFC 3711 */
-    crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
     break;
   case srtp_profile_null_sha1_80:
-    crypto_policy_set_null_cipher_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_null_cipher_hmac_sha1_80(policy);
     break;
   case srtp_profile_aes256_cm_sha1_80:
-    crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
     break;
   case srtp_profile_aes256_cm_sha1_32:
     /* We do not honor the 32-bit auth tag request since
      * this is not compliant with RFC 3711 */
-    crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+    srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
     break;
     /* the following profiles are not (yet) supported */
   case srtp_profile_null_sha1_32:
   default:
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-void
-append_salt_to_key(uint8_t *key, unsigned int bytes_in_key,
-		   uint8_t *salt, unsigned int bytes_in_salt) {
-
+void srtp_append_salt_to_key(uint8_t *key, unsigned int bytes_in_key, uint8_t *salt, unsigned int bytes_in_salt) {
   memcpy(key + bytes_in_key, salt, bytes_in_salt);
-
 }
 
 unsigned int
diff --git a/tables/aes_tables.c b/tables/aes_tables.c
index 96d28ce..6562bc5 100644
--- a/tables/aes_tables.c
+++ b/tables/aes_tables.c
@@ -190,14 +190,14 @@
 
 
 /*
- * aes_test_inverse() returns err_status_ok if aes
+ * aes_test_inverse() returns srtp_err_status_ok if aes
  * encryption and decryption are true inverses of each other, and
- * returns err_status_algo_fail otherwise
+ * returns srtp_err_status_algo_fail otherwise
  */
 
 #include "err.h"
 
-err_status_t
+srtp_err_status_t
 aes_test_inverse(void);
 
 #define TABLES_32BIT 1
@@ -303,7 +303,7 @@
    */
     
   printf("aes inverse test: ");
-  if (aes_test_inverse() == err_status_ok)
+  if (aes_test_inverse() == srtp_err_status_ok)
     printf("passed\n");
   else {
     printf("failed\n");
@@ -316,7 +316,7 @@
 
 #if AES_INVERSE_TEST
 
-err_status_t
+srtp_err_status_t
 aes_test_inverse(void) {
   v128_t x, y;
   aes_expanded_key_t expanded_key, decrypt_key;
@@ -342,8 +342,8 @@
   v128_copy_octet_string(&y, plaintext);
 
   if (v128_is_eq(&x, &y))
-    return err_status_ok;
-  return err_status_algo_fail;
+    return srtp_err_status_ok;
+  return srtp_err_status_algo_fail;
   
 }
  
diff --git a/test/dtls_srtp_driver.c b/test/dtls_srtp_driver.c
index 48e72fb..616669e 100644
--- a/test/dtls_srtp_driver.c
+++ b/test/dtls_srtp_driver.c
@@ -46,7 +46,7 @@
 #include "getopt_s.h" /* for local getopt()    */
 #include "srtp_priv.h"
 
-err_status_t 
+srtp_err_status_t 
 test_dtls_srtp(void);
 
 srtp_hdr_t *
@@ -64,7 +64,7 @@
 main(int argc, char *argv[]) {
   unsigned do_list_mods      = 0;
   int q;
-  err_status_t err;
+  srtp_err_status_t err;
 
   printf("dtls_srtp_driver\n");
 
@@ -123,7 +123,7 @@
 }
 
 
-err_status_t
+srtp_err_status_t
 test_dtls_srtp(void) {
   srtp_hdr_t *test_packet;
   int test_packet_len = 80;
@@ -133,7 +133,7 @@
   uint8_t salt[SRTP_MAX_KEY_LEN];
   unsigned int key_len, salt_len;
   srtp_profile_t profile;
-  err_status_t err;
+  srtp_err_status_t err;
 
   /* create a 'null' SRTP session */
   err = srtp_create(&s, NULL);
@@ -142,34 +142,34 @@
 
   /* 
    * verify that packet-processing functions behave properly - we
-   * expect that these functions will return err_status_no_ctx
+   * expect that these functions will return srtp_err_status_no_ctx
    */
   test_packet = srtp_create_test_packet(80, 0xa5a5a5a5);
   if (test_packet == NULL) 
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   err = srtp_protect(s, test_packet, &test_packet_len);
-  if (err != err_status_no_ctx) {
+  if (err != srtp_err_status_no_ctx) {
     printf("wrong return value from srtp_protect() (got code %d)\n", 
 	   err);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
   err = srtp_unprotect(s, test_packet, &test_packet_len);
-  if (err != err_status_no_ctx) {
+  if (err != srtp_err_status_no_ctx) {
     printf("wrong return value from srtp_unprotect() (got code %d)\n", 
 	   err);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
   err = srtp_protect_rtcp(s, test_packet, &test_packet_len);
-  if (err != err_status_no_ctx) {
+  if (err != srtp_err_status_no_ctx) {
     printf("wrong return value from srtp_protect_rtcp() (got code %d)\n", 
 	   err);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
   err = srtp_unprotect_rtcp(s, test_packet, &test_packet_len);
-  if (err != err_status_no_ctx) {
+  if (err != srtp_err_status_no_ctx) {
     printf("wrong return value from srtp_unprotect_rtcp() (got code %d)\n", 
 	   err);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
 
 
@@ -181,13 +181,13 @@
   salt_len = srtp_profile_get_master_salt_length(profile);
   memset(key, 0xff, key_len);
   memset(salt, 0xee, salt_len);
-  append_salt_to_key(key, key_len, salt, salt_len);
+  srtp_append_salt_to_key(key, key_len, salt, salt_len);
   policy.key  = key;
 
   /* initialize SRTP policy from profile  */
-  err = crypto_policy_set_from_profile_for_rtp(&policy.rtp, profile);
+  err = srtp_crypto_policy_set_from_profile_for_rtp(&policy.rtp, profile);
   if (err) return err;
-  err = crypto_policy_set_from_profile_for_rtcp(&policy.rtcp, profile);
+  err = srtp_crypto_policy_set_from_profile_for_rtcp(&policy.rtcp, profile);
   if (err) return err;
   policy.ssrc.type  = ssrc_any_inbound;
   policy.ekt = NULL;
@@ -205,7 +205,7 @@
 
   free(test_packet);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
diff --git a/test/rdbx_driver.c b/test/rdbx_driver.c
index 37a3c85..d745851 100644
--- a/test/rdbx_driver.c
+++ b/test/rdbx_driver.c
@@ -58,7 +58,7 @@
 
 #include "ut_sim.h"
 
-err_status_t 
+srtp_err_status_t 
 test_replay_dbx(int num_trials, unsigned long ws);
 
 double
@@ -73,7 +73,7 @@
 int
 main (int argc, char *argv[]) {
   double rate;
-  err_status_t status;
+  srtp_err_status_t status;
   int q;
   unsigned do_timing_test = 0;
   unsigned do_validation = 0;
@@ -146,20 +146,20 @@
  * rdbx_check_add(rdbx, idx) checks a known-to-be-good idx against
  * rdbx, then adds it.  if a failure is detected (i.e., the check
  * indicates that the value is already in rdbx) then
- * err_status_algo_fail is returned.
+ * srtp_err_status_algo_fail is returned.
  *
  */
 
-err_status_t
+srtp_err_status_t
 rdbx_check_add(rdbx_t *rdbx, uint32_t idx) {
   int delta;
   xtd_seq_num_t est;
   
   delta = index_guess(&rdbx->index, &est, idx);
   
-  if (rdbx_check(rdbx, delta) != err_status_ok) {
+  if (rdbx_check(rdbx, delta) != srtp_err_status_ok) {
     printf("replay_check failed at index %u\n", idx);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }
 
   /*
@@ -167,12 +167,12 @@
    * the estimated value est, at this point
    */
   
-  if (rdbx_add_index(rdbx, delta) != err_status_ok) {
+  if (rdbx_add_index(rdbx, delta) != srtp_err_status_ok) {
     printf("rdbx_add_index failed at index %u\n", idx);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }  
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /*
@@ -182,54 +182,54 @@
  * and thus will be rejected
  */
 
-err_status_t
+srtp_err_status_t
 rdbx_check_expect_failure(rdbx_t *rdbx, uint32_t idx) {
   int delta;
   xtd_seq_num_t est;
-  err_status_t status;
+  srtp_err_status_t status;
 
   delta = index_guess(&rdbx->index, &est, idx);
 
   status = rdbx_check(rdbx, delta);
-  if (status == err_status_ok) {
+  if (status == srtp_err_status_ok) {
     printf("delta: %d ", delta);
     printf("replay_check failed at index %u (false positive)\n", idx);
-    return err_status_algo_fail; 
+    return srtp_err_status_algo_fail; 
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 rdbx_check_add_unordered(rdbx_t *rdbx, uint32_t idx) {
   int delta;
   xtd_seq_num_t est;
-  err_status_t rstat;
+  srtp_err_status_t rstat;
 
   delta = index_guess(&rdbx->index, &est, idx);
 
   rstat = rdbx_check(rdbx, delta);
-  if ((rstat != err_status_ok) && (rstat != err_status_replay_old)) {
+  if ((rstat != srtp_err_status_ok) && (rstat != srtp_err_status_replay_old)) {
     printf("replay_check_add_unordered failed at index %u\n", idx);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }
-  if (rstat == err_status_replay_old) {
-	return err_status_ok;
+  if (rstat == srtp_err_status_replay_old) {
+	return srtp_err_status_ok;
   }
-  if (rdbx_add_index(rdbx, delta) != err_status_ok) {
+  if (rdbx_add_index(rdbx, delta) != srtp_err_status_ok) {
     printf("rdbx_add_index failed at index %u\n", idx);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }  
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 test_replay_dbx(int num_trials, unsigned long ws) {
   rdbx_t rdbx;
   uint32_t idx, ircvd;
   ut_connection utc;
-  err_status_t status;
+  srtp_err_status_t status;
   int num_fp_trials;
 
   status = rdbx_init(&rdbx, ws);
@@ -271,9 +271,9 @@
   /* re-initialize */
   rdbx_dealloc(&rdbx);
 
-  if (rdbx_init(&rdbx, ws) != err_status_ok) {
+  if (rdbx_init(&rdbx, ws) != srtp_err_status_ok) {
     printf("replay_init failed\n");
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /*
@@ -299,9 +299,9 @@
   /* re-initialize */
   rdbx_dealloc(&rdbx);
 
-  if (rdbx_init(&rdbx, ws) != err_status_ok) {
+  if (rdbx_init(&rdbx, ws) != srtp_err_status_ok) {
     printf("replay_init failed\n");
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /*
@@ -321,7 +321,7 @@
 
   rdbx_dealloc(&rdbx);
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -338,7 +338,7 @@
   clock_t timer;
   int failures;                    /* count number of failures        */
   
-  if (rdbx_init(&rdbx, ws) != err_status_ok) {
+  if (rdbx_init(&rdbx, ws) != srtp_err_status_ok) {
     printf("replay_init failed\n");
     exit(1);
   }  
@@ -349,10 +349,10 @@
     
     delta = index_guess(&rdbx.index, &est, i);
     
-    if (rdbx_check(&rdbx, delta) != err_status_ok) 
+    if (rdbx_check(&rdbx, delta) != srtp_err_status_ok) 
       ++failures;
     else
-      if (rdbx_add_index(&rdbx, delta) != err_status_ok)
+      if (rdbx_add_index(&rdbx, delta) != srtp_err_status_ok)
 	++failures;
   }
   timer = clock() - timer;
diff --git a/test/replay_driver.c b/test/replay_driver.c
index e4d1701..a2b6dc4 100644
--- a/test/replay_driver.c
+++ b/test/replay_driver.c
@@ -59,7 +59,7 @@
 
 unsigned num_trials = 1 << 16;
 
-err_status_t
+srtp_err_status_t
 test_rdb_db(void);
 
 double
@@ -67,7 +67,7 @@
 
 int
 main (void) {
-  err_status_t err;
+  srtp_err_status_t err;
   
   printf("testing anti-replay database (rdb_t)...\n");
   err = test_rdb_db();
@@ -89,65 +89,65 @@
   printf("rdb: {%u, %s}\n", rdb->window_start, v128_bit_string(&rdb->bitmask));
 }
 
-err_status_t
+srtp_err_status_t
 rdb_check_add(rdb_t *rdb, uint32_t idx) {
 
-  if (rdb_check(rdb, idx) != err_status_ok) {
+  if (rdb_check(rdb, idx) != srtp_err_status_ok) {
     printf("rdb_check failed at index %u\n", idx);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
-  if (rdb_add_index(rdb, idx) != err_status_ok) {
+  if (rdb_add_index(rdb, idx) != srtp_err_status_ok) {
     printf("rdb_add_index failed at index %u\n", idx);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 rdb_check_expect_failure(rdb_t *rdb, uint32_t idx) {
-  err_status_t err;
+  srtp_err_status_t err;
   
   err = rdb_check(rdb, idx);
-  if ((err != err_status_replay_old) && (err != err_status_replay_fail)) {
+  if ((err != srtp_err_status_replay_old) && (err != srtp_err_status_replay_fail)) {
     printf("rdb_check failed at index %u (false positive)\n", idx);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 rdb_check_add_unordered(rdb_t *rdb, uint32_t idx) {
-  err_status_t rstat;
+  srtp_err_status_t rstat;
 
  /* printf("index: %u\n", idx); */
   rstat = rdb_check(rdb, idx);
-  if ((rstat != err_status_ok) && (rstat != err_status_replay_old)) {
+  if ((rstat != srtp_err_status_ok) && (rstat != srtp_err_status_replay_old)) {
     printf("rdb_check_add_unordered failed at index %u\n", idx);
     return rstat;
   }
-  if (rstat == err_status_replay_old) {
-	return err_status_ok;
+  if (rstat == srtp_err_status_replay_old) {
+	return srtp_err_status_ok;
   }
-  if (rdb_add_index(rdb, idx) != err_status_ok) {
+  if (rdb_add_index(rdb, idx) != srtp_err_status_ok) {
     printf("rdb_add_index failed at index %u\n", idx);
-    return err_status_fail;
+    return srtp_err_status_fail;
   }  
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 test_rdb_db() {
   rdb_t rdb;
   uint32_t idx, ircvd;
   ut_connection utc;
-  err_status_t err;
+  srtp_err_status_t err;
 
-  if (rdb_init(&rdb) != err_status_ok) {
+  if (rdb_init(&rdb) != srtp_err_status_ok) {
     printf("rdb_init failed\n");
-    return err_status_init_fail;
+    return srtp_err_status_init_fail;
   }
 
   /* test sequential insertion */
@@ -165,9 +165,9 @@
   }
 
   /* re-initialize */
-  if (rdb_init(&rdb) != err_status_ok) {
+  if (rdb_init(&rdb) != srtp_err_status_ok) {
     printf("rdb_init failed\n");
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
 
   /* test non-sequential insertion */
@@ -184,9 +184,9 @@
   }
 
   /* re-initialize */
-  if (rdb_init(&rdb) != err_status_ok) {
+  if (rdb_init(&rdb) != srtp_err_status_ok) {
     printf("rdb_init failed\n");
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
 
   /* test insertion with large gaps */
@@ -200,9 +200,9 @@
   }
 
   /* re-initialize */
-  if (rdb_init(&rdb) != err_status_ok) {
+  if (rdb_init(&rdb) != srtp_err_status_ok) {
     printf("rdb_init failed\n");
-    return err_status_fail;
+    return srtp_err_status_fail;
   }
 
   /* test loss of first 513 packets */
@@ -220,7 +220,7 @@
   }
 
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 #include <time.h>       /* for clock()  */
@@ -235,24 +235,24 @@
   clock_t timer;
   int failures;                    /* count number of failures        */
   
-  if (rdb_init(&rdb) != err_status_ok) {
+  if (rdb_init(&rdb) != srtp_err_status_ok) {
     printf("rdb_init failed\n");
     exit(1);
   }  
 
   timer = clock();
   for(i=0; i < REPLAY_NUM_TRIALS; i+=3) {
-    if (rdb_check(&rdb, i+2) != err_status_ok)
+    if (rdb_check(&rdb, i+2) != srtp_err_status_ok)
       ++failures;
-    if (rdb_add_index(&rdb, i+2) != err_status_ok)
+    if (rdb_add_index(&rdb, i+2) != srtp_err_status_ok)
       ++failures;
-    if (rdb_check(&rdb, i+1) != err_status_ok)
+    if (rdb_check(&rdb, i+1) != srtp_err_status_ok)
       ++failures;
-    if (rdb_add_index(&rdb, i+1) != err_status_ok)
+    if (rdb_add_index(&rdb, i+1) != srtp_err_status_ok)
       ++failures;
-    if (rdb_check(&rdb, i) != err_status_ok)
+    if (rdb_check(&rdb, i) != srtp_err_status_ok)
       ++failures;
-    if (rdb_add_index(&rdb, i) != err_status_ok)
+    if (rdb_add_index(&rdb, i) != srtp_err_status_ok)
       ++failures;
   }
   timer = clock() - timer;
diff --git a/test/roc_driver.c b/test/roc_driver.c
index 6fdc6f1..d75b58f 100644
--- a/test/roc_driver.c
+++ b/test/roc_driver.c
@@ -61,12 +61,12 @@
 #include "rdbx.h"
 #include "ut_sim.h"
 
-err_status_t
+srtp_err_status_t
 roc_test(int num_trials);
 
 int
 main (void) {
-  err_status_t status;
+  srtp_err_status_t status;
 
   printf("rollover counter test driver\n"
 	 "David A. McGrew\n"
@@ -85,7 +85,7 @@
 
 #define ROC_VERBOSE 0
 
-err_status_t
+srtp_err_status_t
 roc_test(int num_trials) {
   xtd_seq_num_t local, est, ref;
   ut_connection utc;
@@ -116,7 +116,7 @@
   if (failure_rate > 0.01) {
     printf("error: failure rate too high (%d bad estimates in %d trials)\n", 
 	   num_bad_est, num_trials);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }
   printf("done\n");
 
@@ -145,7 +145,7 @@
     if (local + delta != est) {
       printf(" *bad delta*: local %llu + delta %d != est %llu\n",
 	     (unsigned long long)local, delta, (unsigned long long)est);
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }
 
     /* now update local xtd_seq_num_t as necessary */
@@ -167,9 +167,9 @@
   if (failure_rate > 0.01) {
     printf("error: failure rate too high (%d bad estimates in %d trials)\n", 
 	   num_bad_est, num_trials);
-    return err_status_algo_fail;
+    return srtp_err_status_algo_fail;
   }
   printf("done\n");
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
diff --git a/test/rtp.c b/test/rtp.c
index 8f65698..fe2b1b3 100644
--- a/test/rtp.c
+++ b/test/rtp.c
@@ -24,7 +24,7 @@
 int
 rtp_sendto(rtp_sender_t sender, const void* msg, int len) {
   int octets_sent;
-  err_status_t stat;
+  srtp_err_status_t stat;
   int pkt_len = len + RTP_HEADER_LEN;
 
   /* marshal data */
@@ -64,7 +64,7 @@
 int
 rtp_recvfrom(rtp_receiver_t receiver, void *msg, int *len) {
   int octets_recvd;
-  err_status_t stat;
+  srtp_err_status_t stat;
   
   octets_recvd = recvfrom(receiver->socket, (void *)&receiver->message,
 			 *len, 0, (struct sockaddr *) NULL, 0);
@@ -94,8 +94,8 @@
   if (stat) {
     fprintf(stderr,
 	    "error: srtp unprotection failed with code %d%s\n", stat,
-	    stat == err_status_replay_fail ? " (replay check failed)" :
-	    stat == err_status_auth_fail ? " (auth check failed)" : "");
+	    stat == srtp_err_status_replay_fail ? " (replay check failed)" :
+	    stat == srtp_err_status_auth_fail ? " (auth check failed)" : "");
     return -1;
   }
   strncpy(msg, receiver->message.body, octets_recvd);
diff --git a/test/rtp_decoder.c b/test/rtp_decoder.c
index 60b8d18..da730ae 100644
--- a/test/rtp_decoder.c
+++ b/test/rtp_decoder.c
@@ -64,7 +64,7 @@
 #if BEW
   struct sockaddr_in local;
 #endif 
-  sec_serv_t sec_servs = sec_serv_none;
+  srtp_sec_serv_t sec_servs = sec_serv_none;
   int c;
   int key_size = 128;
   int tag_size = 8;
@@ -76,7 +76,7 @@
   char filter_exp[MAX_FILTER] = "";
   rtp_decoder_t dec;
   srtp_policy_t policy;
-  err_status_t status;
+  srtp_err_status_t status;
   int len;
   int expected_len;
   int do_list_mods = 0;
@@ -190,12 +190,12 @@
 #ifdef OPENSSL
 	switch (key_size) {
 	case 128:
-	  crypto_policy_set_aes_gcm_128_8_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_128_8_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_auth(&policy.rtcp);
 	  break;
 	case 256:
-	  crypto_policy_set_aes_gcm_256_8_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_256_8_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_auth(&policy.rtcp);
 	  break;
 	}
 #else
@@ -205,12 +205,12 @@
       } else {
 	switch (key_size) {
 	case 128:
-          crypto_policy_set_rtp_default(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);
+          srtp_crypto_policy_set_rtp_default(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
 	  break;
 	case 256:
-          crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);
+          srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
 	  break;
 	}
       }
@@ -222,12 +222,12 @@
       } else {
 	switch (key_size) {
 	case 128:
-          crypto_policy_set_aes_cm_128_null_auth(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);      
+          srtp_crypto_policy_set_aes_cm_128_null_auth(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);      
 	  break;
 	case 256:
-          crypto_policy_set_aes_cm_256_null_auth(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);      
+          srtp_crypto_policy_set_aes_cm_256_null_auth(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);      
 	  break;
 	}
       }
@@ -237,12 +237,12 @@
 #ifdef OPENSSL
 	switch (key_size) {
 	case 128:
-	  crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtcp);
 	  break;
 	case 256:
-	  crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtcp);
 	  break;
 	}
 #else
@@ -250,8 +250,8 @@
 	return 0;
 #endif
       } else {
-        crypto_policy_set_null_cipher_hmac_sha1_80(&policy.rtp);
-        crypto_policy_set_rtcp_default(&policy.rtcp);
+        srtp_crypto_policy_set_null_cipher_hmac_sha1_80(&policy.rtp);
+        srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
       }
       break;
     default:
@@ -406,7 +406,7 @@
   free(rtp_ctx);
 }
 
-err_status_t
+srtp_err_status_t
 rtp_decoder_init_srtp(rtp_decoder_t decoder, unsigned int ssrc) {
   decoder->policy.ssrc.value = htonl(ssrc);
   return srtp_create(&decoder->srtp_ctx, &decoder->policy);
@@ -453,7 +453,7 @@
   int pktsize;
   struct timeval delta;
   int octets_recvd;
-  err_status_t status;
+  srtp_err_status_t status;
   dcdr->frame_nr++;
 
   if (dcdr->start_tv.tv_sec == 0 && dcdr->start_tv.tv_sec == 0) {
@@ -494,13 +494,13 @@
   hexdump(&dcdr->message, pktsize);
 }
 
-void rtp_print_error(err_status_t status, char *message){
+void rtp_print_error(srtp_err_status_t status, char *message){
     fprintf(stderr,
             "error: %s %d%s\n", message, status,
-            status == err_status_replay_fail ? " (replay check failed)" :
-            status == err_status_bad_param ? " (bad param)" :
-            status == err_status_no_ctx ? " (no context)" :
-            status == err_status_cipher_fail ? " (cipher failed)" :
-            status == err_status_key_expired ? " (key expired)" :
-            status == err_status_auth_fail ? " (auth check failed)" : "");
+            status == srtp_err_status_replay_fail ? " (replay check failed)" :
+            status == srtp_err_status_bad_param ? " (bad param)" :
+            status == srtp_err_status_no_ctx ? " (no context)" :
+            status == srtp_err_status_cipher_fail ? " (cipher failed)" :
+            status == srtp_err_status_key_expired ? " (key expired)" :
+            status == srtp_err_status_auth_fail ? " (auth check failed)" : "");
 }
diff --git a/test/rtp_decoder.h b/test/rtp_decoder.h
index 3a92d8a..7883607 100644
--- a/test/rtp_decoder.h
+++ b/test/rtp_decoder.h
@@ -69,49 +69,36 @@
 /*
  * error to string
  */
-
-void rtp_print_error(err_status_t status, char *message);
+void rtp_print_error(srtp_err_status_t status, char *message);
 
 /* 
  * prints the output of a random buffer in hexadecimal
  */
-
-void
-hexdump(const void *ptr, size_t size);
+void hexdump(const void *ptr, size_t size);
 
 /*
  * the function usage() prints an error message describing how this
  * program should be called, then calls exit()
  */
-
-void
-usage(char *prog_name);
+void usage(char *prog_name);
 
 /*
  * transforms base64 key into octet
  */
-
 char *decode_sdes(char *in, char *out);
 
 /* 
  * pcap handling
  */
+void rtp_decoder_handle_pkt(u_char *arg, const struct pcap_pkthdr *hdr, const u_char *bytes);
 
-void
-rtp_decoder_handle_pkt(u_char *arg, const struct pcap_pkthdr *hdr,
-	const u_char *bytes);
+rtp_decoder_t rtp_decoder_alloc(void);
 
-rtp_decoder_t
-rtp_decoder_alloc(void);
+void rtp_decoder_dealloc(rtp_decoder_t rtp_ctx);
 
-void
-rtp_decoder_dealloc(rtp_decoder_t rtp_ctx);
+int rtp_decoder_init(rtp_decoder_t dcdr, srtp_policy_t policy);
 
-int
-rtp_decoder_init(rtp_decoder_t dcdr, srtp_policy_t policy);
-
-err_status_t
-rtp_decoder_init_srtp(rtp_decoder_t decoder, unsigned int ssrc);
+srtp_err_status_t rtp_decoder_init_srtp(rtp_decoder_t decoder, unsigned int ssrc);
 
 int
 rtp_decoder_deinit_srtp(rtp_decoder_t decoder);
diff --git a/test/rtpw.c b/test/rtpw.c
index 17f27f2..2caa8b3 100644
--- a/test/rtpw.c
+++ b/test/rtpw.c
@@ -154,7 +154,7 @@
   struct sockaddr_in local;
 #endif 
   program_type prog_type = unknown;
-  sec_serv_t sec_servs = sec_serv_none;
+  srtp_sec_serv_t sec_servs = sec_serv_none;
   unsigned char ttl = 5;
   int c;
   int key_size = 128;
@@ -167,7 +167,7 @@
   unsigned short port = 0;
   rtp_sender_t snd;
   srtp_policy_t policy;
-  err_status_t status;
+  srtp_err_status_t status;
   int len;
   int expected_len;
   int do_list_mods = 0;
@@ -365,12 +365,12 @@
 #ifdef OPENSSL
 	switch (key_size) {
 	case 128:
-	  crypto_policy_set_aes_gcm_128_8_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_128_8_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_auth(&policy.rtcp);
 	  break;
 	case 256:
-	  crypto_policy_set_aes_gcm_256_8_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_256_8_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_auth(&policy.rtcp);
 	  break;
 	}
 #else
@@ -380,12 +380,12 @@
       } else {
 	switch (key_size) {
 	case 128:
-          crypto_policy_set_rtp_default(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);
+          srtp_crypto_policy_set_rtp_default(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
 	  break;
 	case 256:
-          crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);
+          srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
 	  break;
 	}
       }
@@ -397,12 +397,12 @@
       } else {
 	switch (key_size) {
 	case 128:
-          crypto_policy_set_aes_cm_128_null_auth(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);      
+          srtp_crypto_policy_set_aes_cm_128_null_auth(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);      
 	  break;
 	case 256:
-          crypto_policy_set_aes_cm_256_null_auth(&policy.rtp);
-          crypto_policy_set_rtcp_default(&policy.rtcp);      
+          srtp_crypto_policy_set_aes_cm_256_null_auth(&policy.rtp);
+          srtp_crypto_policy_set_rtcp_default(&policy.rtcp);      
 	  break;
 	}
       }
@@ -412,12 +412,12 @@
 #ifdef OPENSSL
 	switch (key_size) {
 	case 128:
-	  crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_128_8_only_auth(&policy.rtcp);
 	  break;
 	case 256:
-	  crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtp);
-	  crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtcp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtp);
+	  srtp_crypto_policy_set_aes_gcm_256_8_only_auth(&policy.rtcp);
 	  break;
 	}
 #else
@@ -425,8 +425,8 @@
 	return 0;
 #endif
       } else {
-        crypto_policy_set_null_cipher_hmac_sha1_80(&policy.rtp);
-        crypto_policy_set_rtcp_default(&policy.rtcp);
+        srtp_crypto_policy_set_null_cipher_hmac_sha1_80(&policy.rtp);
+        srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
       }
       break;
     default:
diff --git a/test/srtp_driver.c b/test/srtp_driver.c
index 8872971..00e9e1a 100644
--- a/test/srtp_driver.c
+++ b/test/srtp_driver.c
@@ -59,19 +59,19 @@
 
 #define PRINT_REFERENCE_PACKET 1
 
-err_status_t
+srtp_err_status_t
 srtp_validate(void);
 
-err_status_t
+srtp_err_status_t
 srtp_validate_aes_256(void);
 
-err_status_t
+srtp_err_status_t
 srtp_create_big_policy(srtp_policy_t **list);
 
-err_status_t
+srtp_err_status_t
 srtp_dealloc_big_policy(srtp_policy_t *list);
 
-err_status_t
+srtp_err_status_t
 srtp_test_remove_stream(void);
 
 double
@@ -86,16 +86,16 @@
 void
 srtp_do_rejection_timing(const srtp_policy_t *policy);
 
-err_status_t
+srtp_err_status_t
 srtp_test(const srtp_policy_t *policy);
 
-err_status_t
+srtp_err_status_t
 srtcp_test(const srtp_policy_t *policy);
 
-err_status_t
+srtp_err_status_t
 srtp_session_print_policy(srtp_t srtp);
 
-err_status_t
+srtp_err_status_t
 srtp_print_policy(const srtp_policy_t *policy); 
 
 char *
@@ -150,7 +150,7 @@
   unsigned do_codec_timing   = 0;
   unsigned do_validation     = 0;
   unsigned do_list_mods      = 0;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /* 
    * verify that the compiler has interpreted the header data
@@ -230,14 +230,14 @@
     /* loop over policy array, testing srtp and srtcp for each policy */
     while (*policy != NULL) {
       printf("testing srtp_protect and srtp_unprotect\n");
-      if (srtp_test(*policy) == err_status_ok)
+      if (srtp_test(*policy) == srtp_err_status_ok)
 	printf("passed\n\n");
       else {
 	printf("failed\n");
 	exit(1);
       }
       printf("testing srtp_protect_rtcp and srtp_unprotect_rtcp\n");
-      if (srtcp_test(*policy) == err_status_ok)
+      if (srtcp_test(*policy) == srtp_err_status_ok)
 	printf("passed\n\n");
       else {
 	printf("failed\n");
@@ -253,7 +253,7 @@
       exit(1);
     }
     printf("testing srtp_protect and srtp_unprotect with big policy\n");
-    if (srtp_test(big_policy) == err_status_ok)
+    if (srtp_test(big_policy) == srtp_err_status_ok)
       printf("passed\n\n");
     else {
       printf("failed\n");
@@ -268,7 +268,7 @@
     /* run test on wildcard policy */
     printf("testing srtp_protect and srtp_unprotect on "
 	   "wildcard ssrc policy\n");
-    if (srtp_test(&wildcard_policy) == err_status_ok)
+    if (srtp_test(&wildcard_policy) == srtp_err_status_ok)
       printf("passed\n\n");
     else {
       printf("failed\n");
@@ -281,7 +281,7 @@
      */
     printf("testing srtp_protect and srtp_unprotect against "
 	   "reference packets\n");
-    if (srtp_validate() == err_status_ok) 
+    if (srtp_validate() == srtp_err_status_ok) 
       printf("passed\n\n");
     else {
       printf("failed\n");
@@ -296,7 +296,7 @@
      */
     printf("testing srtp_protect and srtp_unprotect against "
 	   "reference packets (AES-256)\n");
-    if (srtp_validate_aes_256() == err_status_ok) 
+    if (srtp_validate_aes_256() == srtp_err_status_ok) 
       printf("passed\n\n");
     else {
       printf("failed\n");
@@ -308,7 +308,7 @@
      * test the function srtp_remove_stream()
      */
     printf("testing srtp_remove_stream()...");
-    if (srtp_test_remove_stream() == err_status_ok)
+    if (srtp_test_remove_stream() == srtp_err_status_ok)
       printf("passed\n");
     else {
       printf("failed\n");
@@ -343,8 +343,8 @@
     int ignore;
     double mips = mips_estimate(1000000000, &ignore);
 
-    crypto_policy_set_rtp_default(&policy.rtp);
-    crypto_policy_set_rtcp_default(&policy.rtcp);
+    srtp_crypto_policy_set_rtp_default(&policy.rtp);
+    srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
     policy.ssrc.type  = ssrc_specific;
     policy.ssrc.value = 0xdecafbad;
     policy.key  = test_key;
@@ -499,7 +499,7 @@
   int num_trials = 100000;
   int len;
   uint32_t ssrc;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /*
    * allocate and initialize an srtp session
@@ -567,7 +567,7 @@
   clock_t timer;
   int num_trials = 1000000;
   uint32_t ssrc = policy->ssrc.value;
-  err_status_t status;
+  srtp_err_status_t status;
 
   /*
    * allocate and initialize an srtp session
@@ -605,20 +605,20 @@
 
 
 void
-err_check(err_status_t s) {
-  if (s == err_status_ok) 
+err_check(srtp_err_status_t s) {
+  if (s == srtp_err_status_ok) 
     return;
   else
     fprintf(stderr, "error: unexpected srtp failure (code %d)\n", s);
   exit (1);
 }
 
-err_status_t
+srtp_err_status_t
 srtp_test(const srtp_policy_t *policy) {
   int i;
   srtp_t srtp_sender;
   srtp_t srtp_rcvr;
-  err_status_t status = err_status_ok;
+  srtp_err_status_t status = srtp_err_status_ok;
   srtp_hdr_t *hdr, *hdr2;
   uint8_t hdr_enc[64];
   uint8_t *pkt_end;
@@ -646,11 +646,11 @@
   hdr = srtp_create_test_packet(msg_len_octets, ssrc);
 
   if (hdr == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   hdr2 = srtp_create_test_packet(msg_len_octets, ssrc);
   if (hdr2 == NULL) {
     free(hdr);
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   }
 
   /* set message length */
@@ -692,7 +692,7 @@
               0xff, ((uint8_t *)hdr)[i], i);
       free(hdr);
       free(hdr2);
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }  
 
   /*
@@ -706,10 +706,10 @@
    */
   if ((policy->rtp.sec_serv & sec_serv_conf) && (msg_len_octets >= 4)) {
     printf("testing that ciphertext is distinct from plaintext...");
-    status = err_status_algo_fail;
+    status = srtp_err_status_algo_fail;
     for (i=12; i < msg_len_octets+12; i++)
       if (((uint8_t *)hdr)[i] != ((uint8_t *)hdr2)[i]) {
-	status = err_status_ok;
+	status = srtp_err_status_ok;
       }
     if (status) {
       printf("failed\n");
@@ -731,7 +731,7 @@
   if (rcvr_policy == NULL) {
     free(hdr);
     free(hdr2);
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   }
   memcpy(rcvr_policy, policy, sizeof(srtp_policy_t));
   if (policy->ssrc.type == ssrc_any_outbound) {
@@ -749,7 +749,7 @@
   for (i=0; i < msg_len_octets; i++)
     if (((uint8_t *)hdr)[i] != ((uint8_t *)hdr2)[i]) {
       fprintf(stdout, "mismatch at octet %d\n", i);
-      status = err_status_algo_fail;
+      status = srtp_err_status_algo_fail;
     }
   if (status) {
     free(hdr);
@@ -771,7 +771,7 @@
 
     /* unprotect a second time - should fail with a replay error */
     status = srtp_unprotect(srtp_rcvr, hdr_enc, &len);
-    if (status != err_status_replay_fail) {
+    if (status != srtp_err_status_replay_fail) {
       printf("failed with error code %d\n", status);
       free(hdr); 
       free(hdr2);
@@ -797,7 +797,7 @@
 
     /* unprotect, and check for authentication failure */
     status = srtp_unprotect(srtp_rcvr, hdr, &len);
-    if (status != err_status_auth_fail) {
+    if (status != srtp_err_status_auth_fail) {
       printf("failed\n");
       free(hdr); 
       free(hdr2);
@@ -815,16 +815,16 @@
   free(hdr);
   free(hdr2);
   free(rcvr_policy);
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 srtcp_test(const srtp_policy_t *policy) {
   int i;
   srtp_t srtcp_sender;
   srtp_t srtcp_rcvr;
-  err_status_t status = err_status_ok;
+  srtp_err_status_t status = srtp_err_status_ok;
   srtp_hdr_t *hdr, *hdr2;
   uint8_t hdr_enc[64];
   uint8_t *pkt_end;
@@ -852,11 +852,11 @@
   hdr = srtp_create_test_packet(msg_len_octets, ssrc);
 
   if (hdr == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   hdr2 = srtp_create_test_packet(msg_len_octets, ssrc);
   if (hdr2 == NULL) {
     free(hdr);
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   }
 
   /* set message length */
@@ -898,7 +898,7 @@
               0xff, ((uint8_t *)hdr)[i], i);
       free(hdr);
       free(hdr2);
-      return err_status_algo_fail;
+      return srtp_err_status_algo_fail;
     }  
 
   /*
@@ -912,10 +912,10 @@
    */
   if ((policy->rtp.sec_serv & sec_serv_conf) && (msg_len_octets >= 4)) {
     printf("testing that ciphertext is distinct from plaintext...");
-    status = err_status_algo_fail;
+    status = srtp_err_status_algo_fail;
     for (i=12; i < msg_len_octets+12; i++)
       if (((uint8_t *)hdr)[i] != ((uint8_t *)hdr2)[i]) {
-	status = err_status_ok;
+	status = srtp_err_status_ok;
       }
     if (status) {
       printf("failed\n");
@@ -935,7 +935,7 @@
    */
   rcvr_policy = (srtp_policy_t*) malloc(sizeof(srtp_policy_t));
   if (rcvr_policy == NULL)
-    return err_status_alloc_fail;
+    return srtp_err_status_alloc_fail;
   memcpy(rcvr_policy, policy, sizeof(srtp_policy_t));
   if (policy->ssrc.type == ssrc_any_outbound) {
     rcvr_policy->ssrc.type = ssrc_any_inbound;       
@@ -952,7 +952,7 @@
   for (i=0; i < msg_len_octets; i++)
     if (((uint8_t *)hdr)[i] != ((uint8_t *)hdr2)[i]) {
       fprintf(stdout, "mismatch at octet %d\n", i);
-      status = err_status_algo_fail;
+      status = srtp_err_status_algo_fail;
     }
   if (status) {
     free(hdr);
@@ -974,7 +974,7 @@
 
     /* unprotect a second time - should fail with a replay error */
     status = srtp_unprotect_rtcp(srtcp_rcvr, hdr_enc, &len);
-    if (status != err_status_replay_fail) {
+    if (status != srtp_err_status_replay_fail) {
       printf("failed with error code %d\n", status);
       free(hdr); 
       free(hdr2);
@@ -1000,7 +1000,7 @@
 
     /* unprotect, and check for authentication failure */
     status = srtp_unprotect_rtcp(srtcp_rcvr, hdr, &len);
-    if (status != err_status_auth_fail) {
+    if (status != srtp_err_status_auth_fail) {
       printf("failed\n");
       free(hdr); 
       free(hdr2);
@@ -1018,11 +1018,11 @@
   free(hdr);
   free(hdr2);
   free(rcvr_policy);
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 srtp_session_print_policy(srtp_t srtp) {
   char *serv_descr[4] = {
     "none",
@@ -1039,7 +1039,7 @@
 
   /* sanity checking */
   if (srtp == NULL)
-    return err_status_fail;
+    return srtp_err_status_fail;
 
   /* if there's a template stream, print it out */
   if (srtp->stream_template != NULL) {
@@ -1068,7 +1068,7 @@
   stream = srtp->stream_list;
   while (stream != NULL) {
     if (stream->rtp_services > sec_serv_conf_and_auth)
-      return err_status_bad_param;
+      return srtp_err_status_bad_param;
     
     printf("# SSRC:          0x%08x\r\n"
 	   "# rtp cipher:    %s\r\n"
@@ -1092,12 +1092,12 @@
     /* advance to next stream in the list */
     stream = stream->next;
   } 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_print_policy(const srtp_policy_t *policy) {
-  err_status_t status;
+  srtp_err_status_t status;
   srtp_t session;
 
   status = srtp_create(&session, policy);
@@ -1109,7 +1109,7 @@
   status = srtp_dealloc(session);
   if (status)
     return status;
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 /* 
@@ -1199,7 +1199,7 @@
  */
 
 
-err_status_t
+srtp_err_status_t
 srtp_validate() {
   uint8_t srtp_plaintext_ref[28] = {
     0x80, 0x0f, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad, 
@@ -1222,7 +1222,7 @@
     0x99, 0xea, 0x17, 0x9b, 0x8d, 0xbb
   };
   srtp_t srtp_snd, srtp_recv;
-  err_status_t status;
+  srtp_err_status_t status;
   int len;
   srtp_policy_t policy;
   
@@ -1230,8 +1230,8 @@
    * create a session with a single stream using the default srtp
    * policy and with the SSRC value 0xcafebabe
    */
-  crypto_policy_set_rtp_default(&policy.rtp);
-  crypto_policy_set_rtcp_default(&policy.rtcp);
+  srtp_crypto_policy_set_rtp_default(&policy.rtp);
+  srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
   policy.ssrc.type  = ssrc_specific;
   policy.ssrc.value = 0xcafebabe;
   policy.key  = test_key;
@@ -1250,7 +1250,7 @@
   len = 28;
   status = srtp_protect(srtp_snd, srtp_plaintext, &len);
   if (status || (len != 38))
-    return err_status_fail;
+    return srtp_err_status_fail;
 
   debug_print(mod_driver, "ciphertext:\n  %s", 	      
 	      octet_string_hex_string(srtp_plaintext, len));
@@ -1258,7 +1258,7 @@
 	      octet_string_hex_string(srtp_ciphertext, len));
 
   if (octet_string_is_eq(srtp_plaintext, srtp_ciphertext, len))
-    return err_status_fail;
+    return srtp_err_status_fail;
   
   /*
    * create a receiver session context comparable to the one created
@@ -1277,7 +1277,7 @@
     return status;
   
   if (octet_string_is_eq(srtp_ciphertext, srtp_plaintext_ref, len))
-    return err_status_fail;
+    return srtp_err_status_fail;
 
   status = srtp_dealloc(srtp_snd);
   if (status)
@@ -1287,7 +1287,7 @@
   if (status)
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
@@ -1298,7 +1298,7 @@
  */
 
 
-err_status_t
+srtp_err_status_t
 srtp_validate_aes_256() {
   unsigned char aes_256_test_key[46] = {
     0xf0, 0xf0, 0x49, 0x14, 0xb5, 0x13, 0xf2, 0x76,
@@ -1330,7 +1330,7 @@
     0x5b, 0x3a, 0x55, 0xd8, 0x87, 0x3b
   };
   srtp_t srtp_snd, srtp_recv;
-  err_status_t status;
+  srtp_err_status_t status;
   int len;
   srtp_policy_t policy;
   
@@ -1338,8 +1338,8 @@
    * create a session with a single stream using the default srtp
    * policy and with the SSRC value 0xcafebabe
    */
-  crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtp);
-  crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtcp);
+  srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtp);
+  srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy.rtcp);
   policy.ssrc.type  = ssrc_specific;
   policy.ssrc.value = 0xcafebabe;
   policy.key  = aes_256_test_key;
@@ -1358,7 +1358,7 @@
   len = 28;
   status = srtp_protect(srtp_snd, srtp_plaintext, &len);
   if (status || (len != 38))
-    return err_status_fail;
+    return srtp_err_status_fail;
 
   debug_print(mod_driver, "ciphertext:\n  %s", 	      
 	      octet_string_hex_string(srtp_plaintext, len));
@@ -1366,7 +1366,7 @@
 	      octet_string_hex_string(srtp_ciphertext, len));
 
   if (octet_string_is_eq(srtp_plaintext, srtp_ciphertext, len))
-    return err_status_fail;
+    return srtp_err_status_fail;
   
   /*
    * create a receiver session context comparable to the one created
@@ -1385,7 +1385,7 @@
     return status;
   
   if (octet_string_is_eq(srtp_ciphertext, srtp_plaintext_ref, len))
-    return err_status_fail;
+    return srtp_err_status_fail;
 
   status = srtp_dealloc(srtp_snd);
   if (status)
@@ -1395,11 +1395,11 @@
   if (status)
     return status;
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 srtp_create_big_policy(srtp_policy_t **list) {
   extern const srtp_policy_t *policy_array[];
   srtp_policy_t *p, *tmp;
@@ -1408,7 +1408,7 @@
 
   /* sanity checking */
   if ((list == NULL) || (policy_array[0] == NULL))
-    return err_status_bad_param;
+    return srtp_err_status_bad_param;
 
   /* 
    * loop over policy list, mallocing a new list and copying values
@@ -1418,7 +1418,7 @@
   while (policy_array[i] != NULL) {
     p  = (srtp_policy_t*) malloc(sizeof(srtp_policy_t));
     if (p == NULL)
-      return err_status_bad_param;
+      return srtp_err_status_bad_param;
     memcpy(p, policy_array[i], sizeof(srtp_policy_t));
     p->ssrc.type = ssrc_specific;
     p->ssrc.value = ssrc++;
@@ -1428,10 +1428,10 @@
   }
   *list = p;
  
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
-err_status_t
+srtp_err_status_t
 srtp_dealloc_big_policy(srtp_policy_t *list) {
   srtp_policy_t *p, *next;
 
@@ -1440,13 +1440,13 @@
     free(p);
   }
 
-  return err_status_ok;
+  return srtp_err_status_ok;
 }
 
 
-err_status_t
+srtp_err_status_t
 srtp_test_remove_stream() { 
-  err_status_t status;
+  srtp_err_status_t status;
   srtp_policy_t *policy_list, policy;
   srtp_t session;
   srtp_stream_t stream;
@@ -1471,34 +1471,34 @@
    * in the session
    */
   status = srtp_remove_stream(session, htonl(0xaaaaaaaa));
-  if (status != err_status_no_ctx)
-    return err_status_fail;
+  if (status != srtp_err_status_no_ctx)
+    return srtp_err_status_fail;
   
   /* 
    * check for false negatives by removing stream 0x1, then
    * searching for streams 0x0 and 0x2
    */
   status = srtp_remove_stream(session, htonl(0x1));
-  if (status != err_status_ok)
-    return err_status_fail;
+  if (status != srtp_err_status_ok)
+    return srtp_err_status_fail;
   stream = srtp_get_stream(session, htonl(0x0));
   if (stream == NULL)
-    return err_status_fail;
+    return srtp_err_status_fail;
   stream = srtp_get_stream(session, htonl(0x2));
   if (stream == NULL)
-    return err_status_fail;  
+    return srtp_err_status_fail;  
 
   status = srtp_dealloc(session);
-  if (status != err_status_ok)
+  if (status != srtp_err_status_ok)
     return status;
 
   status = srtp_dealloc_big_policy(policy_list);
-  if (status != err_status_ok)
+  if (status != srtp_err_status_ok)
     return status;
 
   /* Now test adding and removing a single stream */
-  crypto_policy_set_rtp_default(&policy.rtp);
-  crypto_policy_set_rtcp_default(&policy.rtcp);
+  srtp_crypto_policy_set_rtp_default(&policy.rtp);
+  srtp_crypto_policy_set_rtcp_default(&policy.rtcp);
   policy.ssrc.type  = ssrc_specific;
   policy.ssrc.value = 0xcafebabe;
   policy.key  = test_key;
@@ -1508,22 +1508,22 @@
   policy.next = NULL;
 
   status = srtp_create(&session, NULL);
-  if (status != err_status_ok)
+  if (status != srtp_err_status_ok)
     return status;
   
   status = srtp_add_stream(session, &policy);
-  if (status != err_status_ok)
+  if (status != srtp_err_status_ok)
     return status;
 
   status = srtp_remove_stream(session, htonl(0xcafebabe));
-  if (status != err_status_ok)
+  if (status != srtp_err_status_ok)
     return status;
 
   status = srtp_dealloc(session);
-  if (status != err_status_ok)
+  if (status != srtp_err_status_ok)
     return status;
 
-  return err_status_ok;  
+  return srtp_err_status_ok;  
 }
 
 /*
@@ -1670,7 +1670,7 @@
     { ssrc_any_outbound, 0 },  /* SSRC                           */
     {                      /* SRTP policy                    */                  
         AES_128_GCM,            /* cipher type                 */
-        AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */
@@ -1678,7 +1678,7 @@
     },
     {                      /* SRTCP policy                   */
         AES_128_GCM,            /* cipher type                 */
-        AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */
@@ -1695,7 +1695,7 @@
     { ssrc_any_outbound, 0 },  /* SSRC                           */
     {                      /* SRTP policy                    */                  
         AES_128_GCM,            /* cipher type                 */
-        AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */
@@ -1703,7 +1703,7 @@
     },
     {                      /* SRTCP policy                   */
         AES_128_GCM,            /* cipher type                 */
-        AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_128_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */
@@ -1720,7 +1720,7 @@
     { ssrc_any_outbound, 0 },  /* SSRC                           */
     {                      /* SRTP policy                    */                  
         AES_256_GCM,            /* cipher type                 */
-        AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */
@@ -1728,7 +1728,7 @@
     },
     {                      /* SRTCP policy                   */
         AES_256_GCM,            /* cipher type                 */
-        AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */
@@ -1745,7 +1745,7 @@
     { ssrc_any_outbound, 0 },  /* SSRC                           */
     {                      /* SRTP policy                    */                  
         AES_256_GCM,            /* cipher type                 */
-        AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */
@@ -1753,7 +1753,7 @@
     },
     {                      /* SRTCP policy                   */
         AES_256_GCM,            /* cipher type                 */
-        AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
+        SRTP_AES_256_GCM_KEYSIZE_WSALT,  /* cipher key length in octets */
         NULL_AUTH,              /* authentication func type    */
         0,                      /* auth key length in octets   */
         8,                      /* auth tag length in octets   */