s/type/opt/ for sub-negotiation
diff --git a/libtelnet.c b/libtelnet.c
index 2034e57..7503e7e 100644
--- a/libtelnet.c
+++ b/libtelnet.c
@@ -407,10 +407,10 @@
 
 /* send sub-request */
 void libtelnet_send_subnegotiation(struct libtelnet_t *telnet,
-		unsigned char type, unsigned char *buffer, unsigned int size,
+		unsigned char opt, unsigned char *buffer, unsigned int size,
 		void *user_data)  {
 	libtelnet_send_command(telnet, LIBTELNET_SB, user_data);
-	libtelnet_send_data(telnet, &type, 1, user_data);
+	libtelnet_send_data(telnet, &opt, 1, user_data);
 	libtelnet_send_data(telnet, buffer, size, user_data);
 	libtelnet_send_command(telnet, LIBTELNET_SE, user_data);
 
@@ -418,7 +418,7 @@
 	/* if we're a server and we just sent the COMPRESS2 marker, we must
 	 * make sure all further data is compressed
 	 */
-	if (telnet->mode == LIBTELNET_MODE_SERVER && type ==
+	if (telnet->mode == LIBTELNET_MODE_SERVER && opt ==
 			LIBTELNET_OPTION_COMPRESS2) {
 		/* allocate zstream box */
 		if ((telnet->zlib = (z_stream *)malloc(sizeof(z_stream)))
diff --git a/libtelnet.h b/libtelnet.h
index 8d2d861..18f43e0 100644
--- a/libtelnet.h
+++ b/libtelnet.h
@@ -85,7 +85,7 @@
 extern void libtelnet_negotiate_cb(struct libtelnet_t *telnet,
 		unsigned char cmd, unsigned char opt, void *user_data);
 extern void libtelnet_subnegotiation_cb(struct libtelnet_t *telnet,
-		unsigned char type, unsigned char *data, unsigned int size,
+		unsigned char opt, unsigned char *data, unsigned int size,
 		void *user_data);
 #ifdef HAVE_ZLIB
 extern void libtelnet_compress_cb(struct libtelnet_t *telnet,
@@ -119,7 +119,7 @@
 
 /* send sub-request */
 extern void libtelnet_send_subnegotiation(struct libtelnet_t *telnet,
-		unsigned char type, unsigned char *buffer, unsigned int size,
+		unsigned char opt, unsigned char *buffer, unsigned int size,
 		void *user_data);
 
 #endif /* !defined(LIBTELNET_INCLUDE) */