blob: 0d6aa95f8e97737e74037c9b0bb4f53c8c422c94 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef AX25_KERNEL_H
20#define AX25_KERNEL_H
21#include <linux/socket.h>
22#define AX25_MTU 256
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define AX25_MAX_DIGIS 8
24#define AX25_WINDOW 1
25#define AX25_T1 2
26#define AX25_N2 3
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define AX25_T3 4
28#define AX25_T2 5
29#define AX25_BACKOFF 6
30#define AX25_EXTSEQ 7
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define AX25_PIDINCL 8
32#define AX25_IDLE 9
33#define AX25_PACLEN 10
34#define AX25_IAMDIGI 12
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define AX25_KILL 99
Tao Baod7db5942015-01-28 10:07:51 -080036#define SIOCAX25GETUID (SIOCPROTOPRIVATE + 0)
37#define SIOCAX25ADDUID (SIOCPROTOPRIVATE + 1)
38#define SIOCAX25DELUID (SIOCPROTOPRIVATE + 2)
Tao Baod7db5942015-01-28 10:07:51 -080039#define SIOCAX25NOUID (SIOCPROTOPRIVATE + 3)
40#define SIOCAX25OPTRT (SIOCPROTOPRIVATE + 7)
41#define SIOCAX25CTLCON (SIOCPROTOPRIVATE + 8)
42#define SIOCAX25GETINFOOLD (SIOCPROTOPRIVATE + 9)
Tao Baod7db5942015-01-28 10:07:51 -080043#define SIOCAX25ADDFWD (SIOCPROTOPRIVATE + 10)
44#define SIOCAX25DELFWD (SIOCPROTOPRIVATE + 11)
45#define SIOCAX25DEVCTL (SIOCPROTOPRIVATE + 12)
46#define SIOCAX25GETINFO (SIOCPROTOPRIVATE + 13)
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define AX25_SET_RT_IPMODE 2
48#define AX25_NOUID_DEFAULT 0
49#define AX25_NOUID_BLOCK 1
50typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -080051 char ax25_call[7];
Ben Cheng655a7c02013-10-16 16:09:24 -070052} ax25_address;
53struct sockaddr_ax25 {
Tao Baod7db5942015-01-28 10:07:51 -080054 __kernel_sa_family_t sax25_family;
Tao Baod7db5942015-01-28 10:07:51 -080055 ax25_address sax25_call;
56 int sax25_ndigis;
Ben Cheng655a7c02013-10-16 16:09:24 -070057};
58#define sax25_uid sax25_ndigis
Ben Cheng655a7c02013-10-16 16:09:24 -070059struct full_sockaddr_ax25 {
Tao Baod7db5942015-01-28 10:07:51 -080060 struct sockaddr_ax25 fsa_ax25;
61 ax25_address fsa_digipeater[AX25_MAX_DIGIS];
Ben Cheng655a7c02013-10-16 16:09:24 -070062};
Ben Cheng655a7c02013-10-16 16:09:24 -070063struct ax25_routes_struct {
Tao Baod7db5942015-01-28 10:07:51 -080064 ax25_address port_addr;
65 ax25_address dest_addr;
66 unsigned char digi_count;
Tao Baod7db5942015-01-28 10:07:51 -080067 ax25_address digi_addr[AX25_MAX_DIGIS];
Ben Cheng655a7c02013-10-16 16:09:24 -070068};
69struct ax25_route_opt_struct {
Tao Baod7db5942015-01-28 10:07:51 -080070 ax25_address port_addr;
Tao Baod7db5942015-01-28 10:07:51 -080071 ax25_address dest_addr;
72 int cmd;
73 int arg;
Ben Cheng655a7c02013-10-16 16:09:24 -070074};
Ben Cheng655a7c02013-10-16 16:09:24 -070075struct ax25_ctl_struct {
Tao Baod7db5942015-01-28 10:07:51 -080076 ax25_address port_addr;
77 ax25_address source_addr;
78 ax25_address dest_addr;
Tao Baod7db5942015-01-28 10:07:51 -080079 unsigned int cmd;
80 unsigned long arg;
81 unsigned char digi_count;
82 ax25_address digi_addr[AX25_MAX_DIGIS];
Ben Cheng655a7c02013-10-16 16:09:24 -070083};
84struct ax25_info_struct_deprecated {
Tao Baod7db5942015-01-28 10:07:51 -080085 unsigned int n2, n2count;
86 unsigned int t1, t1timer;
Tao Baod7db5942015-01-28 10:07:51 -080087 unsigned int t2, t2timer;
88 unsigned int t3, t3timer;
89 unsigned int idle, idletimer;
90 unsigned int state;
Tao Baod7db5942015-01-28 10:07:51 -080091 unsigned int rcv_q, snd_q;
Ben Cheng655a7c02013-10-16 16:09:24 -070092};
93struct ax25_info_struct {
Tao Baod7db5942015-01-28 10:07:51 -080094 unsigned int n2, n2count;
Tao Baod7db5942015-01-28 10:07:51 -080095 unsigned int t1, t1timer;
96 unsigned int t2, t2timer;
97 unsigned int t3, t3timer;
98 unsigned int idle, idletimer;
Tao Baod7db5942015-01-28 10:07:51 -080099 unsigned int state;
100 unsigned int rcv_q, snd_q;
101 unsigned int vs, vr, va, vs_max;
102 unsigned int paclen;
Tao Baod7db5942015-01-28 10:07:51 -0800103 unsigned int window;
Ben Cheng655a7c02013-10-16 16:09:24 -0700104};
105struct ax25_fwd_struct {
Tao Baod7db5942015-01-28 10:07:51 -0800106 ax25_address port_from;
Tao Baod7db5942015-01-28 10:07:51 -0800107 ax25_address port_to;
Ben Cheng655a7c02013-10-16 16:09:24 -0700108};
109#endif