blob: 3a1d05a19b28d1dbb91fb6d4e8ed86824bbe6413 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef ROSE_KERNEL_H
8#define ROSE_KERNEL_H
9#include <linux/socket.h>
10#include <linux/ax25.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define ROSE_MTU 251
12#define ROSE_MAX_DIGIS 6
13#define ROSE_DEFER 1
14#define ROSE_T1 2
Ben Cheng655a7c02013-10-16 16:09:24 -070015#define ROSE_T2 3
16#define ROSE_T3 4
17#define ROSE_IDLE 5
18#define ROSE_QBITINCL 6
Ben Cheng655a7c02013-10-16 16:09:24 -070019#define ROSE_HOLDBACK 7
Tao Baod7db5942015-01-28 10:07:51 -080020#define SIOCRSGCAUSE (SIOCPROTOPRIVATE + 0)
21#define SIOCRSSCAUSE (SIOCPROTOPRIVATE + 1)
22#define SIOCRSL2CALL (SIOCPROTOPRIVATE + 2)
Tao Baod7db5942015-01-28 10:07:51 -080023#define SIOCRSSL2CALL (SIOCPROTOPRIVATE + 2)
24#define SIOCRSACCEPT (SIOCPROTOPRIVATE + 3)
25#define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4)
26#define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5)
Tao Baod7db5942015-01-28 10:07:51 -080027#define SIOCRSGFACILITIES (SIOCPROTOPRIVATE + 6)
Ben Cheng655a7c02013-10-16 16:09:24 -070028#define ROSE_DTE_ORIGINATED 0x00
29#define ROSE_NUMBER_BUSY 0x01
30#define ROSE_INVALID_FACILITY 0x03
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define ROSE_NETWORK_CONGESTION 0x05
32#define ROSE_OUT_OF_ORDER 0x09
33#define ROSE_ACCESS_BARRED 0x0B
34#define ROSE_NOT_OBTAINABLE 0x0D
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define ROSE_REMOTE_PROCEDURE 0x11
36#define ROSE_LOCAL_PROCEDURE 0x13
37#define ROSE_SHIP_ABSENT 0x39
38typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -080039 char rose_addr[5];
Ben Cheng655a7c02013-10-16 16:09:24 -070040} rose_address;
41struct sockaddr_rose {
Tao Baod7db5942015-01-28 10:07:51 -080042 __kernel_sa_family_t srose_family;
Tao Baod7db5942015-01-28 10:07:51 -080043 rose_address srose_addr;
44 ax25_address srose_call;
45 int srose_ndigis;
46 ax25_address srose_digi;
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
48struct full_sockaddr_rose {
Tao Baod7db5942015-01-28 10:07:51 -080049 __kernel_sa_family_t srose_family;
50 rose_address srose_addr;
Tao Baod7db5942015-01-28 10:07:51 -080051 ax25_address srose_call;
52 unsigned int srose_ndigis;
53 ax25_address srose_digis[ROSE_MAX_DIGIS];
Ben Cheng655a7c02013-10-16 16:09:24 -070054};
Ben Cheng655a7c02013-10-16 16:09:24 -070055struct rose_route_struct {
Tao Baod7db5942015-01-28 10:07:51 -080056 rose_address address;
57 unsigned short mask;
58 ax25_address neighbour;
Tao Baod7db5942015-01-28 10:07:51 -080059 char device[16];
60 unsigned char ndigis;
61 ax25_address digipeaters[AX25_MAX_DIGIS];
Ben Cheng655a7c02013-10-16 16:09:24 -070062};
Ben Cheng655a7c02013-10-16 16:09:24 -070063struct rose_cause_struct {
Tao Baod7db5942015-01-28 10:07:51 -080064 unsigned char cause;
65 unsigned char diagnostic;
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
Ben Cheng655a7c02013-10-16 16:09:24 -070067struct rose_facilities_struct {
Tao Baod7db5942015-01-28 10:07:51 -080068 rose_address source_addr, dest_addr;
69 ax25_address source_call, dest_call;
70 unsigned char source_ndigis, dest_ndigis;
Tao Baod7db5942015-01-28 10:07:51 -080071 ax25_address source_digis[ROSE_MAX_DIGIS];
72 ax25_address dest_digis[ROSE_MAX_DIGIS];
73 unsigned int rand;
74 rose_address fail_addr;
Tao Baod7db5942015-01-28 10:07:51 -080075 ax25_address fail_call;
Ben Cheng655a7c02013-10-16 16:09:24 -070076};
77#endif