Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 1 | #ifndef _GPRS_NS_H |
| 2 | #define _GPRS_NS_H |
| 3 | |
Harald Welte | eaa614c | 2010-05-02 11:26:34 +0200 | [diff] [blame] | 4 | #include <stdint.h> |
| 5 | |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 6 | /* GPRS Networks Service (NS) messages on the Gb interface |
| 7 | * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) |
| 8 | * 3GPP TS 48.016 version 6.5.0 Release 6 / ETSI TS 148 016 V6.5.0 (2005-11) */ |
| 9 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 10 | /*! \addtogroup libgb |
| 11 | * @{ |
| 12 | */ |
| 13 | |
| 14 | /*! \file gprs_ns.h */ |
| 15 | |
| 16 | /*! \brief Common header of GPRS NS */ |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 17 | struct gprs_ns_hdr { |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 18 | uint8_t pdu_type; /*!< NS PDU type */ |
| 19 | uint8_t data[0]; /*!< variable-length payload */ |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 20 | } __attribute__((packed)); |
| 21 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 22 | /*! \brief NS PDU Type (TS 08.16, Section 10.3.7, Table 14) */ |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 23 | enum ns_pdu_type { |
| 24 | NS_PDUT_UNITDATA = 0x00, |
| 25 | NS_PDUT_RESET = 0x02, |
| 26 | NS_PDUT_RESET_ACK = 0x03, |
| 27 | NS_PDUT_BLOCK = 0x04, |
| 28 | NS_PDUT_BLOCK_ACK = 0x05, |
| 29 | NS_PDUT_UNBLOCK = 0x06, |
| 30 | NS_PDUT_UNBLOCK_ACK = 0x07, |
| 31 | NS_PDUT_STATUS = 0x08, |
| 32 | NS_PDUT_ALIVE = 0x0a, |
| 33 | NS_PDUT_ALIVE_ACK = 0x0b, |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 34 | /* TS 48.016 Section 10.3.7, Table 10.3.7.1 */ |
| 35 | SNS_PDUT_ACK = 0x0c, |
| 36 | SNS_PDUT_ADD = 0x0d, |
| 37 | SNS_PDUT_CHANGE_WEIGHT = 0x0e, |
| 38 | SNS_PDUT_CONFIG = 0x0f, |
| 39 | SNS_PDUT_CONFIG_ACK = 0x10, |
| 40 | SNS_PDUT_DELETE = 0x11, |
| 41 | SNS_PDUT_SIZE = 0x12, |
| 42 | SNS_PDUT_SIZE_ACK = 0x13, |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 43 | }; |
| 44 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 45 | /*! \brief NS Control IE (TS 08.16, Section 10.3, Table 12) */ |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 46 | enum ns_ctrl_ie { |
| 47 | NS_IE_CAUSE = 0x00, |
| 48 | NS_IE_VCI = 0x01, |
| 49 | NS_IE_PDU = 0x02, |
| 50 | NS_IE_BVCI = 0x03, |
| 51 | NS_IE_NSEI = 0x04, |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 52 | /* TS 48.016 Section 10.3, Table 10.3.1 */ |
| 53 | NS_IE_IPv4_LIST = 0x05, |
| 54 | NS_IE_IPv6_LIST = 0x06, |
| 55 | NS_IE_MAX_NR_NSVC = 0x07, |
| 56 | NS_IE_IPv4_EP_NR = 0x08, |
| 57 | NS_IE_IPv6_EP_NR = 0x09, |
| 58 | NS_IE_RESET_FLAG = 0x0a, |
| 59 | NS_IE_IP_ADDR = 0x0b, |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 60 | }; |
| 61 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 62 | /*! \brief NS Cause (TS 08.16, Section 10.3.2, Table 13) */ |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 63 | enum ns_cause { |
| 64 | NS_CAUSE_TRANSIT_FAIL = 0x00, |
| 65 | NS_CAUSE_OM_INTERVENTION = 0x01, |
| 66 | NS_CAUSE_EQUIP_FAIL = 0x02, |
| 67 | NS_CAUSE_NSVC_BLOCKED = 0x03, |
| 68 | NS_CAUSE_NSVC_UNKNOWN = 0x04, |
| 69 | NS_CAUSE_BVCI_UNKNOWN = 0x05, |
| 70 | NS_CAUSE_SEM_INCORR_PDU = 0x08, |
| 71 | NS_CAUSE_PDU_INCOMP_PSTATE = 0x0a, |
| 72 | NS_CAUSE_PROTO_ERR_UNSPEC = 0x0b, |
| 73 | NS_CAUSE_INVAL_ESSENT_IE = 0x0c, |
| 74 | NS_CAUSE_MISSING_ESSENT_IE = 0x0d, |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 75 | /* TS 48.016 Section 10.3.2, Table 10.3.2.1 */ |
| 76 | NS_CAUSE_INVAL_NR_IPv4_EP = 0x0e, |
| 77 | NS_CAUSE_INVAL_NR_IPv6_EP = 0x0f, |
| 78 | NS_CAUSE_INVAL_NR_NS_VC = 0x10, |
| 79 | NS_CAUSE_INVAL_WEIGH = 0x11, |
| 80 | NS_CAUSE_UNKN_IP_EP = 0x12, |
| 81 | NS_CAUSE_UNKN_IP_ADDR = 0x13, |
| 82 | NS_CAUSE_UNKN_IP_TEST_FAILED = 0x14, |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 83 | }; |
| 84 | |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 85 | /* Our Implementation */ |
| 86 | #include <netinet/in.h> |
Pablo Neira Ayuso | 136f453 | 2011-03-22 16:47:59 +0100 | [diff] [blame] | 87 | #include <osmocom/core/linuxlist.h> |
| 88 | #include <osmocom/core/msgb.h> |
| 89 | #include <osmocom/core/timer.h> |
| 90 | #include <osmocom/core/select.h> |
Harald Welte | 8645e10 | 2012-06-16 16:09:52 +0800 | [diff] [blame] | 91 | #include <osmocom/gprs/gprs_msgb.h> |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 92 | |
Harald Welte | ea4647d | 2010-05-12 17:19:53 +0000 | [diff] [blame] | 93 | #define NS_TIMERS_COUNT 7 |
| 94 | #define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries)" |
| 95 | #define NS_TIMERS_HELP \ |
| 96 | "(un)blocking Timer (Tns-block) timeout\n" \ |
| 97 | "(un)blocking Timer (Tns-block) number of retries\n" \ |
| 98 | "Reset Timer (Tns-reset) timeout\n" \ |
| 99 | "Reset Timer (Tns-reset) number of retries\n" \ |
| 100 | "Test Timer (Tns-test) timeout\n" \ |
Holger Hans Peter Freyther | 2eb6e2c | 2011-11-05 15:14:59 +0100 | [diff] [blame] | 101 | "Alive Timer (Tns-alive) timeout\n" \ |
| 102 | "Alive Timer (Tns-alive) number of retries\n" |
Harald Welte | ea4647d | 2010-05-12 17:19:53 +0000 | [diff] [blame] | 103 | |
| 104 | enum ns_timeout { |
| 105 | NS_TOUT_TNS_BLOCK, |
| 106 | NS_TOUT_TNS_BLOCK_RETRIES, |
| 107 | NS_TOUT_TNS_RESET, |
| 108 | NS_TOUT_TNS_RESET_RETRIES, |
| 109 | NS_TOUT_TNS_TEST, |
| 110 | NS_TOUT_TNS_ALIVE, |
| 111 | NS_TOUT_TNS_ALIVE_RETRIES, |
| 112 | }; |
| 113 | |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 114 | #define NSE_S_BLOCKED 0x0001 |
| 115 | #define NSE_S_ALIVE 0x0002 |
| 116 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 117 | /*! \brief Osmocom NS link layer types */ |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 118 | enum gprs_ns_ll { |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 119 | GPRS_NS_LL_UDP, /*!< NS/UDP/IP */ |
| 120 | GPRS_NS_LL_E1, /*!< NS/E1 */ |
| 121 | GPRS_NS_LL_FR_GRE, /*!< NS/FR/GRE/IP */ |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 122 | }; |
| 123 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 124 | /*! \brief Osmoco NS events */ |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 125 | enum gprs_ns_evt { |
| 126 | GPRS_NS_EVT_UNIT_DATA, |
| 127 | }; |
| 128 | |
| 129 | struct gprs_nsvc; |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 130 | /*! \brief Osmocom GPRS callback function type */ |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 131 | typedef int gprs_ns_cb_t(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, |
Harald Welte | eaa614c | 2010-05-02 11:26:34 +0200 | [diff] [blame] | 132 | struct msgb *msg, uint16_t bvci); |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 133 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 134 | /*! \brief An instance of the NS protocol stack */ |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 135 | struct gprs_ns_inst { |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 136 | /*! \brief callback to the user for incoming UNIT DATA IND */ |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 137 | gprs_ns_cb_t *cb; |
| 138 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 139 | /*! \brief linked lists of all NSVC in this instance */ |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 140 | struct llist_head gprs_nsvcs; |
| 141 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 142 | /*! \brief a NSVC object that's needed to deal with packets for |
| 143 | * unknown NSVC */ |
Harald Welte | 9aa97fc | 2010-05-13 13:58:08 +0200 | [diff] [blame] | 144 | struct gprs_nsvc *unknown_nsvc; |
| 145 | |
Harald Welte | ea4647d | 2010-05-12 17:19:53 +0000 | [diff] [blame] | 146 | uint16_t timeout[NS_TIMERS_COUNT]; |
| 147 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 148 | /*! \brief NS-over-IP specific bits */ |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 149 | struct { |
Pablo Neira Ayuso | 4db9299 | 2011-05-06 12:11:23 +0200 | [diff] [blame] | 150 | struct osmo_fd fd; |
Harald Welte | ff3bde8 | 2010-05-19 15:09:09 +0200 | [diff] [blame] | 151 | uint32_t local_ip; |
| 152 | uint16_t local_port; |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 153 | } nsip; |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 154 | /*! \brief NS-over-FR-over-GRE-over-IP specific bits */ |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 155 | struct { |
Pablo Neira Ayuso | 4db9299 | 2011-05-06 12:11:23 +0200 | [diff] [blame] | 156 | struct osmo_fd fd; |
Harald Welte | ff3bde8 | 2010-05-19 15:09:09 +0200 | [diff] [blame] | 157 | uint32_t local_ip; |
Holger Hans Peter Freyther | 3e60348 | 2012-03-02 14:14:33 +0100 | [diff] [blame] | 158 | unsigned int enabled:1; |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 159 | } frgre; |
Harald Welte | b77c697 | 2010-05-01 11:28:43 +0200 | [diff] [blame] | 160 | }; |
| 161 | |
Harald Welte | 05b320a | 2010-05-03 20:16:13 +0200 | [diff] [blame] | 162 | enum nsvc_timer_mode { |
| 163 | /* standard timers */ |
| 164 | NSVC_TIMER_TNS_TEST, |
| 165 | NSVC_TIMER_TNS_ALIVE, |
Harald Welte | 199d9df | 2010-05-03 20:55:10 +0200 | [diff] [blame] | 166 | NSVC_TIMER_TNS_RESET, |
| 167 | _NSVC_TIMER_NR, |
Harald Welte | 05b320a | 2010-05-03 20:16:13 +0200 | [diff] [blame] | 168 | }; |
| 169 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 170 | /*! \brief Structure representing a single NS-VC */ |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 171 | struct gprs_nsvc { |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 172 | /*! \brief list of NS-VCs within NS Instance */ |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 173 | struct llist_head list; |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 174 | /*! \brief pointer to NS Instance */ |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 175 | struct gprs_ns_inst *nsi; |
| 176 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 177 | uint16_t nsei; /*! \brief end-to-end significance */ |
| 178 | uint16_t nsvci; /*! \brief uniquely identifies NS-VC at SGSN */ |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 179 | |
Harald Welte | eaa614c | 2010-05-02 11:26:34 +0200 | [diff] [blame] | 180 | uint32_t state; |
| 181 | uint32_t remote_state; |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 182 | |
Pablo Neira Ayuso | bf540cb | 2011-05-06 12:11:06 +0200 | [diff] [blame] | 183 | struct osmo_timer_list timer; |
Harald Welte | 05b320a | 2010-05-03 20:16:13 +0200 | [diff] [blame] | 184 | enum nsvc_timer_mode timer_mode; |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 185 | int alive_retries; |
| 186 | |
Harald Welte | 1194b58 | 2010-05-12 15:55:23 +0000 | [diff] [blame] | 187 | unsigned int remote_end_is_sgsn:1; |
| 188 | unsigned int persistent:1; |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 189 | |
Harald Welte | f2b4cd7 | 2010-05-13 11:45:07 +0200 | [diff] [blame] | 190 | struct rate_ctr_group *ctrg; |
| 191 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 192 | /*! \brief which link-layer are we based on? */ |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 193 | enum gprs_ns_ll ll; |
| 194 | |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 195 | union { |
| 196 | struct { |
| 197 | struct sockaddr_in bts_addr; |
| 198 | } ip; |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 199 | struct { |
| 200 | struct sockaddr_in bts_addr; |
| 201 | } frgre; |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 202 | }; |
| 203 | }; |
| 204 | |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 205 | /* Create a new NS protocol instance */ |
Harald Welte | a6a20b4 | 2012-06-16 16:40:42 +0800 | [diff] [blame] | 206 | struct gprs_ns_inst *gprs_ns_instantiate(gprs_ns_cb_t *cb, void *ctx); |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 207 | |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 208 | /* Destroy a NS protocol instance */ |
| 209 | void gprs_ns_destroy(struct gprs_ns_inst *nsi); |
| 210 | |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 211 | /* Listen for incoming GPRS packets via NS/UDP */ |
Harald Welte | ff3bde8 | 2010-05-19 15:09:09 +0200 | [diff] [blame] | 212 | int gprs_ns_nsip_listen(struct gprs_ns_inst *nsi); |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 213 | |
Harald Welte | e6599ee | 2012-06-17 12:25:53 +0800 | [diff] [blame^] | 214 | /* Establish a connection (from the BSS) to the SGSN */ |
| 215 | struct gprs_nsvc *gprs_ns_nsip_connect(struct gprs_ns_inst *nsi, |
| 216 | struct sockaddr_in *dest, |
| 217 | uint16_t nsei, uint16_t nsvci); |
| 218 | |
| 219 | |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 220 | struct sockaddr_in; |
| 221 | |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 222 | /* main function for higher layers (BSSGP) to send NS messages */ |
Harald Welte | 44f1c27 | 2010-04-30 19:54:29 +0200 | [diff] [blame] | 223 | int gprs_ns_sendmsg(struct gprs_ns_inst *nsi, struct msgb *msg); |
Harald Welte | cb99163 | 2010-04-26 19:18:54 +0200 | [diff] [blame] | 224 | |
Harald Welte | 99e3248 | 2010-05-11 06:20:54 +0200 | [diff] [blame] | 225 | int gprs_ns_tx_reset(struct gprs_nsvc *nsvc, uint8_t cause); |
| 226 | int gprs_ns_tx_block(struct gprs_nsvc *nsvc, uint8_t cause); |
| 227 | int gprs_ns_tx_unblock(struct gprs_nsvc *nsvc); |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 228 | |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 229 | /* Listen for incoming GPRS packets via NS/FR/GRE */ |
Harald Welte | ff3bde8 | 2010-05-19 15:09:09 +0200 | [diff] [blame] | 230 | int gprs_ns_frgre_listen(struct gprs_ns_inst *nsi); |
Harald Welte | 9f75c35 | 2010-04-30 20:26:32 +0200 | [diff] [blame] | 231 | |
Harald Welte | e6599ee | 2012-06-17 12:25:53 +0800 | [diff] [blame^] | 232 | struct gprs_nsvc *gprs_nsvc_create(struct gprs_ns_inst *nsi, uint16_t nsvci); |
| 233 | void gprs_nsvc_delete(struct gprs_nsvc *nsvc); |
| 234 | struct gprs_nsvc *gprs_nsvc_by_nsei(struct gprs_ns_inst *nsi, uint16_t nsei); |
| 235 | struct gprs_nsvc *gprs_nsvc_by_nsvci(struct gprs_ns_inst *nsi, uint16_t nsvci); |
Harald Welte | f2b4cd7 | 2010-05-13 11:45:07 +0200 | [diff] [blame] | 236 | |
Harald Welte | 1ccbf44 | 2010-05-14 11:53:08 +0000 | [diff] [blame] | 237 | /* Initiate a RESET procedure (including timer start, ...)*/ |
Holger Hans Peter Freyther | 83e0b3f | 2010-05-23 21:18:01 +0800 | [diff] [blame] | 238 | void gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause); |
Harald Welte | 1ccbf44 | 2010-05-14 11:53:08 +0000 | [diff] [blame] | 239 | |
Harald Welte | 1194b58 | 2010-05-12 15:55:23 +0000 | [diff] [blame] | 240 | /* Add NS-specific VTY stuff */ |
| 241 | int gprs_ns_vty_init(struct gprs_ns_inst *nsi); |
| 242 | |
Holger Hans Peter Freyther | 2844144 | 2010-06-14 22:11:40 +0800 | [diff] [blame] | 243 | #define NS_ALLOC_SIZE 2048 |
Harald Welte | e4860d7 | 2010-05-19 15:38:10 +0200 | [diff] [blame] | 244 | #define NS_ALLOC_HEADROOM 20 |
| 245 | static inline struct msgb *gprs_ns_msgb_alloc(void) |
| 246 | { |
| 247 | return msgb_alloc_headroom(NS_ALLOC_SIZE, NS_ALLOC_HEADROOM, "GPRS/NS"); |
| 248 | } |
Harald Welte | 5540c4c | 2010-05-19 14:38:50 +0200 | [diff] [blame] | 249 | |
Harald Welte | a6a20b4 | 2012-06-16 16:40:42 +0800 | [diff] [blame] | 250 | enum signal_ns { |
| 251 | S_NS_RESET, |
| 252 | S_NS_BLOCK, |
| 253 | S_NS_UNBLOCK, |
| 254 | S_NS_ALIVE_EXP, /* Tns-alive expired more than N times */ |
| 255 | }; |
| 256 | |
| 257 | struct ns_signal_data { |
| 258 | struct gprs_nsvc *nsvc; |
| 259 | uint8_t cause; |
| 260 | }; |
| 261 | |
Harald Welte | 68d85d5 | 2012-06-16 17:45:59 +0800 | [diff] [blame] | 262 | void gprs_ns_set_log_ss(int ss); |
| 263 | |
Harald Welte | 914660d | 2011-11-23 15:01:31 +0100 | [diff] [blame] | 264 | /*! }@ */ |
| 265 | |
Harald Welte | 9b455bf | 2010-03-14 15:45:01 +0800 | [diff] [blame] | 266 | #endif |