mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-hnodeb.git
synced 2025-10-23 08:22:16 +00:00
This is needed for instance: * AUDIO: video calls * GTP: secondary pdp contexts For better abstraction, now both AUDIO and GTP conns use unique ID namespaces, and one ID is used to identify each one. Each conn relate in turn to a UE since a context_id is passed during connection establishment. Related: SYS#5516 Change-Id: Ib3f60d5ba21defe5259c25e2034fc2217c4d93df
49 lines
1.5 KiB
C
49 lines
1.5 KiB
C
/* (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 <gtp.h>
|
|
#include <pdp.h>
|
|
|
|
#include <osmocom/core/socket.h>
|
|
#include <osmocom/core/linuxlist.h>
|
|
|
|
struct hnb;
|
|
struct hnb_ue;
|
|
|
|
int hnb_gtp_bind(struct hnb *hnb);
|
|
void hnb_gtp_unbind(struct hnb *hnb);
|
|
|
|
struct gtp_conn {
|
|
struct llist_head list; /* Item in struct hnb->ue_list */
|
|
struct hnb_ue *ue; /* backpointer */
|
|
uint32_t id;
|
|
struct osmo_sockaddr loc_addr;
|
|
struct osmo_sockaddr rem_addr;
|
|
uint32_t loc_tei;
|
|
uint32_t rem_tei;
|
|
struct pdp_t *pdp_lib;
|
|
};
|
|
|
|
struct gtp_conn *gtp_conn_alloc(struct hnb_ue *ue);
|
|
void gtp_conn_free(struct gtp_conn *conn);
|
|
|
|
int gtp_conn_setup(struct gtp_conn *conn, const struct osmo_sockaddr *rem_addr, uint32_t rem_tei);
|
|
int gtp_conn_tx(struct gtp_conn *conn, void *gtpu_payload, unsigned gtpu_payload_len);
|