open5gs/test/common/testpacket.h

110 lines
5.0 KiB
C
Raw Normal View History

2017-03-05 06:02:12 +00:00
#ifndef __TESTS1AP_H__
#define __TESTS1AP_H__
#include "core_network.h"
#include "core_pkbuf.h"
2018-01-04 11:38:22 +00:00
#include "s1ap/s1ap_message.h"
2017-03-05 06:02:12 +00:00
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
CORE_DECLARE(status_t) testpacket_init();
CORE_DECLARE(status_t) testpacket_final();
CORE_DECLARE(status_t) tests1ap_enb_connect(sock_id *new);
CORE_DECLARE(status_t) tests1ap_enb_close(sock_id id);
CORE_DECLARE(status_t) tests1ap_enb_send(sock_id id, pkbuf_t *sendbuf);
CORE_DECLARE(status_t) tests1ap_enb_read(sock_id id, pkbuf_t *recvbuf);
2017-03-05 06:02:12 +00:00
CORE_DECLARE(status_t) tests1ap_build_setup_req(
2018-03-05 14:01:07 +00:00
pkbuf_t **pkbuf, S1AP_ENB_ID_PR present, c_uint32_t enb_id);
CORE_DECLARE(status_t) tests1ap_build_initial_ue_msg(pkbuf_t **pkbuf, int i);
2017-07-28 03:48:49 +00:00
CORE_DECLARE(status_t) tests1ap_build_identity_response(pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_authentication_response(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_authentication_failure(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_security_mode_complete(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_esm_information_response(
pkbuf_t **pkbuf, int i);
2017-04-13 14:14:59 +00:00
CORE_DECLARE(status_t) tests1ap_build_ue_capability_info_indication(
pkbuf_t **pkbuf, int i);
2017-04-13 14:14:59 +00:00
CORE_DECLARE(status_t) tests1ap_build_initial_context_setup_response(
2017-12-08 15:58:16 +00:00
pkbuf_t **pkbuf,
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
c_uint8_t ebi, c_uint32_t teid);
CORE_DECLARE(status_t) tests1ap_build_initial_context_setup_failure(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_attach_complete(pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_emm_status(pkbuf_t **pkbuf, int i);
2017-07-26 05:18:28 +00:00
CORE_DECLARE(status_t) tests1ap_build_detach_request(pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_ue_context_release_request(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_ue_context_release_complete(
pkbuf_t **pkbuf, int i);
2018-01-21 06:44:30 +00:00
CORE_DECLARE(status_t) tests1ap_build_service_request(pkbuf_t **pkbuf,
c_uint32_t enb_ue_s1ap_id, c_uint8_t seq,
c_uint16_t mac, c_uint32_t m_tmsi);
CORE_DECLARE(status_t) tests1ap_build_tau_request(pkbuf_t **pkbuf, int i,
2018-02-04 07:58:56 +00:00
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, c_uint8_t active_flag,
c_uint32_t m_tmsi, c_uint8_t seq, c_uint32_t mac, c_uint8_t *knas_int);
CORE_DECLARE(status_t) tests1ap_build_pdn_connectivity_request(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_pdn_disconnectivity_request(
pkbuf_t **pkbuf, int i);
2017-09-06 15:37:16 +00:00
CORE_DECLARE(status_t) tests1ap_build_e_rab_setup_response(
pkbuf_t **pkbuf,
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
c_uint8_t ebi, c_uint32_t teid);
2018-01-17 07:01:11 +00:00
CORE_DECLARE(status_t) tests1ap_build_e_rab_modify_response(
pkbuf_t **pkbuf, int i);
2017-09-07 14:41:05 +00:00
CORE_DECLARE(status_t) tests1ap_build_e_rab_release_response(
pkbuf_t **pkbuf, int i);
2017-09-06 15:37:16 +00:00
CORE_DECLARE(status_t) tests1ap_build_activate_default_bearer_accept(
pkbuf_t **pkbuf, int i);
2017-09-04 16:17:24 +00:00
CORE_DECLARE(status_t) tests1ap_build_activate_dedicated_bearer_accept(
pkbuf_t **pkbuf, int i);
2018-01-17 07:01:11 +00:00
CORE_DECLARE(status_t) tests1ap_build_modify_bearer_accept(
pkbuf_t **pkbuf, int i);
2017-09-07 14:41:05 +00:00
CORE_DECLARE(status_t) tests1ap_build_deactivate_bearer_accept(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_path_switch_request(
pkbuf_t **pkbuf, int target,
2017-12-09 09:21:22 +00:00
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
int num_of_bearer, c_uint8_t ebi, c_uint32_t teid);
2017-09-12 14:07:55 +00:00
CORE_DECLARE(status_t) tests1ap_build_handover_required(pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_handover_failure(pkbuf_t **pkbuf, int i);
2017-09-12 14:07:55 +00:00
CORE_DECLARE(status_t) tests1ap_build_handover_request_ack(
pkbuf_t **pkbuf, int target,
2017-12-09 09:21:22 +00:00
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
int num_of_bearer, c_uint8_t ebi, c_uint32_t teid);
CORE_DECLARE(status_t) tests1ap_build_handover_request_ack_static(
2017-09-12 14:07:55 +00:00
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_enb_status_transfer(
pkbuf_t **pkbuf, int i);
CORE_DECLARE(status_t) tests1ap_build_enb_configuration_transfer(
pkbuf_t **pkbuf, int i);
2017-09-12 14:07:55 +00:00
CORE_DECLARE(status_t) tests1ap_build_handover_notify(pkbuf_t **pkbuf, int i);
2017-09-15 03:06:26 +00:00
CORE_DECLARE(status_t) tests1ap_build_handover_cancel(pkbuf_t **pkbuf, int i);
2017-03-05 06:02:12 +00:00
2018-03-21 07:10:20 +00:00
CORE_DECLARE(status_t) tests1ap_build_s1_reset(pkbuf_t **pkbuf, int i);
2017-12-16 09:06:34 +00:00
CORE_DECLARE(status_t) testgtpu_enb_connect(sock_id *new);
CORE_DECLARE(status_t) testgtpu_enb2_connect(sock_id *new);
2017-12-16 09:06:34 +00:00
CORE_DECLARE(status_t) testgtpu_enb_close(sock_id sock);
CORE_DECLARE(status_t) testgtpu_enb_read(sock_id sock, pkbuf_t *recvbuf);
CORE_DECLARE(status_t) testgtpu_enb_send(pkbuf_t *sendbuf);
CORE_DECLARE(status_t) testgtpu_build_ping(pkbuf_t **sendbuf,
const char *src_ip, const char *dst_ip);
CORE_DECLARE(status_t) testgtpu_build_slacc_rs(pkbuf_t **sendbuf, int i);
2017-03-05 06:02:12 +00:00
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __TESTS1AP_H__ */