summaryrefslogtreecommitdiffstats
path: root/ax25/axgetput/proto_bin.c
diff options
context:
space:
mode:
Diffstat (limited to 'ax25/axgetput/proto_bin.c')
-rw-r--r--ax25/axgetput/proto_bin.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ax25/axgetput/proto_bin.c b/ax25/axgetput/proto_bin.c
index aeee8bd..d61f72a 100644
--- a/ax25/axgetput/proto_bin.c
+++ b/ax25/axgetput/proto_bin.c
@@ -41,6 +41,14 @@ static int do_crc(char b, unsigned int crc)
return crc;
}
+unsigned int calc_crc(char *buf, int n, unsigned crc)
+{
+ while (--n >= 0)
+ crc = do_crc(*buf++, crc);
+
+ return crc;
+}
+
/*---------------------------------------------------------------------------*/
static long parse_sfbin_date_to_unix(const char *s)