hsl: BTS support
This patch adds the BTS support for the hsl driver.
It includes two examples under the tests/ directory.
diff --git a/include/internal.h b/include/internal.h
index a1356ad..6969748 100644
--- a/include/internal.h
+++ b/include/internal.h
@@ -1,6 +1,8 @@
#ifndef _INTERNAL_H_
#define _INTERNAL_H_
+#include <stdint.h>
+
/* talloc context for libosmo-abis. */
extern void *libosmo_abis_ctx;
@@ -10,5 +12,7 @@
/* hsl requires these functions defined in ipaccess driver. */
struct msgb;
void ipaccess_prepend_header(struct msgb *msg, int proto);
+struct msgb *ipa_msg_alloc(int headroom);
+void ipa_msg_push_header(struct msgb *msg, uint8_t proto);
#endif
diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h
index d455069..2254629 100644
--- a/include/osmocom/abis/ipa.h
+++ b/include/osmocom/abis/ipa.h
@@ -48,12 +48,13 @@
enum ipa_client_link_state state;
const char *addr;
uint16_t port;
+ int (*connect_cb)(struct ipa_client_link *link);
int (*read_cb)(struct ipa_client_link *link, struct msgb *msg);
int (*write_cb)(struct ipa_client_link *link);
void *data;
};
-struct ipa_client_link *ipa_client_link_create(void *ctx, struct e1inp_ts *ts, const char *driver_name, int priv_nr, const char *addr, uint16_t port, int (*read_cb)(struct ipa_client_link *link, struct msgb *msgb), int (*write_cb)(struct ipa_client_link *link), void *data);
+struct ipa_client_link *ipa_client_link_create(void *ctx, struct e1inp_ts *ts, const char *driver_name, int priv_nr, const char *addr, uint16_t port, int (*connect)(struct ipa_client_link *link), int (*read_cb)(struct ipa_client_link *link, struct msgb *msgb), int (*write_cb)(struct ipa_client_link *link), void *data);
void ipa_client_link_destroy(struct ipa_client_link *link);
int ipa_client_write_default_cb(struct ipa_client_link *link);
diff --git a/include/osmocom/abis/ipaccess.h b/include/osmocom/abis/ipaccess.h
index 6816d87..7083ce9 100644
--- a/include/osmocom/abis/ipaccess.h
+++ b/include/osmocom/abis/ipaccess.h
@@ -104,7 +104,8 @@
};
struct hsl_unit {
- unsigned long serno;
+ uint8_t swversion;
+ uint64_t serno;
};
#endif /* _OSMO_PROTO_IPACCESS_H */