aboutsummaryrefslogtreecommitdiffstats
path: root/libosmocore/include/osmocore
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-25 23:42:57 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-25 23:42:57 +0200
commitd09446d28e1abf11a823a0f5ddbfeacd20bbfdc2 (patch)
tree2476b8f381420b47d03707e6553224822d6d4584 /libosmocore/include/osmocore
parentc31f480f088392e0b01f080175118ae461e5503c (diff)
parent237f6241f2b91a81b928ce4e3fc1364f61f11eaa (diff)
Merge commit '237f6241f2b91a81b928ce4e3fc1364f61f11eaa'
Diffstat (limited to 'libosmocore/include/osmocore')
-rw-r--r--libosmocore/include/osmocore/bitvec.h10
-rw-r--r--libosmocore/include/osmocore/gsm0808.h2
-rw-r--r--libosmocore/include/osmocore/protocol/gsm_04_08.h9
-rw-r--r--libosmocore/include/osmocore/rate_ctr.h8
4 files changed, 25 insertions, 4 deletions
diff --git a/libosmocore/include/osmocore/bitvec.h b/libosmocore/include/osmocore/bitvec.h
index 7a26bce45..42977fb2a 100644
--- a/libosmocore/include/osmocore/bitvec.h
+++ b/libosmocore/include/osmocore/bitvec.h
@@ -42,6 +42,10 @@ struct bitvec {
/* check if the bit is 0 or 1 for a given position inside a bitvec */
enum bit_value bitvec_get_bit_pos(const struct bitvec *bv, unsigned int bitnr);
+/* check if the bit is L or H for a given position inside a bitvec */
+enum bit_value bitvec_get_bit_pos_high(const struct bitvec *bv,
+ unsigned int bitnr);
+
/* get the Nth set bit inside the bit vector */
unsigned int bitvec_get_nth_set_bit(const struct bitvec *bv, unsigned int n);
@@ -52,12 +56,18 @@ int bitvec_set_bit_pos(struct bitvec *bv, unsigned int bitnum,
/* Set the next bit in the vector */
int bitvec_set_bit(struct bitvec *bv, enum bit_value bit);
+/* get the next bit (low/high) inside a bitvec */
+int bitvec_get_bit_high(struct bitvec *bv);
+
/* Set multiple bits at the current position */
int bitvec_set_bits(struct bitvec *bv, enum bit_value *bits, int count);
/* Add an unsigned integer (of length count bits) to current position */
int bitvec_set_uint(struct bitvec *bv, unsigned int in, int count);
+/* get multiple bits (based on numeric value) from current pos */
+int bitvec_get_uint(struct bitvec *bv, int num_bits);
+
/* Pad the bit vector up to a certain bit position */
int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit);
diff --git a/libosmocore/include/osmocore/gsm0808.h b/libosmocore/include/osmocore/gsm0808.h
index a40713f77..9166e54ff 100644
--- a/libosmocore/include/osmocore/gsm0808.h
+++ b/libosmocore/include/osmocore/gsm0808.h
@@ -36,6 +36,8 @@ struct msgb *gsm0808_create_assignment_completed(struct gsm_lchan *lchan, uint8_
uint8_t speech_mode);
struct msgb *gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause);
+void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id);
+
const struct tlv_definition *gsm0808_att_tlvdef();
#endif
diff --git a/libosmocore/include/osmocore/protocol/gsm_04_08.h b/libosmocore/include/osmocore/protocol/gsm_04_08.h
index 1a112a085..200237875 100644
--- a/libosmocore/include/osmocore/protocol/gsm_04_08.h
+++ b/libosmocore/include/osmocore/protocol/gsm_04_08.h
@@ -120,6 +120,15 @@ struct gsm48_imm_ass {
uint8_t mob_alloc[0];
} __attribute__ ((packed));
+/* Chapter 9.1.25 */
+struct gsm48_pag_resp {
+ uint8_t spare:4,
+ key_seq:4;
+ uint32_t classmark2;
+ uint8_t mi_len;
+ uint8_t mi[0];
+} __attribute__ ((packed));
+
/* Chapter 10.5.1.3 */
struct gsm48_loc_area_id {
uint8_t digits[3]; /* BCD! */
diff --git a/libosmocore/include/osmocore/rate_ctr.h b/libosmocore/include/osmocore/rate_ctr.h
index 88c9de5a6..f887d9a73 100644
--- a/libosmocore/include/osmocore/rate_ctr.h
+++ b/libosmocore/include/osmocore/rate_ctr.h
@@ -34,13 +34,13 @@ struct rate_ctr_desc {
/* Describe a counter group class */
struct rate_ctr_group_desc {
/* The prefix to the name of all counters in this group */
- char *group_name_prefix;
+ const char *group_name_prefix;
/* The human-readable description of the group */
- char *group_description;
+ const char *group_description;
/* The number of counters in this group */
- unsigned int num_ctr;
+ const unsigned int num_ctr;
/* Pointer to array of counter names */
- struct rate_ctr_desc *ctr_desc;
+ const struct rate_ctr_desc *ctr_desc;
};
/* One instance of a counter group class */