aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-01-13 09:06:46 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-02-07 13:21:40 +0100
commit301e6287610345f6aca6b98ae2a1d5e1fcf956ef (patch)
treefcf57adc8925bcc86da33b16e37aff512e65c690 /openbsc
parentf5b36cac6b08a5c82f7e9b0facea2c1afba0fefb (diff)
[ipaccess] Create a method to send the ID ACK messages
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/ipaccess.h1
-rw-r--r--openbsc/src/input/ipaccess.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h
index 8c12e59cc..dbd9f37e8 100644
--- a/openbsc/include/openbsc/ipaccess.h
+++ b/openbsc/include/openbsc/ipaccess.h
@@ -48,6 +48,7 @@ int ipaccess_connect(struct e1inp_line *line, struct sockaddr_in *sa);
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);
/*
* Firmware specific header
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index 90d7cea85..6c7ab03ac 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -164,6 +164,12 @@ static int parse_unitid(const char *str, u_int16_t *site_id, u_int16_t *bts_id,
return 0;
}
+/* send the id ack */
+int ipaccess_send_id_ack(int fd)
+{
+ return write(fd, id_ack, sizeof(id_ack));
+}
+
/* base handling of the ip.access protocol */
int ipaccess_rcvmsg_base(struct msgb *msg,
struct bsc_fd *bfd)
@@ -180,7 +186,7 @@ int ipaccess_rcvmsg_base(struct msgb *msg,
break;
case IPAC_MSGT_ID_ACK:
DEBUGP(DMI, "ID_ACK? -> ACK!\n");
- ret = write(bfd->fd, id_ack, sizeof(id_ack));
+ ret = ipaccess_send_id_ack(bfd->fd);
break;
}
return 0;