aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-02-07 12:04:07 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-02-07 12:04:07 +0100
commit04b4f915a761f80bf026bcbc783185ce0d3cec1d (patch)
tree0b95466608124c2254b7ac1fccc205ca63f0fcef /openbsc
parent4d95ab2231d451826130f1774d26ebf9c29bb56b (diff)
[ipa] Make sending of ID REQ public...
Make sending of the ID Request message public. We are going to use this in the BSC NAT code to ask for querying the BSC.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/ipaccess.h1
-rw-r--r--openbsc/src/input/ipaccess.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h
index 1801f6ca8..f74681e8f 100644
--- a/openbsc/include/openbsc/ipaccess.h
+++ b/openbsc/include/openbsc/ipaccess.h
@@ -45,5 +45,6 @@ int ipaccess_rcvmsg_base(struct msgb *msg, struct bsc_fd *bfd);
struct msgb *ipaccess_read_msg(struct bsc_fd *bfd, int *error);
void ipaccess_prepend_header(struct msgb *msg, int proto);
int ipaccess_send_id_ack(int fd);
+int ipaccess_send_id_req(int fd);
#endif /* _IPACCESS_H */
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index a645da85d..e49ea3e51 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -170,6 +170,11 @@ int ipaccess_send_id_ack(int fd)
return write(fd, id_ack, sizeof(id_ack));
}
+int ipaccess_send_id_req(int fd)
+{
+ return write(fd, id_req, sizeof(id_req));
+}
+
/* base handling of the ip.access protocol */
int ipaccess_rcvmsg_base(struct msgb *msg,
struct bsc_fd *bfd)
@@ -527,7 +532,7 @@ static int listen_fd_cb(struct bsc_fd *listen_bfd, unsigned int what)
}
/* Request ID. FIXME: request LOCATION, HW/SW VErsion, Unit Name, Serno */
- ret = write(bfd->fd, id_req, sizeof(id_req));
+ ret = ipaccess_send_id_req(bfd->fd);
return ret;
//return e1inp_line_register(line);