summaryrefslogtreecommitdiff
path: root/ucspi-tcp-0.88/dns_packet.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-30 14:34:05 -0700
committerJohn Denker <jsd@av8n.com>2012-07-30 14:34:05 -0700
commit7024dc330299921af649330c45b99c21c3d7f022 (patch)
tree9f747a0423647b016376fe353ceea197a5848cbf /ucspi-tcp-0.88/dns_packet.c
parentce0dbe5332d4eb921c09cc48cc52634211d7089a (diff)
parentf8be4baf5a2318363b42f8883f66ed8a976dfc79 (diff)
Merge branch 'master' of ephedra:usr/src/qmail into e_master
Conflicts: tools/makefile
Diffstat (limited to 'ucspi-tcp-0.88/dns_packet.c')
-rw-r--r--ucspi-tcp-0.88/dns_packet.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ucspi-tcp-0.88/dns_packet.c b/ucspi-tcp-0.88/dns_packet.c
index 04a2cc8..72cfb35 100644
--- a/ucspi-tcp-0.88/dns_packet.c
+++ b/ucspi-tcp-0.88/dns_packet.c
@@ -2,10 +2,11 @@
DNS should have used LZ77 instead of its own sophomoric compression algorithm.
*/
-#include "error.h"
+#include <errno.h>
#include "dns.h"
+#include "error.h"
-unsigned int dns_packet_copy(char *buf,unsigned int len,unsigned int pos,char *out,unsigned int outlen)
+unsigned int dns_packet_copy(const char *buf,unsigned int len,unsigned int pos,char *out,unsigned int outlen)
{
while (outlen) {
if (pos >= len) { errno = error_proto; return 0; }
@@ -15,7 +16,7 @@ unsigned int dns_packet_copy(char *buf,unsigned int len,unsigned int pos,char *o
return pos;
}
-unsigned int dns_packet_skipname(char *buf,unsigned int len,unsigned int pos)
+unsigned int dns_packet_skipname(const char *buf,unsigned int len,unsigned int pos)
{
unsigned char ch;
@@ -32,7 +33,7 @@ unsigned int dns_packet_skipname(char *buf,unsigned int len,unsigned int pos)
return 0;
}
-unsigned int dns_packet_getname(char *buf,unsigned int len,unsigned int pos,char **d)
+unsigned int dns_packet_getname(const char *buf,unsigned int len,unsigned int pos,char **d)
{
unsigned int loop = 0;
unsigned int state = 0;