From c00ee7399d06ecaee66795e56e546cef89768cb2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 21 Jun 2011 12:22:49 +0200 Subject: e1input: add address as parameter to e1inp_line_update(...) This patch adds a new parameter to e1inp_line_update that allows to specific the address for A-bis over IP BSC/BTS. --- src/input/ipaccess.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/input/ipaccess.c') diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 4a86300..18e30dc 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -378,8 +378,8 @@ static int ipaccess_fd_cb(struct osmo_fd *bfd, unsigned int what) return rc; } -static int -ipaccess_line_update(struct e1inp_line *line, enum e1inp_line_role role); +static int ipaccess_line_update(struct e1inp_line *line, + enum e1inp_line_role role, const char *addr); struct e1inp_driver ipaccess_driver = { .name = "ipa", @@ -479,8 +479,8 @@ static int rsl_listen_fd_cb(struct osmo_fd *listen_bfd, unsigned int what) return 0; } -static int -ipaccess_line_update(struct e1inp_line *line, enum e1inp_line_role role) +static int ipaccess_line_update(struct e1inp_line *line, + enum e1inp_line_role role, const char *addr) { int ret = -ENOENT; @@ -490,8 +490,7 @@ ipaccess_line_update(struct e1inp_line *line, enum e1inp_line_role role) /* Listen for OML connections */ ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, - "0.0.0.0", IPA_TCP_PORT_OML, - OSMO_SOCK_F_BIND); + addr, IPA_TCP_PORT_OML, OSMO_SOCK_F_BIND); if (ret < 0) return ret; @@ -506,8 +505,7 @@ ipaccess_line_update(struct e1inp_line *line, enum e1inp_line_role role) } /* Listen for RSL connections */ ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, - "0.0.0.0", IPA_TCP_PORT_RSL, - OSMO_SOCK_F_BIND); + addr, IPA_TCP_PORT_RSL, OSMO_SOCK_F_BIND); if (ret < 0) return ret; @@ -526,7 +524,7 @@ ipaccess_line_update(struct e1inp_line *line, enum e1inp_line_role role) LOGP(DINP, LOGL_NOTICE, "enabling ipaccess BTS mode\n"); - link = ipa_client_link_create(tall_ipa_ctx); + link = ipa_client_link_create(tall_ipa_ctx, addr); if (link == NULL) { perror("ipa_client_link_create: "); return -ENOMEM; -- cgit v1.2.3-55-g7522