mirror of
https://agent.ghink.cloud/wb2osz/direwolf
synced 2025-04-06 20:58:30 +00:00
modified: .gitattributes modified: APRStt-Implementation-Notes.pdf modified: CHANGES.txt modified: Makefile.linux modified: Makefile.win new file: Raspberry-Pi-APRS-Tracker.pdf modified: Raspberry-Pi-APRS.pdf modified: User-Guide.pdf modified: aclients.c modified: aprs_tt.c modified: aprs_tt.h modified: atest.c modified: audio.c modified: audio.h modified: audio_win.c modified: ax25_pad.c modified: ax25_pad.h modified: beacon.c modified: beacon.h modified: config.c modified: config.h modified: decode_aprs.c modified: decode_aprs.h modified: demod_afsk.c modified: digipeater.c modified: digipeater.h modified: direwolf.c modified: direwolf.conf modified: direwolf.h modified: dsp.c modified: dwgps.c modified: encode_aprs.c modified: encode_aprs.h modified: fsk_demod_state.h new file: grm_sym.h modified: hdlc_rec.c modified: hdlc_rec2.c modified: hdlc_rec2.h modified: kiss.c modified: kiss_frame.c modified: kiss_frame.h modified: kissnet.c modified: latlong.c modified: latlong.h new file: log.c new file: log.h new file: log2gpx.c new file: mgn_icon.h modified: misc/README-dire-wolf.txt modified: multi_modem.c new file: nmea.c new file: nmea.h modified: ptt.c modified: rdq.c modified: regex/README-dire-wolf.txt new file: rpack.h modified: rrbb.c modified: rrbb.h modified: server.c modified: symbols-new.txt modified: symbols.c modified: symbolsX.txt new file: telemetry.c new file: telemetry.h modified: textcolor.c modified: tocalls.txt modified: utm/README.txt modified: version.h modified: xmit.c modified: xmit.h
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
|
|
/* kiss_frame.h */
|
|
|
|
|
|
/*
|
|
* Special characters used by SLIP protocol.
|
|
*/
|
|
|
|
#define FEND 0xC0
|
|
#define FESC 0xDB
|
|
#define TFEND 0xDC
|
|
#define TFESC 0xDD
|
|
|
|
|
|
enum kiss_state_e {
|
|
KS_SEARCHING, /* Looking for FEND to start KISS frame. */
|
|
KS_COLLECTING}; /* In process of collecting KISS frame. */
|
|
|
|
|
|
#define MAX_KISS_LEN 2048 /* Spec calls for at least 1024. */
|
|
/* Might want to make it longer to accomodate */
|
|
/* maximum packet length. */
|
|
|
|
#define MAX_NOISE_LEN 100
|
|
|
|
typedef struct kiss_frame_s {
|
|
|
|
enum kiss_state_e state;
|
|
|
|
unsigned char kiss_msg[MAX_KISS_LEN];
|
|
/* Leading FEND is optional. */
|
|
/* Contains escapes and ending FEND. */
|
|
int kiss_len;
|
|
|
|
unsigned char noise[MAX_NOISE_LEN];
|
|
int noise_len;
|
|
|
|
} kiss_frame_t;
|
|
|
|
|
|
|
|
int kiss_encapsulate (unsigned char *in, int ilen, unsigned char *out);
|
|
|
|
void kiss_rec_byte (kiss_frame_t *kf, unsigned char ch, int debug, void (*sendfun)(int,unsigned char*,int));
|
|
|
|
|
|
typedef enum fromto_e { FROM_CLIENT=0, TO_CLIENT=1 } fromto_t;
|
|
|
|
void kiss_debug_print (fromto_t fromto, char *special, unsigned char *pmsg, int msg_len);
|
|
|
|
/* end kiss_frame.h */ |