diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-01-16 11:51:18 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-01-16 11:51:18 +0100 |
commit | 60bc8e7dabb7af9ebab738d7135b73883aed9113 (patch) | |
tree | 7c21594e10fb0cee67087722a2794ce4e147cd60 /src/mtp_layer3.c | |
parent | 53559b39e574d9c4d183d1b3eb6f55e694d8e3b8 (diff) |
mtp: Allow to send SCCP/ISUP to a specific endpoint
For a linkset define where SCCP/ISUP should be send. This config
should probably move up to the application part when real work on
the routing is done. Right now the sccp_opc/sccp_dpc need to stay
inside the mtp_layer3.c to be able to send a TFA for the reachable
OPC and it is easier to keep both (dpc/opc) in the same file.
Diffstat (limited to 'src/mtp_layer3.c')
-rw-r--r-- | src/mtp_layer3.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c index d62440d..92e8f41 100644 --- a/src/mtp_layer3.c +++ b/src/mtp_layer3.c @@ -525,14 +525,18 @@ int mtp_link_set_submit_sccp_data(struct mtp_link_set *set, int sls, const uint8 } rate_ctr_inc(&set->ctrg->ctr[MTP_LSET_SCCP_OUT_MSG]); - return mtp_int_submit(set, set->sccp_opc, set->dpc, sls, MTP_SI_MNT_SCCP, data, length); + return mtp_int_submit(set, set->sccp_opc, + set->sccp_dpc == -1 ? set->dpc : set->sccp_dpc, + sls, MTP_SI_MNT_SCCP, data, length); } int mtp_link_set_submit_isup_data(struct mtp_link_set *set, int sls, const uint8_t *data, unsigned int length) { rate_ctr_inc(&set->ctrg->ctr[MTP_LSET_ISUP_OUT_MSG]); - return mtp_int_submit(set, set->isup_opc, set->dpc, sls, MTP_SI_MNT_ISUP, data, length); + return mtp_int_submit(set, set->isup_opc, + set->isup_dpc == -1 ? set->dpc : set->isup_dpc, + sls, MTP_SI_MNT_ISUP, data, length); } int mtp_link_set_send(struct mtp_link_set *set, struct msgb *msg) @@ -648,6 +652,7 @@ struct mtp_link_set *mtp_link_set_alloc(struct bsc_data *bsc) set->nr = bsc->num_linksets++; set->sccp_opc = set->isup_opc = -1; + set->sccp_dpc = set->isup_dpc = -1; set->pcap_fd = bsc->pcap_fd; set->bsc = bsc; |