diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-26 21:01:58 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-26 21:01:58 +0100 |
commit | 2a9bf2b61589a802454bd5c00c7f5575540b421f (patch) | |
tree | da09aa9aafaff29601760c3c5b5b9496655f46d5 | |
parent | 7694381f52983f95320f8e01f4d8b4cca934dfff (diff) |
mtp: Set the network indicator in the mtp_msg_alloc
Prepare to have different network indicators.
-rw-r--r-- | src/mtp_layer3.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c index 7182320..6b92666 100644 --- a/src/mtp_layer3.c +++ b/src/mtp_layer3.c @@ -45,6 +45,7 @@ static struct msgb *mtp_msg_alloc(struct mtp_link *link) msg->l2h = msgb_put(msg, sizeof(*hdr)); hdr = (struct mtp_level_3_hdr *) msg->l2h; hdr->addr = MTP_ADDR(0x0, link->dpc, link->opc); + hdr->ni = MTP_NI_NATION_NET; return msg; } @@ -59,7 +60,6 @@ static struct msgb *mtp_create_sltm(struct mtp_link *link) return NULL; hdr = (struct mtp_level_3_hdr *) msg->l2h; - hdr->ni = MTP_NI_NATION_NET; hdr->ser_ind = MTP_SI_MNT_REG_MSG; mng = (struct mtp_level_3_mng *) msgb_put(msg, sizeof(*mng)); @@ -86,7 +86,6 @@ static struct msgb *mtp_create_slta(struct mtp_link *link, struct mtp_level_3_mn return NULL; hdr = (struct mtp_level_3_hdr *) out->l2h; - hdr->ni = MTP_NI_NATION_NET; hdr->ser_ind = MTP_SI_MNT_REG_MSG; mng = (struct mtp_level_3_mng *) msgb_put(out, sizeof(*mng)); mng->cmn.h0 = MTP_TST_MSG_GRP; @@ -108,7 +107,6 @@ static struct msgb *mtp_tfp_alloc(struct mtp_link *link, int apoc) return NULL; hdr = (struct mtp_level_3_hdr *) out->l2h; - hdr->ni = MTP_NI_NATION_NET; hdr->ser_ind = MTP_SI_MNT_SNM_MSG; prb = (struct mtp_level_3_prohib *) msgb_put(out, sizeof(*prb)); prb->cmn.h0 = MTP_PROHIBIT_MSG_GRP; @@ -127,7 +125,6 @@ static struct msgb *mtp_tra_alloc(struct mtp_link *link) return NULL; hdr = (struct mtp_level_3_hdr *) out->l2h; - hdr->ni = MTP_NI_NATION_NET; hdr->ser_ind = MTP_SI_MNT_SNM_MSG; cmn = (struct mtp_level_3_cmn *) msgb_put(out, sizeof(*cmn)); cmn->h0 = MTP_TRF_RESTR_MSG_GRP; @@ -149,7 +146,6 @@ static struct msgb *mtp_sccp_alloc_ssa(struct mtp_link *link, int sls) return NULL; hdr = (struct mtp_level_3_hdr *) out->l2h; - hdr->ni = MTP_NI_NATION_NET; hdr->ser_ind = MTP_SI_MNT_SCCP; /* this appears to be round robin or such.. */ @@ -495,7 +491,6 @@ int mtp_link_submit_sccp_data(struct mtp_link *link, int sls, const uint8_t *dat return -1; hdr = (struct mtp_level_3_hdr *) msg->l2h; - hdr->ni = MTP_NI_NATION_NET; hdr->ser_ind = MTP_SI_MNT_SCCP; hdr->addr = MTP_ADDR(sls % 16, link->dpc, link->opc); |