forked from OpenResearchInstitute/ka9q-radio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathax25.h
38 lines (30 loc) · 856 Bytes
/
ax25.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// $Id: ax25.h,v 1.4 2018/07/06 06:10:04 karn Exp karn $
// Functions defined in ax25.c
// Copyright 2018, Phil Karn, KA9Q
#ifndef _AX25_H
#define _AX25_H 1
#include <stdio.h>
// AX.25 frame, broken down
#define MAX_DIGI 10
#define CALL_LEN 16 // Actually could be 9
#define MAX_INFO 256
struct digi {
char name[CALL_LEN];
int h; // Has been repeated bit
};
struct ax25_frame {
char dest[CALL_LEN]; // printable representations
char source[CALL_LEN];
struct digi digipeaters[MAX_DIGI];
int ndigi;
int control;
int type;
char information[MAX_INFO];
int info_len;
};
int ax25_parse(struct ax25_frame *out,unsigned char *in,int len);
int dump_frame(FILE *stream,unsigned char *frame,int bytes);
int crc_good(unsigned char *frame,int length);
char *get_callsign(char *result,unsigned char *in);
int decode_base91(char *in);
#endif