mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-hnodeb.git
synced 2025-10-23 08:22:16 +00:00
The higher level bits were used in originally imported hnb-test code in order to control interaction with the HNBGW over the VTY. This is no longer needed in osmo-hnodeb, as NAS is in layers above the ones being handled by an hNodeB. Regarding RANAP, most of it is going to be handled by the LowerLayer UD socket peer to be introduced in the future, so we can drop most of it, as in osmo-hnodeb we'll basically be speaking RUA to the HNBGW and passing RANAP buffers transparently. We keep the .c/.h files since some small helpers functions will be ntroduced later on when adding support for the mentioned LL socket. Related: SYS#5516 Change-Id: I6aae54734c1c4607beede19169f16bafe35b3a61
78 lines
1.9 KiB
C
78 lines
1.9 KiB
C
/* (C) 2015 by Daniel Willmann <dwillmann@sysmocom.de>
|
|
* (C) 2021 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
|
|
* Author: Pau Espin Pedrol <pespin@sysmocom.de>
|
|
* All Rights Reserved
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/lienses/>.
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include <asn1c/asn1helpers.h>
|
|
|
|
#include <osmocom/core/select.h>
|
|
#include <osmocom/core/linuxlist.h>
|
|
#include <osmocom/core/write_queue.h>
|
|
#include <osmocom/core/logging.h>
|
|
#include <osmocom/gsm/gsm23003.h>
|
|
#include <osmocom/netif/stream.h>
|
|
|
|
enum {
|
|
DMAIN,
|
|
DHNBAP,
|
|
DRUA,
|
|
DRANAP,
|
|
DSCTP,
|
|
};
|
|
extern const struct log_info hnb_log_info;
|
|
|
|
struct hnb_chan {
|
|
int is_ps;
|
|
uint32_t conn_id;
|
|
char *imsi;
|
|
};
|
|
|
|
struct hnb {
|
|
char *identity; /* HNB-Identity */
|
|
struct osmo_plmn_id plmn;
|
|
uint16_t cell_identity;
|
|
uint16_t lac;
|
|
uint8_t rac;
|
|
uint16_t sac;
|
|
struct {
|
|
char *local_addr;
|
|
uint16_t local_port;
|
|
char *remote_addr;
|
|
uint16_t remote_port;
|
|
struct osmo_stream_cli *client;
|
|
} iuh;
|
|
|
|
uint16_t rnc_id;
|
|
|
|
uint32_t ctx_id;
|
|
|
|
struct osmo_fsm_inst *shutdown_fi; /* FSM instance to manage shutdown procedure during process exit */
|
|
bool shutdown_fi_exit_proc; /* exit process when shutdown_fsm is finished? */
|
|
|
|
struct {
|
|
struct hnb_chan *chan;
|
|
} cs;
|
|
};
|
|
|
|
struct hnb *hnb_alloc(void *tall_ctx);
|
|
void hnb_free(struct hnb *hnb);
|
|
|
|
extern void *tall_hnb_ctx;
|
|
extern struct hnb *g_hnb;
|