blob: a4205814571311fb1b9c2c20315f082514462fdf [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 _ATMMPC_H_
20#define _ATMMPC_H_
21#include <linux/atmapi.h>
22#include <linux/atmioc.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#include <linux/atm.h>
24#include <linux/types.h>
25#define ATMMPC_CTRL _IO('a', ATMIOC_MPOA)
Tao Baod7db5942015-01-28 10:07:51 -080026#define ATMMPC_DATA _IO('a', ATMIOC_MPOA + 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define MPC_SOCKET_INGRESS 1
28#define MPC_SOCKET_EGRESS 2
29struct atmmpc_ioc {
Tao Baod7db5942015-01-28 10:07:51 -080030 int dev_num;
Tao Baod7db5942015-01-28 10:07:51 -080031 __be32 ipaddr;
32 int type;
Ben Cheng655a7c02013-10-16 16:09:24 -070033};
34typedef struct in_ctrl_info {
Tao Baod7db5942015-01-28 10:07:51 -080035 __u8 Last_NHRP_CIE_code;
36 __u8 Last_Q2931_cause_value;
37 __u8 eg_MPC_ATM_addr[ATM_ESA_LEN];
38 __be32 tag;
Tao Baod7db5942015-01-28 10:07:51 -080039 __be32 in_dst_ip;
40 __u16 holding_time;
41 __u32 request_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070042} in_ctrl_info;
Ben Cheng655a7c02013-10-16 16:09:24 -070043typedef struct eg_ctrl_info {
Tao Baod7db5942015-01-28 10:07:51 -080044 __u8 DLL_header[256];
45 __u8 DH_length;
46 __be32 cache_id;
Tao Baod7db5942015-01-28 10:07:51 -080047 __be32 tag;
48 __be32 mps_ip;
49 __be32 eg_dst_ip;
50 __u8 in_MPC_data_ATM_addr[ATM_ESA_LEN];
Tao Baod7db5942015-01-28 10:07:51 -080051 __u16 holding_time;
Ben Cheng655a7c02013-10-16 16:09:24 -070052} eg_ctrl_info;
53struct mpc_parameters {
Tao Baod7db5942015-01-28 10:07:51 -080054 __u16 mpc_p1;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u16 mpc_p2;
56 __u8 mpc_p3[8];
57 __u16 mpc_p4;
58 __u16 mpc_p5;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u16 mpc_p6;
60};
Ben Cheng655a7c02013-10-16 16:09:24 -070061struct k_message {
Tao Baod7db5942015-01-28 10:07:51 -080062 __u16 type;
Tao Baod7db5942015-01-28 10:07:51 -080063 __be32 ip_mask;
64 __u8 MPS_ctrl[ATM_ESA_LEN];
65 union {
66 in_ctrl_info in_info;
Tao Baod7db5942015-01-28 10:07:51 -080067 eg_ctrl_info eg_info;
68 struct mpc_parameters params;
69 } content;
70 struct atm_qos qos;
Ben Cheng655a7c02013-10-16 16:09:24 -070071} __ATM_API_ALIGN;
72struct llc_snap_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080073 __u8 dsap;
74 __u8 ssap;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 ui;
76 __u8 org[3];
77 __u8 type[2];
Ben Cheng655a7c02013-10-16 16:09:24 -070078};
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define TLV_MPOA_DEVICE_TYPE 0x00a03e2a
80#define NON_MPOA 0
81#define MPS 1
82#define MPC 2
Ben Cheng655a7c02013-10-16 16:09:24 -070083#define MPS_AND_MPC 3
84#define MPC_P1 10
85#define MPC_P2 1
86#define MPC_P3 0
Ben Cheng655a7c02013-10-16 16:09:24 -070087#define MPC_P4 5
88#define MPC_P5 40
89#define MPC_P6 160
90#define HOLDING_TIME_DEFAULT 1200
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define MPC_C1 2
92#define MPC_C2 60
93#define SND_MPOA_RES_RQST 201
94#define SET_MPS_CTRL_ADDR 202
Ben Cheng655a7c02013-10-16 16:09:24 -070095#define SND_MPOA_RES_RTRY 203
96#define STOP_KEEP_ALIVE_SM 204
97#define EGRESS_ENTRY_REMOVED 205
98#define SND_EGRESS_PURGE 206
Ben Cheng655a7c02013-10-16 16:09:24 -070099#define DIE 207
100#define DATA_PLANE_PURGE 208
101#define OPEN_INGRESS_SVC 209
102#define MPOA_TRIGGER_RCVD 101
Ben Cheng655a7c02013-10-16 16:09:24 -0700103#define MPOA_RES_REPLY_RCVD 102
104#define INGRESS_PURGE_RCVD 103
105#define EGRESS_PURGE_RCVD 104
106#define MPS_DEATH 105
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define CACHE_IMPOS_RCVD 106
108#define SET_MPC_CTRL_ADDR 107
109#define SET_MPS_MAC_ADDR 108
110#define CLEAN_UP_AND_EXIT 109
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define SET_MPC_PARAMS 110
112#define RELOAD 301
113#endif