diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-23 18:42:27 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-23 18:42:27 +0800 |
commit | ca157ed3c38b137aa4edc00a36f90a428bc824bd (patch) | |
tree | 993a7a3aede28e7c19a775884ef8e02b48b59d81 | |
parent | 8cb4a0f35da0431fec7132dd42273d4d754e6d93 (diff) | |
parent | ccc91f3088a79abe123862fe02f6699c0295d7e0 (diff) |
Merge branch 'on-waves/sccp'
-rw-r--r-- | openbsc/include/sccp/sccp.h | 16 | ||||
-rw-r--r-- | openbsc/include/sccp/sccp_types.h | 92 | ||||
-rw-r--r-- | openbsc/src/sccp/sccp.c | 78 | ||||
-rw-r--r-- | openbsc/tests/sccp/sccp_test.c | 40 |
4 files changed, 113 insertions, 113 deletions
diff --git a/openbsc/include/sccp/sccp.h b/openbsc/include/sccp/sccp.h index 84ae914ef..a0cdf0bae 100644 --- a/openbsc/include/sccp/sccp.h +++ b/openbsc/include/sccp/sccp.h @@ -47,12 +47,12 @@ enum { struct sockaddr_sccp { sa_family_t sccp_family; /* AF_SCCP in the future??? */ - u_int8_t sccp_ssn; /* subssystem number for routing */ + uint8_t sccp_ssn; /* subssystem number for routing */ /* TODO fill in address indicator... if that is ever needed */ /* not sure about these */ - /* u_int8_t sccp_class; */ + /* uint8_t sccp_class; */ }; /* @@ -60,13 +60,13 @@ struct sockaddr_sccp { */ struct sccp_address { struct sccp_called_party_address address; - u_int8_t ssn; - u_int8_t poi[2]; + uint8_t ssn; + uint8_t poi[2]; }; struct sccp_optional_data { - u_int8_t data_len; - u_int8_t data_start; + uint8_t data_len; + uint8_t data_start; }; struct sccp_connection { @@ -145,8 +145,8 @@ int sccp_set_read(const struct sockaddr_sccp *sock, extern const struct sockaddr_sccp sccp_ssn_bssap; /* helpers */ -u_int32_t sccp_src_ref_to_int(struct sccp_source_reference *ref); -struct sccp_source_reference sccp_src_ref_from_int(u_int32_t); +uint32_t sccp_src_ref_to_int(struct sccp_source_reference *ref); +struct sccp_source_reference sccp_src_ref_from_int(uint32_t); struct msgb *sccp_create_refuse(struct sccp_source_reference *src_ref, int cause, uint8_t *data, int length); struct msgb *sccp_create_cc(struct sccp_source_reference *src_ref, struct sccp_source_reference *dst_ref); diff --git a/openbsc/include/sccp/sccp_types.h b/openbsc/include/sccp/sccp_types.h index 22bd70f21..4b1406495 100644 --- a/openbsc/include/sccp/sccp_types.h +++ b/openbsc/include/sccp/sccp_types.h @@ -90,31 +90,31 @@ enum { struct sccp_called_party_address { #if __BYTE_ORDER == __LITTLE_ENDIAN - u_int8_t point_code_indicator : 1, + uint8_t point_code_indicator : 1, ssn_indicator : 1, global_title_indicator : 4, routing_indicator : 1, reserved : 1; #elif __BYTE_ORDER == __BIG_ENDIAN - u_int8_t reserved : 1, + uint8_t reserved : 1, routing_indicator : 1, global_title_indicator : 4, ssn_indicator : 1, point_code_indicator : 1; #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); /* indicator indicates presence in the above order */ /* Figure 6/Q.713 */ struct sccp_signalling_point_code { - u_int8_t lsb; + uint8_t lsb; #if __BYTE_ORDER == __LITTLE_ENDIAN - u_int8_t msb : 6, + uint8_t msb : 6, reserved : 2; #elif __BYTE_ORDER == __BIG_ENDIAN - u_int8_t reserved : 2, + uint8_t reserved : 2, msb : 6; #endif } __attribute__((packed)); @@ -153,20 +153,20 @@ enum { struct sccp_global_title { #if __BYTE_ORDER == __LITTLE_ENDIAN - u_int8_t nature_of_addr_ind : 7, + uint8_t nature_of_addr_ind : 7, odd_even : 1; #elif __BYTE_ORDER == __BIG_ENDIAN - u_int8_t odd_even : 1, + uint8_t odd_even : 1, nature_of_addr_ind : 7; #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); /* Q.713, 3.3 */ struct sccp_source_reference { - u_int8_t octet1; - u_int8_t octet2; - u_int8_t octet3; + uint8_t octet1; + uint8_t octet2; + uint8_t octet3; } __attribute__((packed)); /* Q.714, 3.6 */ @@ -271,19 +271,19 @@ enum sccp_refusal_cause { */ struct sccp_connection_request { /* mandantory */ - u_int8_t type; + uint8_t type; struct sccp_source_reference source_local_reference; - u_int8_t proto_class; + uint8_t proto_class; /* variable */ - u_int8_t variable_called; + uint8_t variable_called; #if VARIABLE called_party_address #endif /* optional */ - u_int8_t optional_start; + uint8_t optional_start; #if OPTIONAL credit 3 @@ -294,18 +294,18 @@ struct sccp_connection_request { end_of_optional 1 #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); struct sccp_connection_confirm { /* mandantory */ - u_int8_t type; + uint8_t type; struct sccp_source_reference destination_local_reference; struct sccp_source_reference source_local_reference; - u_int8_t proto_class; + uint8_t proto_class; /* optional */ - u_int8_t optional_start; + uint8_t optional_start; /* optional */ #if OPTIONAL @@ -316,17 +316,17 @@ struct sccp_connection_confirm { end_of_optional 1 #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); struct sccp_connection_refused { /* mandantory */ - u_int8_t type; + uint8_t type; struct sccp_source_reference destination_local_reference; - u_int8_t cause; + uint8_t cause; /* optional */ - u_int8_t optional_start; + uint8_t optional_start; /* optional */ #if OPTIONAL @@ -336,85 +336,85 @@ struct sccp_connection_refused { end_of_optional 1 #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); struct sccp_connection_released { /* mandantory */ - u_int8_t type; + uint8_t type; struct sccp_source_reference destination_local_reference; struct sccp_source_reference source_local_reference; - u_int8_t release_cause; + uint8_t release_cause; /* optional */ - u_int8_t optional_start; + uint8_t optional_start; #if OPTIONAL data 3-130 importance 3 end_of_optional 1 #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); struct sccp_connection_release_complete { - u_int8_t type; + uint8_t type; struct sccp_source_reference destination_local_reference; struct sccp_source_reference source_local_reference; } __attribute__((packed)); struct sccp_data_form1 { /* mandantory */ - u_int8_t type; + uint8_t type; struct sccp_source_reference destination_local_reference; - u_int8_t segmenting; + uint8_t segmenting; /* variable */ - u_int8_t variable_start; + uint8_t variable_start; #if VARIABLE data 2-256; #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); struct sccp_data_unitdata { /* mandantory */ - u_int8_t type; - u_int8_t proto_class; + uint8_t type; + uint8_t proto_class; /* variable */ - u_int8_t variable_called; - u_int8_t variable_calling; - u_int8_t variable_data; + uint8_t variable_called; + uint8_t variable_calling; + uint8_t variable_data; #if VARIABLE called party address calling party address #endif - u_int8_t data[0]; + uint8_t data[0]; } __attribute__((packed)); struct sccp_data_it { /* mandantory */ - u_int8_t type; + uint8_t type; struct sccp_source_reference destination_local_reference; struct sccp_source_reference source_local_reference; - u_int8_t proto_class; + uint8_t proto_class; - u_int8_t sequencing[2]; - u_int8_t credit; + uint8_t sequencing[2]; + uint8_t credit; } __attribute__((packed)); struct sccp_proto_err { - u_int8_t type; + uint8_t type; struct sccp_source_reference destination_local_reference; - u_int8_t error_cause; + uint8_t error_cause; }; #endif diff --git a/openbsc/src/sccp/sccp.c b/openbsc/src/sccp/sccp.c index f4335c01f..36570808b 100644 --- a/openbsc/src/sccp/sccp.c +++ b/openbsc/src/sccp/sccp.c @@ -63,13 +63,13 @@ struct sccp_data_callback { int (*read_cb)(struct msgb *, unsigned int, void *); void *read_context; - u_int8_t ssn; + uint8_t ssn; struct llist_head callback; }; static LLIST_HEAD(sccp_callbacks); -static struct sccp_data_callback *_find_ssn(u_int8_t ssn) +static struct sccp_data_callback *_find_ssn(uint8_t ssn) { struct sccp_data_callback *cb; @@ -99,13 +99,13 @@ static void _send_msg(struct msgb *msg) /* * parsing routines */ -static int copy_address(struct sccp_address *addr, u_int8_t offset, struct msgb *msgb) +static int copy_address(struct sccp_address *addr, uint8_t offset, struct msgb *msgb) { struct sccp_called_party_address *party; int room = msgb_l2len(msgb) - offset; - u_int8_t read = 0; - u_int8_t length; + uint8_t read = 0; + uint8_t length; if (room <= 0) { LOGP(DSCCP, LOGL_ERROR, "Not enough room for an address: %u\n", room); @@ -142,7 +142,7 @@ static int copy_address(struct sccp_address *addr, u_int8_t offset, struct msgb } if (party->global_title_indicator) { - LOGP(DSCCP, LOGL_ERROR, "GTI not supported %u\n", *(u_int8_t *)party); + LOGP(DSCCP, LOGL_ERROR, "GTI not supported %u\n", *(uint8_t *)party); return -1; } @@ -158,7 +158,7 @@ static int check_address(struct sccp_address *addr) || addr->address.routing_indicator != 1) { LOGP(DSCCP, LOGL_ERROR, "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(u_int8_t *)&addr->address, addr->ssn); + *(uint8_t *)&addr->address, addr->ssn); return -1; } @@ -168,11 +168,11 @@ static int check_address(struct sccp_address *addr) static int _sccp_parse_optional_data(const int offset, struct msgb *msgb, struct sccp_optional_data *data) { - u_int16_t room = msgb_l2len(msgb) - offset; - u_int16_t read = 0; + uint16_t room = msgb_l2len(msgb) - offset; + uint16_t read = 0; while (room > read) { - u_int8_t type = msgb->l2h[offset + read]; + uint8_t type = msgb->l2h[offset + read]; if (type == SCCP_PNC_END_OF_OPTIONAL) return 0; @@ -181,7 +181,7 @@ static int _sccp_parse_optional_data(const int offset, return 0; } - u_int8_t length = msgb->l2h[offset + read + 1]; + uint8_t length = msgb->l2h[offset + read + 1]; read += 2 + length; @@ -204,11 +204,11 @@ static int _sccp_parse_optional_data(const int offset, int _sccp_parse_connection_request(struct msgb *msgb, struct sccp_parse_result *result) { - static const u_int32_t header_size = + static const uint32_t header_size = sizeof(struct sccp_connection_request); - static const u_int32_t optional_offset = + static const uint32_t optional_offset = offsetof(struct sccp_connection_request, optional_start); - static const u_int32_t called_offset = + static const uint32_t called_offset = offsetof(struct sccp_connection_request, variable_called); struct sccp_connection_request *req = (struct sccp_connection_request *)msgb->l2h; @@ -227,7 +227,7 @@ int _sccp_parse_connection_request(struct msgb *msgb, struct sccp_parse_result * if (check_address(&result->called) != 0) { LOGP(DSCCP, LOGL_ERROR, "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(u_int8_t *)&result->called.address, result->called.ssn); + *(uint8_t *)&result->called.address, result->called.ssn); return -1; } @@ -288,7 +288,7 @@ int _sccp_parse_connection_released(struct msgb *msgb, struct sccp_parse_result int _sccp_parse_connection_refused(struct msgb *msgb, struct sccp_parse_result *result) { - static const u_int32_t header_size = + static const uint32_t header_size = sizeof(struct sccp_connection_refused); static int optional_offset = offsetof(struct sccp_connection_refused, optional_start); @@ -325,9 +325,9 @@ int _sccp_parse_connection_refused(struct msgb *msgb, struct sccp_parse_result * int _sccp_parse_connection_confirm(struct msgb *msgb, struct sccp_parse_result *result) { - static u_int32_t header_size = + static uint32_t header_size = sizeof(struct sccp_connection_confirm); - static const u_int32_t optional_offset = + static const uint32_t optional_offset = offsetof(struct sccp_connection_confirm, optional_start); struct sccp_optional_data optional_data; @@ -422,10 +422,10 @@ int _sccp_parse_connection_dt1(struct msgb *msgb, struct sccp_parse_result *resu int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) { - static const u_int32_t header_size = sizeof(struct sccp_data_unitdata); - static const u_int32_t called_offset = offsetof(struct sccp_data_unitdata, variable_called); - static const u_int32_t calling_offset = offsetof(struct sccp_data_unitdata, variable_calling); - static const u_int32_t data_offset = offsetof(struct sccp_data_unitdata, variable_data); + static const uint32_t header_size = sizeof(struct sccp_data_unitdata); + static const uint32_t called_offset = offsetof(struct sccp_data_unitdata, variable_called); + static const uint32_t calling_offset = offsetof(struct sccp_data_unitdata, variable_calling); + static const uint32_t data_offset = offsetof(struct sccp_data_unitdata, variable_data); struct sccp_data_unitdata *udt = (struct sccp_data_unitdata *)msgb->l2h; @@ -441,7 +441,7 @@ int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) if (check_address(&result->called) != 0) { LOGP(DSCCP, LOGL_ERROR, "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(u_int8_t *)&result->called.address, result->called.ssn); + *(uint8_t *)&result->called.address, result->called.ssn); return -1; } @@ -450,7 +450,7 @@ int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) if (check_address(&result->calling) != 0) { LOGP(DSCCP, LOGL_ERROR, "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(u_int8_t *)&result->called.address, result->called.ssn); + *(uint8_t *)&result->called.address, result->called.ssn); } /* we don't have enough size for the data */ @@ -475,7 +475,7 @@ int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) static int _sccp_parse_it(struct msgb *msgb, struct sccp_parse_result *result) { - static const u_int32_t header_size = sizeof(struct sccp_data_it); + static const uint32_t header_size = sizeof(struct sccp_data_it); struct sccp_data_it *it; @@ -494,7 +494,7 @@ static int _sccp_parse_it(struct msgb *msgb, struct sccp_parse_result *result) static int _sccp_parse_err(struct msgb *msgb, struct sccp_parse_result *result) { - static const u_int32_t header_size = sizeof(struct sccp_proto_err); + static const uint32_t header_size = sizeof(struct sccp_proto_err); struct sccp_proto_err *err; @@ -517,7 +517,7 @@ static int _sccp_send_data(int class, const struct sockaddr_sccp *in, const struct sockaddr_sccp *out, struct msgb *payload) { struct sccp_data_unitdata *udt; - u_int8_t *data; + uint8_t *data; if (msgb_l3len(payload) > 256) { LOGP(DSCCP, LOGL_ERROR, "The payload is too big for one udt\n"); @@ -602,7 +602,7 @@ static int destination_local_reference_is_free(struct sccp_source_reference *ref static int assign_source_local_reference(struct sccp_connection *connection) { - static u_int32_t last_ref = 0x30000; + static uint32_t last_ref = 0x30000; int wrapped = 0; do { @@ -642,7 +642,7 @@ struct msgb *sccp_create_refuse(struct sccp_source_reference *src_ref, int cause { struct msgb *msgb; struct sccp_connection_refused *ref; - u_int8_t *data; + uint8_t *data; msgb = msgb_alloc_headroom(SCCP_MSG_SIZE, SCCP_MSG_HEADROOM, "sccp ref"); @@ -687,7 +687,7 @@ struct msgb *sccp_create_cc(struct sccp_source_reference *src_ref, { struct msgb *response; struct sccp_connection_confirm *confirm; - u_int8_t *optional_data; + uint8_t *optional_data; response = msgb_alloc_headroom(SCCP_MSG_SIZE, SCCP_MSG_HEADROOM, "sccp confirm"); @@ -708,7 +708,7 @@ struct msgb *sccp_create_cc(struct sccp_source_reference *src_ref, confirm->proto_class = 2; confirm->optional_start = 1; - optional_data = (u_int8_t *) msgb_put(response, 1); + optional_data = (uint8_t *) msgb_put(response, 1); optional_data[0] = SCCP_PNC_END_OF_OPTIONAL; return response; } @@ -735,8 +735,8 @@ static int _sccp_send_connection_request(struct sccp_connection *connection, { struct msgb *request; struct sccp_connection_request *req; - u_int8_t *data; - u_int8_t extra_size = 3 + 1; + uint8_t *data; + uint8_t extra_size = 3 + 1; if (msg && (msgb_l3len(msg) < 3 || msgb_l3len(msg) > 130)) { @@ -794,7 +794,7 @@ struct msgb *sccp_create_dt1(struct sccp_source_reference *dst_ref, uint8_t *inp { struct msgb *msgb; struct sccp_data_form1 *dt1; - u_int8_t *data; + uint8_t *data; msgb = msgb_alloc_headroom(SCCP_MSG_SIZE, SCCP_MSG_HEADROOM, "sccp dt1"); @@ -866,7 +866,7 @@ struct msgb *sccp_create_rlsd(struct sccp_source_reference *src_ref, { struct msgb *msg; struct sccp_connection_released *rel; - u_int8_t *data; + uint8_t *data; msg = msgb_alloc_headroom(SCCP_MSG_SIZE, SCCP_MSG_HEADROOM, "sccp: connection released"); @@ -1348,16 +1348,16 @@ int sccp_set_read(const struct sockaddr_sccp *sock, return 0; } -static_assert(sizeof(struct sccp_source_reference) <= sizeof(u_int32_t), enough_space); +static_assert(sizeof(struct sccp_source_reference) <= sizeof(uint32_t), enough_space); -u_int32_t sccp_src_ref_to_int(struct sccp_source_reference *ref) +uint32_t sccp_src_ref_to_int(struct sccp_source_reference *ref) { - u_int32_t src_ref = 0; + uint32_t src_ref = 0; memcpy(&src_ref, ref, sizeof(*ref)); return src_ref; } -struct sccp_source_reference sccp_src_ref_from_int(u_int32_t int_ref) +struct sccp_source_reference sccp_src_ref_from_int(uint32_t int_ref) { struct sccp_source_reference ref; memcpy(&ref, &int_ref, sizeof(ref)); diff --git a/openbsc/tests/sccp/sccp_test.c b/openbsc/tests/sccp/sccp_test.c index 31eb47f9f..3b9ef4ed5 100644 --- a/openbsc/tests/sccp/sccp_test.c +++ b/openbsc/tests/sccp/sccp_test.c @@ -35,21 +35,21 @@ #define MIN(x, y) ((x) < (y) ? (x) : (y)) /* BSC -> MSC */ -static const u_int8_t bssmap_reset[] = { +static const uint8_t bssmap_reset[] = { 0x09, 0x00, 0x03, 0x05, 0x07, 0x02, 0x42, 0xfe, 0x02, 0x42, 0xfe, 0x06, 0x00, 0x04, 0x30, 0x04, 0x01, 0x20, }; /* MSC -> BSC reset ack */ -static const u_int8_t bssmap_reset_ack[] = { +static const uint8_t bssmap_reset_ack[] = { 0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x01, 0x00, 0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x03, 0x00, 0x01, 0x31, }; /* MSC -> BSC paging, connection less */ -static const u_int8_t bssmap_paging[] = { +static const uint8_t bssmap_paging[] = { 0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x01, 0x00, 0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x10, 0x00, 0x0e, 0x52, 0x08, 0x08, 0x29, 0x47, 0x10, @@ -57,7 +57,7 @@ static const u_int8_t bssmap_paging[] = { }; /* MSC -> BSC paging, UDT without PC */ -static const u_int8_t bssmap_udt[] = { +static const uint8_t bssmap_udt[] = { 0x09, 0x00, 0x03, 0x05, 0x07, 0x02, 0x42, 0xfe, 0x02, 0x42, 0xfe, 0x10, 0x00, 0x0e, 0x52, 0x08, 0x08, 0x29, 0x47, 0x10, 0x02, 0x01, 0x31, 0x97, @@ -65,7 +65,7 @@ static const u_int8_t bssmap_udt[] = { }; /* BSC -> MSC connection open */ -static const u_int8_t bssmap_cr[] = { +static const uint8_t bssmap_cr[] = { 0x01, 0x01, 0x02, 0x03, 0x02, 0x02, 0x04, 0x02, 0x42, 0xfe, 0x0f, 0x1f, 0x00, 0x1d, 0x57, 0x05, 0x08, 0x00, 0x72, 0xf4, 0x80, 0x20, 0x12, 0xc3, @@ -75,7 +75,7 @@ static const u_int8_t bssmap_cr[] = { }; /* MSC -> BSC connection confirm */ -static const u_int8_t bssmap_cc[] = { +static const uint8_t bssmap_cc[] = { 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, }; @@ -84,39 +84,39 @@ static const u_int8_t bssmap_cc[] = { * we fake a bit and make it BSC -> MSC... so the * payload does not make any sense.. */ -static const u_int8_t bssmap_dtap[] = { +static const uint8_t bssmap_dtap[] = { 0x06, 0x00, 0x00, 0x03, 0x00, 0x01, 0x0f, 0x01, 0x00, 0x0c, 0x03, 0x05, 0x5c, 0x08, 0x11, 0x81, 0x33, 0x66, 0x02, 0x13, 0x45, 0xf4, }; /* MSC -> BSC clear command */ -static const u_int8_t bssmap_clear[] = { +static const uint8_t bssmap_clear[] = { 0x06, 0x00, 0x00, 0x03, 0x00, 0x01, 0x06, 0x00, 0x04, 0x20, 0x04, 0x01, 0x09, }; /* MSC -> BSC released */ -static const u_int8_t bssmap_released[] = { +static const uint8_t bssmap_released[] = { 0x04, 0x00, 0x00, 0x03, 0x01, 0x02, 0x03, 0x00, 0x01, 0x0f, 0x02, 0x23, 0x42, 0x00, }; /* BSC -> MSC released */ -static const u_int8_t bssmap_release_complete[] = { +static const uint8_t bssmap_release_complete[] = { 0x05, 0x01, 0x02, 0x03, 0x00, 0x00, 0x03 }; struct test_data { int length; - const u_int8_t *data; + const uint8_t *data; int payload_start; int payload_length; - u_int8_t first_byte; + uint8_t first_byte; /* in case it should trigger a sccp response */ int write; - const u_int8_t *response; + const uint8_t *response; int response_length; }; @@ -256,15 +256,15 @@ struct sccp_parse_header_result { struct sccp_source_reference dst_ref; /* the input */ - const u_int8_t *input; + const uint8_t *input; int input_len; }; -static const u_int8_t it_test[] = { +static const uint8_t it_test[] = { 0x10, 0x01, 0x07, 0x94, 0x01, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00 }; -static const u_int8_t proto_err[] = { +static const uint8_t proto_err[] = { 0x0f, 0x0c, 0x04, 0x00, 0x00, }; @@ -335,8 +335,8 @@ static int write_called = 0; */ int sccp_read_cb(struct msgb *data, unsigned len, void *context) { - u_int16_t payload_length = test_data[current_test].payload_length; - const u_int8_t *got, *wanted; + uint16_t payload_length = test_data[current_test].payload_length; + const uint8_t *got, *wanted; int i; called = 1; @@ -376,7 +376,7 @@ int sccp_read_cb(struct msgb *data, unsigned len, void *context) void sccp_write_cb(struct msgb *data, void *ctx) { int i = 0; - const u_int8_t *got, *wanted; + const uint8_t *got, *wanted; if (test_data[current_test].response == NULL) { FAIL("Didn't expect write callback\n"); @@ -432,7 +432,7 @@ int sccp_accept_cb(struct sccp_connection *connection, void *user_data) static void sccp_udt_write_cb(struct msgb *data, void *context) { - const u_int8_t *got, *wanted; + const uint8_t *got, *wanted; int i; write_called = 1; |