aboutsummaryrefslogtreecommitdiffstats
path: root/src/mtp_layer3.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-08 11:28:12 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-12-08 11:28:12 +0100
commitae7418177e590dfcd572194a3953e806f2ace187 (patch)
tree0b37c796ebbfba4c25e08dca118363a75590498d /src/mtp_layer3.c
parent3a80cb2593673868673f602aeec3991ae2640c3a (diff)
mtp: Print a TFP message on the screen when we get a message
Diffstat (limited to 'src/mtp_layer3.c')
-rw-r--r--src/mtp_layer3.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c
index 14933f2..7dd3a7f 100644
--- a/src/mtp_layer3.c
+++ b/src/mtp_layer3.c
@@ -288,6 +288,7 @@ static int mtp_link_sign_msg(struct mtp_link *link, struct mtp_level_3_hdr *hdr,
{
struct msgb *msg;
struct mtp_level_3_cmn *cmn;
+ uint16_t *apc;
if (hdr->ni != link->ni || l3_len < 1) {
LOGP(DINP, LOGL_ERROR, "Unhandled data (ni: %d len: %d)\n",
@@ -321,6 +322,21 @@ static int mtp_link_sign_msg(struct mtp_link *link, struct mtp_level_3_hdr *hdr,
break;
}
break;
+ case MTP_PROHIBIT_MSG_GRP:
+ switch (cmn->h1) {
+ case MTP_PROHIBIT_MSG_SIG:
+ if (l3_len < 3) {
+ LOGP(DINP, LOGL_ERROR, "TFP is too short.\n");
+ return -1;
+ }
+
+ apc = (uint16_t *) &hdr->data[1];
+ LOGP(DINP, LOGL_INFO,
+ "TFP for the affected point code: %d\n", *apc);
+ return 0;
+ break;
+ }
+ break;
}
LOGP(DINP, LOGL_ERROR, "Unknown message:%d/%d %s\n", cmn->h0, cmn->h1, hexdump(&hdr->data[0], l3_len));