Commit 854858ca authored by liuyu's avatar liuyu

dockerfile and ausf ip

parent 8da86738
FROM ubuntu:18.04
ADD . /opt/5gc/amf
ENV DEBIAN_FRONTEND=noninteractive
RUN export http_proxy=http://10.112.222.16:8123
RUN export https_proxy=http://10.112.222.16:8123
RUN mkdir amf
RUN cd amf
COPY ./amf /amf
RUN apt-get update -y && \
apt-get install --no-install-recommends -y net-tools vim inetutils-ping && \
mkdir /opt/5gc/log
apt-get install --no-install-recommends -y net-tools vim inetutils-ping git
RUN apt-get install -y update-notifier-common
RUN git config --global http.proxy http://10.112.222.16:8123
RUN git config --global https.proxy http://10.112.222.16:8123
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600
RUN git config --global http.sslverify false
RUN ./amf/build/scripts/build_amf -I -f
RUN ./amf/build/scripts/build_amf -c -b Debug -j
EXPOSE 8282 38412/sctp
CMD ["/opt/5gc/amf/start.sh"]
CMD ["/bin/bash"]
......@@ -69,8 +69,8 @@ AMF =
# AMF binded interface for Nausf interface
NAUSF:
{
INTERFACE_NAME = "ens18"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "192.168.199.10";
PORT = 8383; # YOUR NETWORK CONFIG HERE
};
......
......@@ -197,7 +197,10 @@ int amf_config::load(const std::string& config_file) {
if (is_Nausf) {
const Setting& nausf_amf_cfg =
new_if_cfg[AMF_CONFIG_STRING_INTERFACE_NAUSF];
load_interface(nausf_amf_cfg, nausf);
// load_interface(nausf_amf_cfg, nausf);
nausf_amf_cfg.lookupValue(AMF_CONFIG_STRING_INTERFACE_NAME, nausf.if_name);
nausf_amf_cfg.lookupValue(AMF_CONFIG_STRING_IPV4_ADDRESS, nausf.addr4);
nausf_amf_cfg.lookupValue(AMF_CONFIG_STRING_PORT, nausf.port);
}
const Setting& n11_cfg = new_if_cfg[AMF_CONFIG_STRING_INTERFACE_N11];
load_interface(n11_cfg, n11);
......@@ -461,7 +464,7 @@ void amf_config::display() {
Logger::config().info(
" iface ................: %s", nausf.if_name.c_str());
Logger::config().info(
" ip ...................: %s", inet_ntoa(nausf.addr4));
" ip ...................: %s", nausf.addr4.c_str());
Logger::config().info(" port .................: %d", nausf.port);
} else {
Logger::config().warn(
......
......@@ -170,6 +170,11 @@ typedef struct {
bool selected;
} smf_inst_t;
typedef struct {
std::string if_name;
std::string addr4;
unsigned int port;
} ausf_if;
class amf_config {
public:
amf_config();
......@@ -185,7 +190,8 @@ class amf_config {
std::string pid_dir;
interface_cfg_t n2;
interface_cfg_t n11;
interface_cfg_t nausf;
//interface_cfg_t nausf;
ausf_if nausf;
itti_cfg_t itti;
unsigned int statistics_interval;
std::string AMF_Name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment