diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-17 20:21:45 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-17 20:23:09 +0100 |
commit | 541fd98a3ba5e6b03ae73b55f7ea2ea18917d376 (patch) | |
tree | 0d777902af5bfc8dbb448e425d7dc2ff8c4f294b | |
parent | 0e3b355a427b683ed4a568b0680193c091263efd (diff) |
stp: Allow to forward all ISUP messages without any modification
-rw-r--r-- | include/mtp_data.h | 3 | ||||
-rw-r--r-- | src/isup.c | 5 | ||||
-rw-r--r-- | src/main_stp.c | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/mtp_data.h b/include/mtp_data.h index 652c024..95d54bd 100644 --- a/include/mtp_data.h +++ b/include/mtp_data.h @@ -67,6 +67,9 @@ struct mtp_link_set { struct llist_head links; struct mtp_link *slc[16]; + /* special handling */ + int pass_all_isup; + /* custom data */ struct bsc_data *bsc; }; @@ -120,6 +120,11 @@ int mtp_link_set_isup(struct mtp_link_set *link, struct msgb *msg, int sls) return -1; } + if (link->pass_all_isup) { + mtp_link_set_forward_isup(link, msg, sls); + return 0; + } + hdr = (struct isup_msg_hdr *) msg->l3h; payload_size = msgb_l3len(msg) - sizeof(*hdr); diff --git a/src/main_stp.c b/src/main_stp.c index fb10ea3..4f93416 100644 --- a/src/main_stp.c +++ b/src/main_stp.c @@ -246,6 +246,10 @@ int main(int argc, char **argv) bsc.m2ua_set->ni = 3; bsc.m2ua_set->bsc = &bsc; + /* for both links we want to have all isup messages */ + bsc.m2ua_set->pass_all_isup = 1; + bsc.link_set->pass_all_isup = 1; + lnk = sctp_m2ua_transp_create("0.0.0.0", 2904); lnk->base.pcap_fd = -1; lnk->base.the_link = bsc.m2ua_set; |