remove old obsolete linux kernel and wireshark patches
Those were relevant in 2008/2009, but not today... Also, move hlrsync to the contrib directory
This commit is contained in:
parent
c696cc28d8
commit
d8352d75b6
|
@ -1,144 +0,0 @@
|
|||
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c linux-2.6.27.4/drivers/isdn/mISDN/layer2.c
|
||||
--- linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c 2008-10-26 00:05:07.000000000 +0200
|
||||
+++ linux-2.6.27.4/drivers/isdn/mISDN/layer2.c 2008-12-23 16:16:29.000000000 +0100
|
||||
@@ -94,8 +94,10 @@
|
||||
struct layer2 *l2 = fi->userdata;
|
||||
va_list va;
|
||||
|
||||
+#if 0
|
||||
if (!(*debug & DEBUG_L2_FSM))
|
||||
return;
|
||||
+#endif
|
||||
va_start(va, fmt);
|
||||
printk(KERN_DEBUG "l2 (tei %d): ", l2->tei);
|
||||
vprintk(fmt, va);
|
||||
@@ -882,6 +884,8 @@
|
||||
l2->va = 0;
|
||||
l2->vr = 0;
|
||||
l2->sow = 0;
|
||||
+ l2->sapi = skb->data[0] >> 2;
|
||||
+ set_channel_address(&l2->ch, l2->sapi, l2->tei);
|
||||
clear_exception(l2);
|
||||
send_uframe(l2, NULL, UA | get_PollFlag(l2, skb), RSP);
|
||||
mISDN_FsmChangeState(fi, ST_L2_7);
|
||||
@@ -898,6 +902,7 @@
|
||||
struct layer2 *l2 = fi->userdata;
|
||||
struct sk_buff *skb = arg;
|
||||
|
||||
+ printk(KERN_DEBUG "l2_send_UA()\n");
|
||||
send_uframe(l2, skb, UA | get_PollFlag(l2, skb), RSP);
|
||||
}
|
||||
|
||||
@@ -931,6 +936,8 @@
|
||||
l2->va = 0;
|
||||
l2->vr = 0;
|
||||
l2->sow = 0;
|
||||
+ l2->sapi = skb->data[0] >> 2;
|
||||
+ set_channel_address(&l2->ch, l2->sapi, l2->tei);
|
||||
mISDN_FsmChangeState(fi, ST_L2_7);
|
||||
stop_t200(l2, 3);
|
||||
mISDN_FsmRestartTimer(&l2->t203, l2->T203, EV_L2_T203, NULL, 3);
|
||||
@@ -982,6 +989,8 @@
|
||||
} else if (l2->vs != l2->va) {
|
||||
skb_queue_purge(&l2->i_queue);
|
||||
pr = DL_ESTABLISH_IND;
|
||||
+ //l2->sapi = skb->data[0] >> 2;
|
||||
+ //set_channel_address(&l2->ch, l2->sapi, l2->tei);
|
||||
}
|
||||
stop_t200(l2, 5);
|
||||
l2->vr = 0;
|
||||
@@ -1841,11 +1850,14 @@
|
||||
u_int l;
|
||||
int c = 0;
|
||||
|
||||
+ printk(KERN_DEBUG "ph_data_indication 0x%x 0x%x 0x%x\n", datap[0], datap[1], datap[2]);
|
||||
+
|
||||
l = l2addrsize(l2);
|
||||
if (skb->len <= l) {
|
||||
mISDN_FsmEvent(&l2->l2m, EV_L2_FRAME_ERROR, (void *) 'N');
|
||||
return ret;
|
||||
}
|
||||
+#if 0
|
||||
if (test_bit(FLG_LAPD, &l2->flag)) { /* Maybe not needed */
|
||||
psapi = *datap++;
|
||||
ptei = *datap++;
|
||||
@@ -1875,6 +1887,7 @@
|
||||
return 0;
|
||||
}
|
||||
} else
|
||||
+#endif
|
||||
datap += l;
|
||||
if (!(*datap & 1)) { /* I-Frame */
|
||||
c = iframe_error(l2, skb);
|
||||
@@ -1890,6 +1903,7 @@
|
||||
ret = mISDN_FsmEvent(&l2->l2m, EV_L2_UI, skb);
|
||||
} else if (IsSABME(datap, l2)) {
|
||||
c = unnum_error(l2, skb, CMD);
|
||||
+ printk(KERN_DEBUG "IsSABME() returned true, unnum_error=%d\n", c);
|
||||
if (!c)
|
||||
ret = mISDN_FsmEvent(&l2->l2m, EV_L2_SABME, skb);
|
||||
} else if (IsUA(datap)) {
|
||||
@@ -2087,7 +2101,7 @@
|
||||
test_and_set_bit(FLG_LAPD, &l2->flag);
|
||||
test_and_set_bit(FLG_LAPD_NET, &l2->flag);
|
||||
test_and_set_bit(FLG_MOD128, &l2->flag);
|
||||
- l2->sapi = 0;
|
||||
+ l2->sapi = 62;
|
||||
l2->maxlen = MAX_DFRAME_LEN;
|
||||
if (test_bit(OPTION_L2_PMX, &options))
|
||||
l2->window = 7;
|
||||
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c linux-2.6.27.4/drivers/isdn/mISDN/tei.c
|
||||
--- linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c 2008-10-26 00:05:07.000000000 +0200
|
||||
+++ linux-2.6.27.4/drivers/isdn/mISDN/tei.c 2008-12-23 16:32:59.000000000 +0100
|
||||
@@ -830,18 +830,29 @@
|
||||
int tei, ri;
|
||||
struct layer2 *l2;
|
||||
|
||||
+ printk(KERN_DEBUG "new tei request: tei=%d\n", dp[3] >> 1);
|
||||
+
|
||||
ri = dp[0] << 8;
|
||||
ri += dp[1];
|
||||
- if (!mgr->up)
|
||||
- goto denied;
|
||||
- tei = get_free_tei(mgr);
|
||||
- if (tei < 0) {
|
||||
- printk(KERN_WARNING "%s:No free tei\n", __func__);
|
||||
+ if (!mgr->up) {
|
||||
+ printk(KERN_DEBUG "mgr->up == NULL\n");
|
||||
goto denied;
|
||||
}
|
||||
+ if (dp[3] != 0xff) {
|
||||
+ /* This is a TEI request according to 3GPP TS 08.56 6.1.11.2 */
|
||||
+ tei = dp[3] >> 1;
|
||||
+ } else {
|
||||
+ tei = get_free_tei(mgr);
|
||||
+ if (tei < 0) {
|
||||
+ printk(KERN_WARNING "%s:No free tei\n", __func__);
|
||||
+ goto denied;
|
||||
+ }
|
||||
+ }
|
||||
l2 = create_new_tei(mgr, tei);
|
||||
- if (!l2)
|
||||
+ if (!l2) {
|
||||
+ printk(KERN_DEBUG "create_new_tei == NULL\n");
|
||||
goto denied;
|
||||
+ }
|
||||
else
|
||||
mISDN_FsmEvent(&l2->tm->tei_m, EV_ASSIGN_REQ, dp);
|
||||
return;
|
||||
@@ -1159,12 +1170,14 @@
|
||||
return -ENOTCONN;
|
||||
if (skb->len != 3)
|
||||
return -ENOTCONN;
|
||||
+#if 0
|
||||
if (skb->data[0] != 0)
|
||||
/* only SAPI 0 command */
|
||||
return -ENOTCONN;
|
||||
+#endif
|
||||
if (!(skb->data[1] & 1)) /* invalid EA1 */
|
||||
return -EINVAL;
|
||||
- tei = skb->data[1] >> 0;
|
||||
+ tei = skb->data[1] >> 1;
|
||||
if (tei > 63) /* not a fixed tei */
|
||||
return -ENOTCONN;
|
||||
if ((skb->data[2] & ~0x10) != SABME)
|
|
@ -1,486 +0,0 @@
|
|||
This experimental patch splits one E1 card into three virtual cards,
|
||||
|
||||
TS 1,2,3,4,5 is card 0
|
||||
TS 6,7,8,9,10 is card 1
|
||||
TS 11,12,13,14 is card 2
|
||||
|
||||
This allows you to run one L2 TEI handler on each of the virtual cards,
|
||||
which is required if you want to run multiple BTS on a single E1 link.
|
||||
|
||||
Thanks to Andreas Eversberg for this patch.
|
||||
|
||||
diff --git a/drivers/isdn/hardware/mISDN/hfc_multi.h b/drivers/isdn/hardware/mISDN/hfc_multi.h
|
||||
index 0c77386..02dd4a1 100644
|
||||
--- a/drivers/isdn/hardware/mISDN/hfc_multi.h
|
||||
+++ b/drivers/isdn/hardware/mISDN/hfc_multi.h
|
||||
@@ -209,14 +209,17 @@ struct hfc_multi {
|
||||
u_long ledstate; /* save last state of leds */
|
||||
int opticalsupport; /* has the e1 board */
|
||||
/* an optical Interface */
|
||||
- int dslot; /* channel # of d-channel (E1) default 16 */
|
||||
+
|
||||
+ u_int bmask[32]; /* bitmask of bchannels for port */
|
||||
+ u_char dnum[32]; /* array of used dchannel numbers for port */
|
||||
+ u_char created[32]; /* what port is created */
|
||||
+ u_int activity[32]; /* if there is any action on this */
|
||||
+ /* port (will be cleared after */
|
||||
+ /* showing led-states) */
|
||||
|
||||
u_long wdcount; /* every 500 ms we need to */
|
||||
/* send the watchdog a signal */
|
||||
u_char wdbyte; /* watchdog toggle byte */
|
||||
- u_int activity[8]; /* if there is any action on this */
|
||||
- /* port (will be cleared after */
|
||||
- /* showing led-states) */
|
||||
int e1_state; /* keep track of last state */
|
||||
int e1_getclock; /* if sync is retrieved from interface */
|
||||
int syncronized; /* keep track of existing sync interface */
|
||||
@@ -233,7 +236,6 @@ struct hfc_multi {
|
||||
* the bch->channel is equvalent to the hfc-channel
|
||||
*/
|
||||
struct hfc_chan chan[32];
|
||||
- u_char created[8]; /* what port is created */
|
||||
signed char slot_owner[256]; /* owner channel of slot */
|
||||
};
|
||||
|
||||
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
|
||||
index e1dab30..4fe2d27 100644
|
||||
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
|
||||
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
|
||||
@@ -1619,8 +1619,8 @@ hfcmulti_leds(struct hfc_multi *hc)
|
||||
* left red: frame sync, but no L1
|
||||
* right green: L2 active
|
||||
*/
|
||||
- if (hc->chan[hc->dslot].sync != 2) { /* no frame sync */
|
||||
- if (hc->chan[hc->dslot].dch->dev.D.protocol
|
||||
+ if (hc->chan[hc->dnum[0]].sync != 2) { /* no frame sync */
|
||||
+ if (hc->chan[hc->dnum[0]].dch->dev.D.protocol
|
||||
!= ISDN_P_NT_E1) {
|
||||
led[0] = 1;
|
||||
led[1] = 1;
|
||||
@@ -2428,55 +2428,56 @@ handle_timer_irq(struct hfc_multi *hc)
|
||||
}
|
||||
}
|
||||
if (hc->ctype == HFC_TYPE_E1 && hc->created[0]) {
|
||||
- dch = hc->chan[hc->dslot].dch;
|
||||
- if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dslot].cfg)) {
|
||||
+#warning todo: put interface parameters to hc
|
||||
+ dch = hc->chan[hc->dnum[0]].dch;
|
||||
+ if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dnum[0]].cfg)) {
|
||||
/* LOS */
|
||||
temp = HFC_inb_nodebug(hc, R_SYNC_STA) & V_SIG_LOS;
|
||||
- if (!temp && hc->chan[hc->dslot].los)
|
||||
+ if (!temp && hc->chan[hc->dnum[0]].los)
|
||||
signal_state_up(dch, L1_SIGNAL_LOS_ON,
|
||||
"LOS detected");
|
||||
- if (temp && !hc->chan[hc->dslot].los)
|
||||
+ if (temp && !hc->chan[hc->dnum[0]].los)
|
||||
signal_state_up(dch, L1_SIGNAL_LOS_OFF,
|
||||
"LOS gone");
|
||||
- hc->chan[hc->dslot].los = temp;
|
||||
+ hc->chan[hc->dnum[0]].los = temp;
|
||||
}
|
||||
- if (test_bit(HFC_CFG_REPORT_AIS, &hc->chan[hc->dslot].cfg)) {
|
||||
+ if (test_bit(HFC_CFG_REPORT_AIS, &hc->chan[hc->dnum[0]].cfg)) {
|
||||
/* AIS */
|
||||
temp = HFC_inb_nodebug(hc, R_SYNC_STA) & V_AIS;
|
||||
- if (!temp && hc->chan[hc->dslot].ais)
|
||||
+ if (!temp && hc->chan[hc->dnum[0]].ais)
|
||||
signal_state_up(dch, L1_SIGNAL_AIS_ON,
|
||||
"AIS detected");
|
||||
- if (temp && !hc->chan[hc->dslot].ais)
|
||||
+ if (temp && !hc->chan[hc->dnum[0]].ais)
|
||||
signal_state_up(dch, L1_SIGNAL_AIS_OFF,
|
||||
"AIS gone");
|
||||
- hc->chan[hc->dslot].ais = temp;
|
||||
+ hc->chan[hc->dnum[0]].ais = temp;
|
||||
}
|
||||
- if (test_bit(HFC_CFG_REPORT_SLIP, &hc->chan[hc->dslot].cfg)) {
|
||||
+ if (test_bit(HFC_CFG_REPORT_SLIP, &hc->chan[hc->dnum[0]].cfg)) {
|
||||
/* SLIP */
|
||||
temp = HFC_inb_nodebug(hc, R_SLIP) & V_FOSLIP_RX;
|
||||
- if (!temp && hc->chan[hc->dslot].slip_rx)
|
||||
+ if (!temp && hc->chan[hc->dnum[0]].slip_rx)
|
||||
signal_state_up(dch, L1_SIGNAL_SLIP_RX,
|
||||
" bit SLIP detected RX");
|
||||
- hc->chan[hc->dslot].slip_rx = temp;
|
||||
+ hc->chan[hc->dnum[0]].slip_rx = temp;
|
||||
temp = HFC_inb_nodebug(hc, R_SLIP) & V_FOSLIP_TX;
|
||||
- if (!temp && hc->chan[hc->dslot].slip_tx)
|
||||
+ if (!temp && hc->chan[hc->dnum[0]].slip_tx)
|
||||
signal_state_up(dch, L1_SIGNAL_SLIP_TX,
|
||||
" bit SLIP detected TX");
|
||||
- hc->chan[hc->dslot].slip_tx = temp;
|
||||
+ hc->chan[hc->dnum[0]].slip_tx = temp;
|
||||
}
|
||||
- if (test_bit(HFC_CFG_REPORT_RDI, &hc->chan[hc->dslot].cfg)) {
|
||||
+ if (test_bit(HFC_CFG_REPORT_RDI, &hc->chan[hc->dnum[0]].cfg)) {
|
||||
/* RDI */
|
||||
temp = HFC_inb_nodebug(hc, R_RX_SL0_0) & V_A;
|
||||
- if (!temp && hc->chan[hc->dslot].rdi)
|
||||
+ if (!temp && hc->chan[hc->dnum[0]].rdi)
|
||||
signal_state_up(dch, L1_SIGNAL_RDI_ON,
|
||||
"RDI detected");
|
||||
- if (temp && !hc->chan[hc->dslot].rdi)
|
||||
+ if (temp && !hc->chan[hc->dnum[0]].rdi)
|
||||
signal_state_up(dch, L1_SIGNAL_RDI_OFF,
|
||||
"RDI gone");
|
||||
- hc->chan[hc->dslot].rdi = temp;
|
||||
+ hc->chan[hc->dnum[0]].rdi = temp;
|
||||
}
|
||||
temp = HFC_inb_nodebug(hc, R_JATT_DIR);
|
||||
- switch (hc->chan[hc->dslot].sync) {
|
||||
+ switch (hc->chan[hc->dnum[0]].sync) {
|
||||
case 0:
|
||||
if ((temp & 0x60) == 0x60) {
|
||||
if (debug & DEBUG_HFCMULTI_SYNC)
|
||||
@@ -2485,10 +2486,10 @@ handle_timer_irq(struct hfc_multi *hc)
|
||||
"in clock sync\n",
|
||||
__func__, hc->id);
|
||||
HFC_outb(hc, R_RX_OFF,
|
||||
- hc->chan[hc->dslot].jitter | V_RX_INIT);
|
||||
+ hc->chan[hc->dnum[0]].jitter | V_RX_INIT);
|
||||
HFC_outb(hc, R_TX_OFF,
|
||||
- hc->chan[hc->dslot].jitter | V_RX_INIT);
|
||||
- hc->chan[hc->dslot].sync = 1;
|
||||
+ hc->chan[hc->dnum[0]].jitter | V_RX_INIT);
|
||||
+ hc->chan[hc->dnum[0]].sync = 1;
|
||||
goto check_framesync;
|
||||
}
|
||||
break;
|
||||
@@ -2499,7 +2500,7 @@ handle_timer_irq(struct hfc_multi *hc)
|
||||
"%s: (id=%d) E1 "
|
||||
"lost clock sync\n",
|
||||
__func__, hc->id);
|
||||
- hc->chan[hc->dslot].sync = 0;
|
||||
+ hc->chan[hc->dnum[0]].sync = 0;
|
||||
break;
|
||||
}
|
||||
check_framesync:
|
||||
@@ -2510,7 +2511,7 @@ check_framesync:
|
||||
"%s: (id=%d) E1 "
|
||||
"now in frame sync\n",
|
||||
__func__, hc->id);
|
||||
- hc->chan[hc->dslot].sync = 2;
|
||||
+ hc->chan[hc->dnum[0]].sync = 2;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
@@ -2520,7 +2521,7 @@ check_framesync:
|
||||
"%s: (id=%d) E1 lost "
|
||||
"clock & frame sync\n",
|
||||
__func__, hc->id);
|
||||
- hc->chan[hc->dslot].sync = 0;
|
||||
+ hc->chan[hc->dnum[0]].sync = 0;
|
||||
break;
|
||||
}
|
||||
temp = HFC_inb_nodebug(hc, R_SYNC_STA);
|
||||
@@ -2530,7 +2531,7 @@ check_framesync:
|
||||
"%s: (id=%d) E1 "
|
||||
"lost frame sync\n",
|
||||
__func__, hc->id);
|
||||
- hc->chan[hc->dslot].sync = 1;
|
||||
+ hc->chan[hc->dnum[0]].sync = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2746,7 +2747,8 @@ hfcmulti_interrupt(int intno, void *dev_id)
|
||||
if (r_irq_misc & V_STA_IRQ) {
|
||||
if (hc->ctype == HFC_TYPE_E1) {
|
||||
/* state machine */
|
||||
- dch = hc->chan[hc->dslot].dch;
|
||||
+#warning todo
|
||||
+ dch = hc->chan[hc->dnum[0]].dch;
|
||||
e1_syncsta = HFC_inb_nodebug(hc, R_SYNC_STA);
|
||||
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)
|
||||
&& hc->e1_getclock) {
|
||||
@@ -2768,7 +2770,15 @@ hfcmulti_interrupt(int intno, void *dev_id)
|
||||
}
|
||||
dch->state = HFC_inb_nodebug(hc, R_E1_RD_STA)
|
||||
& 0x7;
|
||||
+#warning todo hack!!! broadcast state change!!!
|
||||
+ dch = hc->chan[hc->dnum[0]].dch;
|
||||
schedule_event(dch, FLG_PHCHANGE);
|
||||
+ dch = hc->chan[hc->dnum[1]].dch;
|
||||
+ dch->state = HFC_inb_nodebug(hc, R_E1_RD_STA)
|
||||
+ & 0x7;
|
||||
+ schedule_event(dch, FLG_PHCHANGE);
|
||||
+
|
||||
+
|
||||
if (debug & DEBUG_HFCMULTI_STATE)
|
||||
printk(KERN_DEBUG
|
||||
"%s: E1 (id=%d) newstate %x\n",
|
||||
@@ -3851,31 +3861,35 @@ hfcmulti_initmode(struct dchannel *dch)
|
||||
if (debug & DEBUG_HFCMULTI_INIT)
|
||||
printk(KERN_DEBUG "%s: entered\n", __func__);
|
||||
|
||||
+ i = dch->slot;
|
||||
+ pt = hc->chan[i].port;
|
||||
if (hc->ctype == HFC_TYPE_E1) {
|
||||
- hc->chan[hc->dslot].slot_tx = -1;
|
||||
- hc->chan[hc->dslot].slot_rx = -1;
|
||||
- hc->chan[hc->dslot].conf = -1;
|
||||
- if (hc->dslot) {
|
||||
- mode_hfcmulti(hc, hc->dslot, dch->dev.D.protocol,
|
||||
+ /* E1 */
|
||||
+#warning todo: don''t do it if dnum == 0
|
||||
+ hc->chan[hc->dnum[pt]].slot_tx = -1;
|
||||
+ hc->chan[hc->dnum[pt]].slot_rx = -1;
|
||||
+ hc->chan[hc->dnum[pt]].conf = -1;
|
||||
+ if (hc->dnum[pt]) {
|
||||
+ mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol,
|
||||
-1, 0, -1, 0);
|
||||
dch->timer.function = (void *) hfcmulti_dbusy_timer;
|
||||
dch->timer.data = (long) dch;
|
||||
init_timer(&dch->timer);
|
||||
}
|
||||
for (i = 1; i <= 31; i++) {
|
||||
- if (i == hc->dslot)
|
||||
+ if (!((1 << i) & hc->bmask[pt])) /* skip unused channel */
|
||||
continue;
|
||||
hc->chan[i].slot_tx = -1;
|
||||
hc->chan[i].slot_rx = -1;
|
||||
hc->chan[i].conf = -1;
|
||||
mode_hfcmulti(hc, i, ISDN_P_NONE, -1, 0, -1, 0);
|
||||
}
|
||||
- /* E1 */
|
||||
- if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dslot].cfg)) {
|
||||
+#warning todo (global)
|
||||
+ if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dnum[pt]].cfg)) {
|
||||
HFC_outb(hc, R_LOS0, 255); /* 2 ms */
|
||||
HFC_outb(hc, R_LOS1, 255); /* 512 ms */
|
||||
}
|
||||
- if (test_bit(HFC_CFG_OPTICAL, &hc->chan[hc->dslot].cfg)) {
|
||||
+ if (test_bit(HFC_CFG_OPTICAL, &hc->chan[hc->dnum[pt]].cfg)) {
|
||||
HFC_outb(hc, R_RX0, 0);
|
||||
hc->hw.r_tx0 = 0 | V_OUT_EN;
|
||||
} else {
|
||||
@@ -3888,12 +3902,12 @@ hfcmulti_initmode(struct dchannel *dch)
|
||||
HFC_outb(hc, R_TX_FR0, 0x00);
|
||||
HFC_outb(hc, R_TX_FR1, 0xf8);
|
||||
|
||||
- if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dslot].cfg))
|
||||
+ if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dnum[pt]].cfg))
|
||||
HFC_outb(hc, R_TX_FR2, V_TX_MF | V_TX_E | V_NEG_E);
|
||||
|
||||
HFC_outb(hc, R_RX_FR0, V_AUTO_RESYNC | V_AUTO_RECO | 0);
|
||||
|
||||
- if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dslot].cfg))
|
||||
+ if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dnum[pt]].cfg))
|
||||
HFC_outb(hc, R_RX_FR1, V_RX_MF | V_RX_MF_SYNC);
|
||||
|
||||
if (dch->dev.D.protocol == ISDN_P_NT_E1) {
|
||||
@@ -3957,7 +3971,7 @@ hfcmulti_initmode(struct dchannel *dch)
|
||||
plxsd_checksync(hc, 0);
|
||||
}
|
||||
} else {
|
||||
- i = dch->slot;
|
||||
+ /* ST */
|
||||
hc->chan[i].slot_tx = -1;
|
||||
hc->chan[i].slot_rx = -1;
|
||||
hc->chan[i].conf = -1;
|
||||
@@ -3973,8 +3987,6 @@ hfcmulti_initmode(struct dchannel *dch)
|
||||
hc->chan[i - 1].slot_rx = -1;
|
||||
hc->chan[i - 1].conf = -1;
|
||||
mode_hfcmulti(hc, i - 1, ISDN_P_NONE, -1, 0, -1, 0);
|
||||
- /* ST */
|
||||
- pt = hc->chan[i].port;
|
||||
/* select interface */
|
||||
HFC_outb(hc, R_ST_SEL, pt);
|
||||
/* undocumented: delay after R_ST_SEL */
|
||||
@@ -4557,6 +4569,8 @@ release_port(struct hfc_multi *hc, struct dchannel *dch)
|
||||
}
|
||||
/* free channels */
|
||||
for (i = 0; i <= 31; i++) {
|
||||
+ if (!((1 << i) & hc->bmask[pt])) /* skip unused channel */
|
||||
+ continue;
|
||||
if (hc->chan[i].bch) {
|
||||
if (debug & DEBUG_HFCMULTI_INIT)
|
||||
printk(KERN_DEBUG
|
||||
@@ -4680,12 +4694,13 @@ release_card(struct hfc_multi *hc)
|
||||
}
|
||||
|
||||
static int
|
||||
-init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
+init_e1_port(struct hfc_multi *hc, struct hm_map *m, int pt)
|
||||
{
|
||||
struct dchannel *dch;
|
||||
struct bchannel *bch;
|
||||
int ch, ret = 0;
|
||||
char name[MISDN_MAX_IDLEN];
|
||||
+ int bcount = 0;
|
||||
|
||||
dch = kzalloc(sizeof(struct dchannel), GFP_KERNEL);
|
||||
if (!dch)
|
||||
@@ -4698,13 +4713,12 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
(1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
|
||||
dch->dev.D.send = handle_dmsg;
|
||||
dch->dev.D.ctrl = hfcm_dctrl;
|
||||
- dch->dev.nrbchan = (hc->dslot) ? 30 : 31;
|
||||
- dch->slot = hc->dslot;
|
||||
- hc->chan[hc->dslot].dch = dch;
|
||||
- hc->chan[hc->dslot].port = 0;
|
||||
- hc->chan[hc->dslot].nt_timer = -1;
|
||||
+ dch->slot = hc->dnum[pt];
|
||||
+ hc->chan[hc->dnum[pt]].dch = dch;
|
||||
+ hc->chan[hc->dnum[pt]].port = pt;
|
||||
+ hc->chan[hc->dnum[pt]].nt_timer = -1;
|
||||
for (ch = 1; ch <= 31; ch++) {
|
||||
- if (ch == hc->dslot) /* skip dchannel */
|
||||
+ if (!((1 << ch) & hc->bmask[pt])) /* skip unused channel */
|
||||
continue;
|
||||
bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL);
|
||||
if (!bch) {
|
||||
@@ -4733,7 +4747,10 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
hc->chan[ch].bch = bch;
|
||||
hc->chan[ch].port = 0;
|
||||
set_channelmap(bch->nr, dch->dev.channelmap);
|
||||
+ bcount++;
|
||||
}
|
||||
+ dch->dev.nrbchan = bcount;
|
||||
+#warning todo: must be set globally, and must be a seperate function
|
||||
/* set optical line type */
|
||||
if (port[Port_cnt] & 0x001) {
|
||||
if (!m->opticalsupport) {
|
||||
@@ -4749,7 +4766,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
__func__,
|
||||
HFC_cnt + 1, 1);
|
||||
test_and_set_bit(HFC_CFG_OPTICAL,
|
||||
- &hc->chan[hc->dslot].cfg);
|
||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
||||
}
|
||||
}
|
||||
/* set LOS report */
|
||||
@@ -4759,7 +4776,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
"LOS report: card(%d) port(%d)\n",
|
||||
__func__, HFC_cnt + 1, 1);
|
||||
test_and_set_bit(HFC_CFG_REPORT_LOS,
|
||||
- &hc->chan[hc->dslot].cfg);
|
||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
||||
}
|
||||
/* set AIS report */
|
||||
if (port[Port_cnt] & 0x008) {
|
||||
@@ -4768,7 +4785,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
"AIS report: card(%d) port(%d)\n",
|
||||
__func__, HFC_cnt + 1, 1);
|
||||
test_and_set_bit(HFC_CFG_REPORT_AIS,
|
||||
- &hc->chan[hc->dslot].cfg);
|
||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
||||
}
|
||||
/* set SLIP report */
|
||||
if (port[Port_cnt] & 0x010) {
|
||||
@@ -4778,7 +4795,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
"card(%d) port(%d)\n",
|
||||
__func__, HFC_cnt + 1, 1);
|
||||
test_and_set_bit(HFC_CFG_REPORT_SLIP,
|
||||
- &hc->chan[hc->dslot].cfg);
|
||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
||||
}
|
||||
/* set RDI report */
|
||||
if (port[Port_cnt] & 0x020) {
|
||||
@@ -4788,7 +4805,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
"card(%d) port(%d)\n",
|
||||
__func__, HFC_cnt + 1, 1);
|
||||
test_and_set_bit(HFC_CFG_REPORT_RDI,
|
||||
- &hc->chan[hc->dslot].cfg);
|
||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
||||
}
|
||||
/* set CRC-4 Mode */
|
||||
if (!(port[Port_cnt] & 0x100)) {
|
||||
@@ -4797,7 +4814,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
" card(%d) port(%d)\n",
|
||||
__func__, HFC_cnt + 1, 1);
|
||||
test_and_set_bit(HFC_CFG_CRC4,
|
||||
- &hc->chan[hc->dslot].cfg);
|
||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
||||
} else {
|
||||
if (debug & DEBUG_HFCMULTI_INIT)
|
||||
printk(KERN_DEBUG "%s: PORT turn off CRC4"
|
||||
@@ -4829,20 +4846,23 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
||||
}
|
||||
/* set elastic jitter buffer */
|
||||
if (port[Port_cnt] & 0x3000) {
|
||||
- hc->chan[hc->dslot].jitter = (port[Port_cnt]>>12) & 0x3;
|
||||
+ hc->chan[hc->dnum[pt]].jitter = (port[Port_cnt]>>12) & 0x3;
|
||||
if (debug & DEBUG_HFCMULTI_INIT)
|
||||
printk(KERN_DEBUG
|
||||
"%s: PORT set elastic "
|
||||
"buffer to %d: card(%d) port(%d)\n",
|
||||
- __func__, hc->chan[hc->dslot].jitter,
|
||||
+ __func__, hc->chan[hc->dnum[pt]].jitter,
|
||||
HFC_cnt + 1, 1);
|
||||
} else
|
||||
- hc->chan[hc->dslot].jitter = 2; /* default */
|
||||
- snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-e1.%d", HFC_cnt + 1);
|
||||
+ hc->chan[hc->dnum[pt]].jitter = 2; /* default */
|
||||
+ if (hc->ports > 1)
|
||||
+ snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-e1.%d-%d", HFC_cnt + 1, pt+1);
|
||||
+ else
|
||||
+ snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-e1.%d", HFC_cnt + 1);
|
||||
ret = mISDN_register_device(&dch->dev, &hc->pci_dev->dev, name);
|
||||
if (ret)
|
||||
goto free_chan;
|
||||
- hc->created[0] = 1;
|
||||
+ hc->created[pt] = 1;
|
||||
return ret;
|
||||
free_chan:
|
||||
release_port(hc, dch);
|
||||
@@ -5009,18 +5029,30 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
|
||||
hc->id = HFC_cnt;
|
||||
hc->pcm = pcm[HFC_cnt];
|
||||
hc->io_mode = iomode[HFC_cnt];
|
||||
+#warning todo: rework module parameters for customizing e1 fragments.... yea, let''s call it: fragments
|
||||
if (dslot[HFC_cnt] < 0 && hc->ctype == HFC_TYPE_E1) {
|
||||
- hc->dslot = 0;
|
||||
+ hc->dnum[0] = 0;
|
||||
printk(KERN_INFO "HFC-E1 card has disabled D-channel, but "
|
||||
"31 B-channels\n");
|
||||
}
|
||||
if (dslot[HFC_cnt] > 0 && dslot[HFC_cnt] < 32
|
||||
&& hc->ctype == HFC_TYPE_E1) {
|
||||
- hc->dslot = dslot[HFC_cnt];
|
||||
+ hc->dnum[0] = dslot[HFC_cnt];
|
||||
printk(KERN_INFO "HFC-E1 card has alternating D-channel on "
|
||||
"time slot %d\n", dslot[HFC_cnt]);
|
||||
} else
|
||||
- hc->dslot = 16;
|
||||
+ hc->dnum[0] = 16;
|
||||
+
|
||||
+#warning todo HACK!!! just a small map of two "fragments"
|
||||
+ if (hc->ctype == HFC_TYPE_E1) {
|
||||
+ hc->dnum[0] = 1;
|
||||
+ hc->bmask[0] = 0x0000003c;
|
||||
+ hc->dnum[1] = 6;
|
||||
+ hc->bmask[1] = 0x00000780;
|
||||
+ hc->dnum[2] = 11;
|
||||
+ hc->bmask[2] = 0x00007800;
|
||||
+ hc->ports = 3;
|
||||
+ }
|
||||
|
||||
/* set chip specific features */
|
||||
hc->masterclk = -1;
|
||||
@@ -5103,7 +5135,7 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
|
||||
goto free_card;
|
||||
}
|
||||
if (hc->ctype == HFC_TYPE_E1)
|
||||
- ret_err = init_e1_port(hc, m);
|
||||
+ ret_err = init_e1_port(hc, m, pt);
|
||||
else
|
||||
ret_err = init_multi_port(hc, pt);
|
||||
if (debug & DEBUG_HFCMULTI_INIT)
|
||||
@@ -5115,10 +5147,14 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
|
||||
if (ret_err) {
|
||||
while (pt) { /* release already registered ports */
|
||||
pt--;
|
||||
- release_port(hc, hc->chan[(pt << 2) + 2].dch);
|
||||
+ if (hc->ctype == HFC_TYPE_E1)
|
||||
+ release_port(hc, hc->chan[hc->dnum[pt]].dch);
|
||||
+ else
|
||||
+ release_port(hc, hc->chan[(pt << 2) + 2].dch);
|
||||
}
|
||||
goto free_card;
|
||||
}
|
||||
+#warning todo: count it right, add additional "fragment" counter...
|
||||
Port_cnt++;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,145 +0,0 @@
|
|||
From 48f2a191de62686c2ffdb97e46b5cc6bb61a868d Mon Sep 17 00:00:00 2001
|
||||
From: Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
Date: Tue, 11 Jan 2011 15:16:19 +0100
|
||||
Subject: [PATCH 3/4] lucent-hnb
|
||||
|
||||
Add lucent hnb patch from OpenBSC
|
||||
---
|
||||
epan/CMakeLists.txt | 1 +
|
||||
epan/dissectors/Makefile.common | 1 +
|
||||
epan/dissectors/packet-lucent_hnb.c | 103 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 105 insertions(+), 0 deletions(-)
|
||||
create mode 100644 epan/dissectors/packet-lucent_hnb.c
|
||||
|
||||
Index: wireshark/epan/CMakeLists.txt
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/CMakeLists.txt 2011-09-06 12:30:50.000000000 +0200
|
||||
+++ wireshark/epan/CMakeLists.txt 2011-09-06 12:30:52.000000000 +0200
|
||||
@@ -738,6 +738,7 @@
|
||||
dissectors/packet-lpd.c
|
||||
dissectors/packet-lsc.c
|
||||
dissectors/packet-ltp.c
|
||||
+ dissectors/packet-lucent_hnb.c
|
||||
dissectors/packet-lwapp.c
|
||||
dissectors/packet-lwres.c
|
||||
dissectors/packet-m2pa.c
|
||||
Index: wireshark/epan/dissectors/Makefile.common
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/Makefile.common 2011-09-06 12:30:50.000000000 +0200
|
||||
+++ wireshark/epan/dissectors/Makefile.common 2011-09-06 12:30:52.000000000 +0200
|
||||
@@ -657,6 +657,7 @@
|
||||
packet-lpd.c \
|
||||
packet-lsc.c \
|
||||
packet-ltp.c \
|
||||
+ packet-lucent_hnb.c \
|
||||
packet-lwapp.c \
|
||||
packet-lwres.c \
|
||||
packet-m2pa.c \
|
||||
Index: wireshark/epan/dissectors/packet-lucent_hnb.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ wireshark/epan/dissectors/packet-lucent_hnb.c 2011-09-06 12:30:52.000000000 +0200
|
||||
@@ -0,0 +1,103 @@
|
||||
+/* packet-lucent_hnb.c
|
||||
+ * Routines for packet dissection of Alcatel/Lucent HomeNodeB
|
||||
+ * Copyright 2009 by Harald Welte <laforge@gnumonks.org>
|
||||
+ *
|
||||
+ * This protocol decoder is based entirely on reverse engineering, i.e.
|
||||
+ * on educated guesses.
|
||||
+ *
|
||||
+ * $Id: packet-lucent_hnb.c 29254 2009-07-31 19:19:25Z gerald $
|
||||
+ *
|
||||
+ * Wireshark - Network traffic analyzer
|
||||
+ * By Gerald Combs <gerald@wireshark.org>
|
||||
+ * Copyright 1998 Gerald Combs
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version 2
|
||||
+ * of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+ */
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+# include "config.h"
|
||||
+#endif
|
||||
+
|
||||
+#define LHNB_SCTP_PPI_MM 1
|
||||
+#define LHNB_SCTP_PPI_GMM 6
|
||||
+
|
||||
+#define LHNB_SCTP_PORT 6005
|
||||
+
|
||||
+#include <glib.h>
|
||||
+
|
||||
+#include <epan/packet.h>
|
||||
+
|
||||
+/* Initialize the protocol and registered fields */
|
||||
+static int proto_lhnb = -1;
|
||||
+
|
||||
+static int hf_lhnb_length = -1;
|
||||
+
|
||||
+/* Initialize the subtree pointers */
|
||||
+static gint ett_lhnb = -1;
|
||||
+
|
||||
+static dissector_handle_t ranap_handle;
|
||||
+
|
||||
+/* Code to actually dissect the packets */
|
||||
+static void
|
||||
+dissect_lhnb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
+{
|
||||
+
|
||||
+ int offset = 0;
|
||||
+ u_int16_t len;
|
||||
+ tvbuff_t *next_tvb;
|
||||
+
|
||||
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LHNB");
|
||||
+ col_clear(pinfo->cinfo, COL_INFO);
|
||||
+
|
||||
+ proto_tree_add_item(tree, hf_lhnb_length, tvb, offset+2, 2, FALSE);
|
||||
+ len = tvb_get_ntohs(tvb, offset+2);
|
||||
+ next_tvb = tvb_new_subset(tvb, offset+2+6, len-4, -1);
|
||||
+
|
||||
+ call_dissector(ranap_handle, next_tvb, pinfo, tree);
|
||||
+}
|
||||
+
|
||||
+void proto_register_lucent_hnb(void)
|
||||
+{
|
||||
+ static hf_register_info hf[] = {
|
||||
+ {&hf_lhnb_length,
|
||||
+ {"Length", "lhnb.len",
|
||||
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
|
||||
+ },
|
||||
+ };
|
||||
+
|
||||
+ static gint *ett[] = {
|
||||
+ &ett_lhnb,
|
||||
+ };
|
||||
+
|
||||
+ proto_lhnb =
|
||||
+ proto_register_protocol("Alcatel/Lucent HomeNodeB",
|
||||
+ "Lucent HNB", "lhnb");
|
||||
+
|
||||
+ proto_register_field_array(proto_lhnb, hf, array_length(hf));
|
||||
+ proto_register_subtree_array(ett, array_length(ett));
|
||||
+}
|
||||
+
|
||||
+void proto_reg_handoff_lucent_hnb(void)
|
||||
+{
|
||||
+ dissector_handle_t lhnb_handle;
|
||||
+
|
||||
+ ranap_handle = find_dissector("ranap");
|
||||
+
|
||||
+ lhnb_handle = create_dissector_handle(dissect_lhnb, proto_lhnb);
|
||||
+
|
||||
+ dissector_add("sctp.ppi", LHNB_SCTP_PPI_MM, lhnb_handle);
|
||||
+ dissector_add("sctp.ppi", LHNB_SCTP_PPI_GMM, lhnb_handle);
|
||||
+ dissector_add("sctp.port", LHNB_SCTP_PORT, lhnb_handle);
|
||||
+}
|
|
@ -1,688 +0,0 @@
|
|||
From 54882db58b6ec12da6b80071e0ac2344d42df24c Mon Sep 17 00:00:00 2001
|
||||
|
||||
From: Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
|
||||
Subject: [PATCH 4/4] rsl-ipaccess
|
||||
|
||||
Add vendor specific commands for RSL.
|
||||
---
|
||||
epan/dissectors/packet-rsl.c | 544 +++++++++++++++++++++++++++++++++++++++++-
|
||||
1 files changed, 536 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: wireshark/epan/dissectors/packet-rsl.c
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/packet-rsl.c 2011-09-06 12:29:45.000000000 +0200
|
||||
+++ wireshark/epan/dissectors/packet-rsl.c 2011-09-06 13:25:12.000000000 +0200
|
||||
@@ -39,8 +39,11 @@
|
||||
|
||||
#include <epan/packet.h>
|
||||
#include <epan/lapd_sapi.h>
|
||||
+#include <epan/prefs.h>
|
||||
|
||||
#include "packet-gsm_a_common.h"
|
||||
+#include "packet-rtp.h"
|
||||
+#include "packet-rtcp.h"
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
static int proto_rsl = -1;
|
||||
@@ -115,6 +118,25 @@
|
||||
static int hf_rsl_rtd = -1;
|
||||
static int hf_rsl_delay_ind = -1;
|
||||
static int hf_rsl_tfo = -1;
|
||||
+static int hf_rsl_speech_mode_s = -1;
|
||||
+static int hf_rsl_speech_mode_m = -1;
|
||||
+static int hf_rsl_conn_stat = -1;
|
||||
+static int hf_rsl_conn_id = -1;
|
||||
+static int hf_rsl_rtp_payload = -1;
|
||||
+static int hf_rsl_rtp_csd_fmt_d = -1;
|
||||
+static int hf_rsl_rtp_csd_fmt_ir = -1;
|
||||
+static int hf_rsl_local_port = -1;
|
||||
+static int hf_rsl_remote_port = -1;
|
||||
+static int hf_rsl_local_ip = -1;
|
||||
+static int hf_rsl_remote_ip = -1;
|
||||
+static int hf_rsl_cstat_tx_pkts = -1;
|
||||
+static int hf_rsl_cstat_tx_octs = -1;
|
||||
+static int hf_rsl_cstat_rx_pkts = -1;
|
||||
+static int hf_rsl_cstat_rx_octs = -1;
|
||||
+static int hf_rsl_cstat_lost_pkts = -1;
|
||||
+static int hf_rsl_cstat_ia_jitter = -1;
|
||||
+static int hf_rsl_cstat_avg_tx_dly = -1;
|
||||
+
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
static int ett_rsl = -1;
|
||||
@@ -172,6 +194,15 @@
|
||||
static int ett_ie_meas_res_no = -1;
|
||||
static int ett_ie_message_id = -1;
|
||||
static int ett_ie_sys_info_type = -1;
|
||||
+static int ett_ie_speech_mode = -1;
|
||||
+static int ett_ie_conn_stat = -1;
|
||||
+static int ett_ie_conn_id = -1;
|
||||
+static int ett_ie_remote_ip = -1;
|
||||
+static int ett_ie_remote_port = -1;
|
||||
+static int ett_ie_local_port = -1;
|
||||
+static int ett_ie_local_ip = -1;
|
||||
+static int ett_ie_rtp_payload = -1;
|
||||
+
|
||||
|
||||
static proto_tree *top_tree;
|
||||
static dissector_handle_t gsm_a_ccch_handle;
|
||||
@@ -179,6 +210,9 @@
|
||||
|
||||
static gboolean is_si2q = FALSE;
|
||||
|
||||
+/* Decode things as nanoBTS traces */
|
||||
+static gboolean global_rsl_use_nano_bts = TRUE;
|
||||
+
|
||||
/* Forward declarations */
|
||||
static int dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset);
|
||||
|
||||
@@ -208,8 +242,10 @@
|
||||
{ 0x06, "Common Channel Management messages" },
|
||||
{ 0x08, "TRX Management messages" },
|
||||
{ 0x16, "Location Services messages" },
|
||||
+ { 0x3f, "ip.access Vendor Specific messages" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
+#define RSL_MSGDISC_IPACCESS 0x3f
|
||||
/*
|
||||
* 9.2 MESSAGE TYPE
|
||||
*/
|
||||
@@ -277,6 +313,49 @@
|
||||
/* 0 1 - - - - - - Location Services messages: */
|
||||
#define RSL_MSG_LOC_INF 65 /* 8.7.1 */
|
||||
|
||||
+/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation
|
||||
+ * about those extensions, all information in this dissector is based on lawful
|
||||
+ * protocol reverse enginering by Harald Welte <laforge@gnumonks.org> */
|
||||
+#define RSL_MSG_TYPE_IPAC_MEAS_PP_DEF 0x60
|
||||
+#define RSL_MSG_TYPE_IPAC_HO_CAND_INQ 0x61
|
||||
+#define RSL_MSG_TYPE_IPAC_HO_CAND_RESP 0x62
|
||||
+
|
||||
+#define RSL_MSG_TYPE_IPAC_PDCH_ACT 0x48
|
||||
+#define RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK 0x49
|
||||
+#define RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK 0x4a
|
||||
+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT 0x4b
|
||||
+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK 0x4c
|
||||
+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK 0x4d
|
||||
+
|
||||
+#define RSL_MSG_TYPE_IPAC_CRCX 0x70
|
||||
+#define RSL_MSG_TYPE_IPAC_CRCX_ACK 0x71
|
||||
+#define RSL_MSG_TYPE_IPAC_CRCX_NACK 0x72
|
||||
+#define RSL_MSG_TYPE_IPAC_MDCX 0x73
|
||||
+#define RSL_MSG_TYPE_IPAC_MDCX_ACK 0x74
|
||||
+#define RSL_MSG_TYPE_IPAC_MDCX_NACK 0x75
|
||||
+#define RSL_MSG_TYPE_IPAC_DLCX_IND 0x76
|
||||
+#define RSL_MSG_TYPE_IPAC_DLCX 0x77
|
||||
+#define RSL_MSG_TYPE_IPAC_DLCX_ACK 0x78
|
||||
+#define RSL_MSG_TYPE_IPAC_DLCX_NACK 0x79
|
||||
+
|
||||
+#define RSL_IE_IPAC_SRTP_CONFIG 0xe0
|
||||
+#define RSL_IE_IPAC_PROXY_UDP 0xe1
|
||||
+#define RSL_IE_IPAC_BSCMPL_TOUT 0xe2
|
||||
+#define RSL_IE_IPAC_REMOTE_IP 0xf0
|
||||
+#define RSL_IE_IPAC_REMOTE_PORT 0xf1
|
||||
+#define RSL_IE_IPAC_RTP_PAYLOAD 0xf2
|
||||
+#define RSL_IE_IPAC_LOCAL_PORT 0xf3
|
||||
+#define RSL_IE_IPAC_SPEECH_MODE 0xf4
|
||||
+#define RSL_IE_IPAC_LOCAL_IP 0xf5
|
||||
+#define RSL_IE_IPAC_CONN_STAT 0xf6
|
||||
+#define RSL_IE_IPAC_HO_C_PARMS 0xf7
|
||||
+#define RSL_IE_IPAC_CONN_ID 0xf8
|
||||
+#define RSL_IE_IPAC_RTP_CSD_FMT 0xf9
|
||||
+#define RSL_IE_IPAC_RTP_JIT_BUF 0xfa
|
||||
+#define RSL_IE_IPAC_RTP_COMPR 0xfb
|
||||
+#define RSL_IE_IPAC_RTP_PAYLOAD2 0xfc
|
||||
+#define RSL_IE_IPAC_RTP_MPLEX 0xfd
|
||||
+#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe
|
||||
|
||||
static const value_string rsl_msg_type_vals[] = {
|
||||
/* 0 0 0 0 - - - - Radio Link Layer Management messages: */
|
||||
@@ -339,6 +418,26 @@
|
||||
{ 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */
|
||||
/* 0 1 - - - - - - Location Services messages: */
|
||||
{ 0x41, "Location Information" }, /* 8.7.1 */
|
||||
+ /* ip.access */
|
||||
+ { 0x48, "ip.access PDCH ACTIVATION" },
|
||||
+ { 0x49, "ip.access PDCH ACTIVATION ACK" },
|
||||
+ { 0x4a, "ip.access PDCH ACTIVATION NACK" },
|
||||
+ { 0x4b, "ip.access PDCH DEACTIVATION" },
|
||||
+ { 0x4c, "ip.access PDCH DEACTIVATION ACK" },
|
||||
+ { 0x4d, "ip.access PDCH DEACTIVATION NACK" },
|
||||
+ { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" },
|
||||
+ { 0x61, "ip.access HANDOover CANDidate ENQuiry" },
|
||||
+ { 0x62, "ip.access HANDOover CANDidate RESPonse" },
|
||||
+ { 0x70, "ip.access CRCX" },
|
||||
+ { 0x71, "ip.access CRCX ACK" },
|
||||
+ { 0x72, "ip.access CRCX NACK" },
|
||||
+ { 0x73, "ip.access MDCX" },
|
||||
+ { 0x74, "ip.access MDCX ACK" },
|
||||
+ { 0x75, "ip.access MDCX NACK" },
|
||||
+ { 0x76, "ip.access DLCX INDication" },
|
||||
+ { 0x77, "ip.access DLCX" },
|
||||
+ { 0x78, "ip.access DLCX ACK" },
|
||||
+ { 0x79, "ip.access DLCX NACK" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
@@ -373,9 +472,10 @@
|
||||
|
||||
#define RSL_IE_SYS_INFO_TYPE 30
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
+#define RSL_IE_MS_POWER_PARAM 31
|
||||
+#define RSL_IE_BS_POWER_PARAM 32
|
||||
+#define RSL_IE_PREPROC_PARAM 33
|
||||
+#define RSL_IE_PREPROC_MEAS 34
|
||||
#define RSL_IE_FULL_IMM_ASS_INF 35
|
||||
#define RSL_IE_SMSCB_INF 36
|
||||
#define RSL_IE_FULL_MS_TIMING_OFFSET 37
|
||||
@@ -478,6 +578,24 @@
|
||||
Not used
|
||||
|
||||
*/
|
||||
+ { 0xe0, "SRTP Configuration" },
|
||||
+ { 0xe1, "BSC Proxy UDP Port" },
|
||||
+ { 0xe2, "BSC Multiplex Timeout" },
|
||||
+ { 0xf0, "Remote IP Address" },
|
||||
+ { 0xf1, "Remote RTP Port" },
|
||||
+ { 0xf2, "RTP Payload Type" },
|
||||
+ { 0xf3, "Local RTP Port" },
|
||||
+ { 0xf4, "Speech Mode" },
|
||||
+ { 0xf5, "Local IP Address" },
|
||||
+ { 0xf6, "Connection Statistics" },
|
||||
+ { 0xf7, "Handover C Parameters" },
|
||||
+ { 0xf8, "Connection Identifier" },
|
||||
+ { 0xf9, "RTP CSD Format" },
|
||||
+ { 0xfa, "RTP Jitter Buffer" },
|
||||
+ { 0xfb, "RTP Compression" },
|
||||
+ { 0xfc, "RTP Payload Type 2" },
|
||||
+ { 0xfd, "RTP Multiplex" },
|
||||
+ { 0xfe, "RTP Multiplex Identifier" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
@@ -514,6 +632,27 @@
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
+/* From openbsc/include/openbsc/tlv.h */
|
||||
+enum tlv_type {
|
||||
+ TLV_TYPE_FIXED,
|
||||
+ TLV_TYPE_T,
|
||||
+ TLV_TYPE_TV,
|
||||
+ TLV_TYPE_TLV,
|
||||
+ TLV_TYPE_TL16V,
|
||||
+};
|
||||
+
|
||||
+struct tlv_def {
|
||||
+ enum tlv_type type;
|
||||
+ u_int8_t fixed_len;
|
||||
+};
|
||||
+
|
||||
+struct tlv_definition {
|
||||
+ struct tlv_def def[0xff];
|
||||
+};
|
||||
+
|
||||
+/* This structure is initialized in proto_register_rsl() */
|
||||
+static struct tlv_definition rsl_att_tlvdef;
|
||||
+
|
||||
/* 9.3.1 Channel number 9.3.1 M TV 2 */
|
||||
static int
|
||||
dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
|
||||
@@ -2918,12 +3057,184 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+dissct_rsl_ipaccess_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
||||
+{
|
||||
+ guint8 msg_type;
|
||||
+ guint32 local_addr = 0;
|
||||
+ guint16 local_port = 0;
|
||||
+ address src_addr;
|
||||
+
|
||||
+ msg_type = tvb_get_guint8(tvb, offset)&0x7f;
|
||||
+ offset++;
|
||||
+
|
||||
+#if 0
|
||||
+ switch (msg_type) {
|
||||
+ case RSL_MSG_TYPE_IPAC_CRCX:
|
||||
+ case RSL_MSG_TYPE_IPAC_CRCX_ACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_CRCX_NACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_MDCX:
|
||||
+ case RSL_MSG_TYPE_IPAC_MDCX_ACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_MDCX_NACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_DLCX_IND:
|
||||
+ case RSL_MSG_TYPE_IPAC_DLCX:
|
||||
+ case RSL_MSG_TYPE_IPAC_DLCX_ACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_DLCX_NACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_ACT:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK:
|
||||
+ /* Channel number 9.3.1 M TV 2 */
|
||||
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
|
||||
+ break;
|
||||
+ }
|
||||
+#endif
|
||||
+ /* parse TLV attributes */
|
||||
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
|
||||
+ guint8 tag;
|
||||
+ unsigned int len, hlen, len_len;
|
||||
+ const struct tlv_def *tdef;
|
||||
+ proto_item *ti;
|
||||
+ proto_tree *ie_tree;
|
||||
+
|
||||
+ tag = tvb_get_guint8(tvb, offset);
|
||||
+ tdef = &rsl_att_tlvdef.def[tag];
|
||||
+
|
||||
+ switch (tdef->type) {
|
||||
+ case TLV_TYPE_FIXED:
|
||||
+ hlen = 1;
|
||||
+ len_len = 0;
|
||||
+ len = tdef->fixed_len;
|
||||
+ break;
|
||||
+ case TLV_TYPE_T:
|
||||
+ hlen = 1;
|
||||
+ len_len = 0;
|
||||
+ len = 0;
|
||||
+ break;
|
||||
+ case TLV_TYPE_TV:
|
||||
+ hlen = 1;
|
||||
+ len_len = 0;
|
||||
+ len = 1;
|
||||
+ break;
|
||||
+ case TLV_TYPE_TLV:
|
||||
+ hlen = 2;
|
||||
+ len_len = 1;
|
||||
+ len = tvb_get_guint8(tvb, offset+1);
|
||||
+ break;
|
||||
+ case TLV_TYPE_TL16V:
|
||||
+ hlen = 3;
|
||||
+ len_len = 2;
|
||||
+ len = tvb_get_guint8(tvb, offset+1) << 8 |
|
||||
+ tvb_get_guint8(tvb, offset+2);
|
||||
+ break;
|
||||
+ default:
|
||||
+ hlen = len_len = len = 0;
|
||||
+ DISSECTOR_ASSERT_NOT_REACHED();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ ti = proto_tree_add_item(tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
|
||||
+ ie_tree = proto_item_add_subtree(ti, ett_ie_local_port);
|
||||
+ offset += hlen;
|
||||
+
|
||||
+ switch (tag) {
|
||||
+ case RSL_IE_CH_NO:
|
||||
+ dissect_rsl_ie_ch_no(tvb, pinfo, ie_tree, offset, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_FRAME_NO:
|
||||
+ dissect_rsl_ie_frame_no(tvb, pinfo, ie_tree, offset, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_MS_POW:
|
||||
+ dissect_rsl_ie_ms_pow(tvb, pinfo, ie_tree, offset, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_REMOTE_IP:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_remote_ip, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_REMOTE_PORT:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_remote_port, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_LOCAL_IP:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_local_ip, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ local_addr = tvb_get_ipv4(tvb, offset);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_LOCAL_PORT:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ local_port = tvb_get_ntohs(tvb, offset);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_SPEECH_MODE:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_s, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_m, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_RTP_PAYLOAD:
|
||||
+ case RSL_IE_IPAC_RTP_PAYLOAD2:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_rtp_payload, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_RTP_CSD_FMT:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_d, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_ir, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_CONN_ID:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_conn_id, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_IPAC_CONN_STAT:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_pkts, tvb,
|
||||
+ offset, 4, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_octs, tvb,
|
||||
+ offset+4, 4, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_pkts, tvb,
|
||||
+ offset+8, 4, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_octs, tvb,
|
||||
+ offset+12, 4, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_cstat_lost_pkts, tvb,
|
||||
+ offset+16, 4, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_cstat_ia_jitter, tvb,
|
||||
+ offset+20, 4, FALSE);
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_cstat_avg_tx_dly, tvb,
|
||||
+ offset+24, 4, FALSE);
|
||||
+ break;
|
||||
+ }
|
||||
+ offset += len;
|
||||
+ }
|
||||
+
|
||||
+ switch (msg_type) {
|
||||
+ case RSL_MSG_TYPE_IPAC_CRCX_ACK:
|
||||
+ /* Notify the RTP and RTCP dissectors about a new RTP stream */
|
||||
+ src_addr.type = AT_IPv4;
|
||||
+ src_addr.len = 4;
|
||||
+ src_addr.data = (guint8 *)&local_addr;
|
||||
+ rtp_add_address(pinfo, &src_addr, local_port, 0,
|
||||
+ "GSM A-bis/IP", pinfo->fd->num, 0, NULL);
|
||||
+ rtcp_add_address(pinfo, &src_addr, local_port+1, 0,
|
||||
+ "GSM A-bis/IP", pinfo->fd->num);
|
||||
+ break;
|
||||
+ }
|
||||
+ return offset;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
||||
{
|
||||
- guint8 msg_type;
|
||||
+ guint8 msg_disc, msg_type;
|
||||
|
||||
+ msg_disc = tvb_get_guint8(tvb, offset++) >> 1;
|
||||
msg_type = tvb_get_guint8(tvb,offset)&0x7f;
|
||||
proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
+
|
||||
+ if (msg_disc == RSL_MSGDISC_IPACCESS) {
|
||||
+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset);
|
||||
+ return offset;
|
||||
+ }
|
||||
offset++;
|
||||
|
||||
switch (msg_type){
|
||||
@@ -3491,6 +3802,18 @@
|
||||
/* LLP APDU 9.3.58 M LV 2-N */
|
||||
offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE);
|
||||
break;
|
||||
+ /* the following messages are ip.access specific but sent without
|
||||
+ * ip.access memssage discriminator */
|
||||
+ case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF:
|
||||
+ case RSL_MSG_TYPE_IPAC_HO_CAND_INQ:
|
||||
+ case RSL_MSG_TYPE_IPAC_HO_CAND_RESP:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_ACT:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK:
|
||||
+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK:
|
||||
+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -3498,6 +3821,40 @@
|
||||
return offset;
|
||||
|
||||
}
|
||||
+
|
||||
+static const value_string rsl_ipacc_spm_s_vals[] = {
|
||||
+ { 0, "GSM FR codec (GSM type 1, FS)" },
|
||||
+ { 1, "GSM EFR codec (GSM type 2, FS)" },
|
||||
+ { 2, "GSM AMR/FR codec (GSM type 3, FS)" },
|
||||
+ { 3, "GSM HR codec (GSM type 1, HS)" },
|
||||
+ { 5, "GSM AMR/HR codec (GSM type 3, HS)" },
|
||||
+ { 0xf, "As specified by RTP Payload Type IE" },
|
||||
+ { 0, NULL }
|
||||
+};
|
||||
+
|
||||
+static const value_string rsl_ipacc_spm_m_vals[] = {
|
||||
+ { 0, "Send and Receive" },
|
||||
+ { 1, "Receive Only" },
|
||||
+ { 2, "Send Only" },
|
||||
+ { 0, NULL }
|
||||
+};
|
||||
+
|
||||
+static const value_string rsl_ipacc_rtp_csd_fmt_d_vals[] = {
|
||||
+ { 0, "External TRAU format" },
|
||||
+ { 1, "Non-TRAU Packed format" },
|
||||
+ { 2, "TRAU within the BTS" },
|
||||
+ { 3, "IWF-Free BTS-BTS Data" },
|
||||
+ { 0, NULL }
|
||||
+};
|
||||
+
|
||||
+static const value_string rsl_ipacc_rtp_csd_fmt_ir_vals[] = {
|
||||
+ { 0, "8kb/s" },
|
||||
+ { 1, "16kb/s" },
|
||||
+ { 2, "32kb/s" },
|
||||
+ { 3, "64kb/s" },
|
||||
+ { 0, NULL }
|
||||
+};
|
||||
+
|
||||
static void
|
||||
dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
@@ -3518,12 +3875,19 @@
|
||||
top_tree = tree;
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_BIG_ENDIAN);
|
||||
+
|
||||
+ /* if nanoBTS specific vendor messages are not enabled, skip */
|
||||
+ if (!global_rsl_use_nano_bts) {
|
||||
+ guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1;
|
||||
+
|
||||
+ if (msg_disc == RSL_MSGDISC_IPACCESS)
|
||||
+ return;
|
||||
+ }
|
||||
rsl_tree = proto_item_add_subtree(ti, ett_rsl);
|
||||
|
||||
/* 9.1 Message discriminator */
|
||||
proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
- offset++;
|
||||
|
||||
offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset);
|
||||
|
||||
@@ -3898,6 +4262,86 @@
|
||||
FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03,
|
||||
NULL, HFILL }
|
||||
},
|
||||
+ { &hf_rsl_speech_mode_s,
|
||||
+ { "ip.access Speech Mode S", "rsl.ipacc.speech_mode_s",
|
||||
+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_s_vals),
|
||||
+ 0xf, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_speech_mode_m,
|
||||
+ { "ip.access Speech Mode M", "rsl.ipacc.speech_mode_m",
|
||||
+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_m_vals),
|
||||
+ 0xf0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_conn_stat,
|
||||
+ { "ip.access Connection Statistics","rsl.ipacc.conn_stat",
|
||||
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_conn_id,
|
||||
+ { "ip.access Connection ID", "rsl.ipacc.conn_id",
|
||||
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_rtp_payload,
|
||||
+ { "ip.access RTP Payload Type", "rsl.ipacc.rtp_payload",
|
||||
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_rtp_csd_fmt_d,
|
||||
+ { "ip.access RTP CSD Format D", "rsl.ipacc.rtp_csd_fmt_d",
|
||||
+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_d_vals),
|
||||
+ 0x0f, NULL, HFILL },
|
||||
+ },
|
||||
+ { &hf_rsl_rtp_csd_fmt_ir,
|
||||
+ { "ip.access RTP CSD Format IR", "rsl.ipacc.rtp_csd_fmt_ir",
|
||||
+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_ir_vals),
|
||||
+ 0xf0, NULL, HFILL },
|
||||
+ },
|
||||
+ { &hf_rsl_local_port,
|
||||
+ { "ip.access Local RTP Port", "rsl.ipacc.local_port",
|
||||
+ FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
+ "ip.access Local RTP Port", HFILL },
|
||||
+ },
|
||||
+ { &hf_rsl_remote_port,
|
||||
+ { "ip.access Remote RTP Port", "rsl.ipacc.remote_port",
|
||||
+ FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
+ "ip.access Remote RTP Port", HFILL },
|
||||
+ },
|
||||
+ { &hf_rsl_local_ip,
|
||||
+ { "ip.access Local IP Address", "rsl.ipacc.local_ip",
|
||||
+ FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
+ "ip.access Local IP Address", HFILL },
|
||||
+ },
|
||||
+ { &hf_rsl_remote_ip,
|
||||
+ { "ip.access Remote IP Address", "rsl.ipacc.remote_ip",
|
||||
+ FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
+ "ip.access Remote IP Address", HFILL },
|
||||
+ },
|
||||
+ { &hf_rsl_cstat_tx_pkts,
|
||||
+ { "Packets Sent", "rsl.ipacc.cstat.tx_pkts",
|
||||
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_cstat_tx_octs,
|
||||
+ { "Octets Sent", "rsl.ipacc.cstat.tx_octets",
|
||||
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_cstat_rx_pkts,
|
||||
+ { "Packets Received", "rsl.ipacc.cstat.rx_pkts",
|
||||
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_cstat_rx_octs,
|
||||
+ { "Octets Received", "rsl.ipacc.cstat.rx_octets",
|
||||
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_cstat_lost_pkts,
|
||||
+ { "Packets Lost", "rsl.ipacc.cstat.lost_pkts",
|
||||
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_cstat_ia_jitter,
|
||||
+ { "Inter-arrival Jitter", "rsl.ipacc.cstat.ia_jitter",
|
||||
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_cstat_avg_tx_dly,
|
||||
+ { "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay",
|
||||
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
};
|
||||
static gint *ett[] = {
|
||||
&ett_rsl,
|
||||
@@ -3955,7 +4399,88 @@
|
||||
&ett_ie_meas_res_no,
|
||||
&ett_ie_message_id,
|
||||
&ett_ie_sys_info_type,
|
||||
+ &ett_ie_speech_mode,
|
||||
+ &ett_ie_conn_stat,
|
||||
+ &ett_ie_conn_id,
|
||||
+ &ett_ie_remote_ip,
|
||||
+ &ett_ie_remote_port,
|
||||
+ &ett_ie_local_port,
|
||||
+ &ett_ie_local_ip,
|
||||
+ &ett_ie_rtp_payload,
|
||||
};
|
||||
+ module_t *rsl_module;
|
||||
+
|
||||
+#define RSL_ATT_TLVDEF(_attr, _type, _fixed_len) \
|
||||
+ rsl_att_tlvdef.def[_attr].type = _type; \
|
||||
+ rsl_att_tlvdef.def[_attr].fixed_len = _fixed_len; \
|
||||
+
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CH_NO, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_LINK_ID, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_ACT_TYPE, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_BS_POW, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CH_ID, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CH_MODE, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_ENC_INF, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_FRAME_NO, TLV_TYPE_FIXED, 2);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_HO_REF, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_L1_INF, TLV_TYPE_FIXED, 2);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_L3_INF, TLV_TYPE_TL16V, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MS_ID, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MS_POW, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_PAGING_GRP, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_PAGING_LOAD, TLV_TYPE_FIXED, 2);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_PHY_CTX, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_ACCESS_DELAY, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_RACH_LOAD, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_REQ_REF, TLV_TYPE_FIXED, 3);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_REL_MODE, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_RESOURCE_INF, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_RLM_CAUSE, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_STARTING_TIME, TLV_TYPE_FIXED, 2);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_TIMING_ADV, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_UPLINK_MEAS, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CAUSE, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MEAS_RES_NO, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MESSAGE_ID, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_SYS_INFO_TYPE, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MS_POWER_PARAM, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_BS_POWER_PARAM, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_PREPROC_PARAM, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_PREPROC_MEAS, TLV_TYPE_TLV, 0);
|
||||
+// RSL_ATT_TLVDEF(RSL_IE_IMM_ASS_INFO, TLV_TYPE_TLV, 0);
|
||||
+// RSL_ATT_TLVDEF(RSL_IE_SMSCB_INFO, TLV_TYPE_FIXED, 23);
|
||||
+// RSL_ATT_TLVDEF(RSL_IE_MS_TIMING_OFFSET, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_ERR_MSG, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_FULL_BCCH_INF, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CH_NEEDED, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CB_CMD_TYPE, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_SMSCB_MESS, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_FULL_IMM_ASS_INF, TLV_TYPE_TLV, 0);
|
||||
+// RSL_ATT_TLVDEF(RSL_IE_SACCH_INFO, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CBCH_LOAD_INF, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_SMSCB_CH_IND, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_GRP_CALL_REF, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CH_DESC, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_NCH_DRX_INF, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CMD_IND, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_EMLPP_PRIO, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_UIC, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MAIN_CH_REF, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CONF, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CNTRL, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_SUP_CODEC_TYPES, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_CODEC_CONF, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_RTD, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_TFO_STATUS, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_LLP_APDU, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_IP, TLV_TYPE_FIXED, 4);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_PORT, TLV_TYPE_FIXED, 2);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_IP, TLV_TYPE_FIXED, 4);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_STAT, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_PORT, TLV_TYPE_FIXED, 2);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_SPEECH_MODE, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2,TLV_TYPE_TV, 0);
|
||||
|
||||
/* Register the protocol name and description */
|
||||
proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)",
|
||||
@@ -3966,5 +4491,9 @@
|
||||
|
||||
register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl);
|
||||
|
||||
+ rsl_module = prefs_register_protocol(proto_rsl, proto_reg_handoff_rsl);
|
||||
+ prefs_register_bool_preference(rsl_module, "use_ipaccess_rsl",
|
||||
+ "Use nanoBTS definitions",
|
||||
+ "Use ipaccess nanoBTS specific definitions for RSL",
|
||||
+ &global_rsl_use_nano_bts);
|
||||
}
|
||||
-
|
|
@ -1,272 +0,0 @@
|
|||
Index: wireshark/epan/dissectors/packet-rsl.c
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/packet-rsl.c 2011-09-06 13:57:15.000000000 +0200
|
||||
+++ wireshark/epan/dissectors/packet-rsl.c 2011-09-06 14:11:09.000000000 +0200
|
||||
@@ -2,6 +2,7 @@
|
||||
* Routines for Radio Signalling Link (RSL) dissection.
|
||||
*
|
||||
* Copyright 2007, 2011, Anders Broman <anders.broman@ericsson.com>
|
||||
+ * Copyright 2009-2011, Harald Welte <laforge@gnumonks.org>
|
||||
*
|
||||
* $Id: packet-rsl.c 38413 2011-08-08 17:59:32Z wmeier $
|
||||
*
|
||||
@@ -136,7 +137,14 @@
|
||||
static int hf_rsl_cstat_lost_pkts = -1;
|
||||
static int hf_rsl_cstat_ia_jitter = -1;
|
||||
static int hf_rsl_cstat_avg_tx_dly = -1;
|
||||
-
|
||||
+/* HSL */
|
||||
+static int hf_rsl_hsl_bts_serno = -1;
|
||||
+static int hf_rsl_hsl_bts_ver = -1;
|
||||
+static int hf_rsl_hsl_dsp_ver = -1;
|
||||
+static int hf_rsl_hsl_fpga_ver = -1;
|
||||
+static int hf_rsl_hsl_trau_remote_port = -1;
|
||||
+static int hf_rsl_hsl_trau_remote_ip = -1;
|
||||
+static int hf_rsl_hsl_tx_power = -1;
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
static int ett_rsl = -1;
|
||||
@@ -207,6 +215,7 @@
|
||||
static proto_tree *top_tree;
|
||||
static dissector_handle_t gsm_a_ccch_handle;
|
||||
static dissector_handle_t gsm_a_dtap_handle;
|
||||
+static dissector_handle_t bssgp_handle;
|
||||
|
||||
static gboolean is_si2q = FALSE;
|
||||
|
||||
@@ -243,9 +252,11 @@
|
||||
{ 0x08, "TRX Management messages" },
|
||||
{ 0x16, "Location Services messages" },
|
||||
{ 0x3f, "ip.access Vendor Specific messages" },
|
||||
+ { 0x80, "HSL Vendor Specific messages" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
#define RSL_MSGDISC_IPACCESS 0x3f
|
||||
+#define RSL_MSGDISC_HSL 0x40
|
||||
/*
|
||||
* 9.2 MESSAGE TYPE
|
||||
*/
|
||||
@@ -357,6 +368,22 @@
|
||||
#define RSL_IE_IPAC_RTP_MPLEX 0xfd
|
||||
#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe
|
||||
|
||||
+/* Vendor-Specific messages of HSL femtocell. There is no public documentation
|
||||
+ * about those extensions, all information in this dissector is based on lawful
|
||||
+ * protocol reverse enginering by Harald Welte <laforge@gnumonks.org> */
|
||||
+#define RSL_MSG_TYPE_HSL_IDENTIFY 0x80
|
||||
+#define RSL_MSG_TYPE_HSL_CONN_TRAU 0x81
|
||||
+#define RSL_MSG_TYPE_HSL_BSSGP 0x82
|
||||
+#define RSL_MSG_TYPE_HSL_GPRS_TS_ALLOC 0x83
|
||||
+#define RSL_MSG_TYPE_HSL_L1_PRIM 0x8a
|
||||
+
|
||||
+#define RSL_IE_HSL_BTS_SERNO 0xc0
|
||||
+#define RSL_IE_HSL_TRAU_PARAMS 0xc1
|
||||
+#define RSL_IE_HSL_TX_POWER 0xc4
|
||||
+#define RSL_IE_HSL_BTS_VERSION 0xc5
|
||||
+#define RSL_IE_HSL_DSP_VERSION 0xc6
|
||||
+#define RSL_IE_HSL_FPGA_VERSION 0xc7
|
||||
+
|
||||
static const value_string rsl_msg_type_vals[] = {
|
||||
/* 0 0 0 0 - - - - Radio Link Layer Management messages: */
|
||||
{ 0x01, "DATA REQuest" }, /* 8.3.1 */
|
||||
@@ -438,6 +465,12 @@
|
||||
{ 0x77, "ip.access DLCX" },
|
||||
{ 0x78, "ip.access DLCX ACK" },
|
||||
{ 0x79, "ip.access DLCX NACK" },
|
||||
+ /* HSL */
|
||||
+ { 0x80, "HSL IDENTIFY" },
|
||||
+ { 0x81, "HSL CONNECT TRAU" },
|
||||
+ { 0x82, "HSL BSSGP" },
|
||||
+ { 0x83, "HSL GPRS TS ALLOC" },
|
||||
+ { 0x8a, "HSL TX SET POWER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
@@ -578,6 +611,7 @@
|
||||
Not used
|
||||
|
||||
*/
|
||||
+ /* ip.access */
|
||||
{ 0xe0, "SRTP Configuration" },
|
||||
{ 0xe1, "BSC Proxy UDP Port" },
|
||||
{ 0xe2, "BSC Multiplex Timeout" },
|
||||
@@ -596,6 +630,13 @@
|
||||
{ 0xfc, "RTP Payload Type 2" },
|
||||
{ 0xfd, "RTP Multiplex" },
|
||||
{ 0xfe, "RTP Multiplex Identifier" },
|
||||
+ /* HSL */
|
||||
+ { 0xc0, "HSL Serial Number" },
|
||||
+ { 0xc1, "HSL TRAU Parameters" },
|
||||
+ { 0xc4, "HSL TX Power (dBm)" },
|
||||
+ { 0xc5, "HSL BTS SW Version" },
|
||||
+ { 0xc6, "HSL DSP SW Version" },
|
||||
+ { 0xc7, "HSL FPGA SW Version" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
@@ -3062,9 +3103,10 @@
|
||||
guint8 msg_type;
|
||||
guint32 local_addr = 0;
|
||||
guint16 local_port = 0;
|
||||
+ int old_visited;
|
||||
address src_addr;
|
||||
|
||||
- msg_type = tvb_get_guint8(tvb, offset)&0x7f;
|
||||
+ msg_type = tvb_get_guint8(tvb, offset)&0xff;
|
||||
offset++;
|
||||
|
||||
#if 0
|
||||
@@ -3203,20 +3245,62 @@
|
||||
proto_tree_add_item(ie_tree, hf_rsl_cstat_avg_tx_dly, tvb,
|
||||
offset+24, 4, FALSE);
|
||||
break;
|
||||
+ /* HSL */
|
||||
+ case RSL_IE_HSL_BTS_SERNO:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_hsl_bts_serno, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ col_append_fstr(pinfo->cinfo, COL_INFO, "SerNo %s ",
|
||||
+ tvb_get_string(tvb, offset, len));
|
||||
+ break;
|
||||
+ case RSL_IE_HSL_TRAU_PARAMS:
|
||||
+ proto_tree_add_item(tree, hf_rsl_hsl_trau_remote_port, tvb,
|
||||
+ offset+2, 2, TRUE);
|
||||
+ local_port = tvb_get_letohs(tvb, offset+2);
|
||||
+ proto_tree_add_item(tree, hf_rsl_hsl_trau_remote_ip, tvb,
|
||||
+ offset+4, 4, FALSE);
|
||||
+ local_addr = tvb_get_ipv4(tvb, offset+4);
|
||||
+ break;
|
||||
+ case RSL_IE_HSL_TX_POWER:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_hsl_tx_power, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_HSL_BTS_VERSION:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_hsl_bts_ver, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_HSL_DSP_VERSION:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_hsl_dsp_ver, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_HSL_FPGA_VERSION:
|
||||
+ proto_tree_add_item(ie_tree, hf_rsl_hsl_fpga_ver, tvb,
|
||||
+ offset, len, FALSE);
|
||||
+ break;
|
||||
+ case RSL_IE_L3_INF:
|
||||
+ if (msg_type == RSL_MSG_TYPE_HSL_BSSGP) {
|
||||
+ tvbuff_t *next_tvb;
|
||||
+ next_tvb = tvb_new_subset(tvb, offset, -1, len);
|
||||
+ call_dissector(bssgp_handle, next_tvb, pinfo, tree);
|
||||
+ }
|
||||
+ break;
|
||||
}
|
||||
offset += len;
|
||||
}
|
||||
|
||||
switch (msg_type) {
|
||||
case RSL_MSG_TYPE_IPAC_CRCX_ACK:
|
||||
+ case RSL_MSG_TYPE_HSL_CONN_TRAU:
|
||||
/* Notify the RTP and RTCP dissectors about a new RTP stream */
|
||||
src_addr.type = AT_IPv4;
|
||||
src_addr.len = 4;
|
||||
src_addr.data = (guint8 *)&local_addr;
|
||||
+ old_visited = pinfo->fd->flags.visited;
|
||||
+ pinfo->fd->flags.visited = 0;
|
||||
rtp_add_address(pinfo, &src_addr, local_port, 0,
|
||||
"GSM A-bis/IP", pinfo->fd->num, 0, NULL);
|
||||
rtcp_add_address(pinfo, &src_addr, local_port+1, 0,
|
||||
"GSM A-bis/IP", pinfo->fd->num);
|
||||
+ pinfo->fd->flags.visited = old_visited;
|
||||
break;
|
||||
}
|
||||
return offset;
|
||||
@@ -3228,10 +3312,12 @@
|
||||
guint8 msg_disc, msg_type;
|
||||
|
||||
msg_disc = tvb_get_guint8(tvb, offset++) >> 1;
|
||||
- msg_type = tvb_get_guint8(tvb,offset)&0x7f;
|
||||
+ msg_type = tvb_get_guint8(tvb,offset);
|
||||
proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
- if (msg_disc == RSL_MSGDISC_IPACCESS) {
|
||||
+ switch (msg_disc) {
|
||||
+ case RSL_MSGDISC_HSL:
|
||||
+ case RSL_MSGDISC_IPACCESS:
|
||||
offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset);
|
||||
return offset;
|
||||
}
|
||||
@@ -3868,7 +3954,7 @@
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSL");
|
||||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
|
||||
- msg_type = tvb_get_guint8(tvb,offset+1)&0x7f;
|
||||
+ msg_type = tvb_get_guint8(tvb,offset+1);
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",val_to_str(msg_type, rsl_msg_type_vals,"unknown %u"));
|
||||
|
||||
@@ -3905,6 +3991,7 @@
|
||||
|
||||
gsm_a_ccch_handle = find_dissector("gsm_a_ccch");
|
||||
gsm_a_dtap_handle = find_dissector("gsm_a_dtap");
|
||||
+ bssgp_handle = find_dissector("bssgp");
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
@@ -3925,7 +4012,7 @@
|
||||
},
|
||||
{ &hf_rsl_msg_type,
|
||||
{ "Message type", "rsl.msg_type",
|
||||
- FT_UINT8, BASE_HEX_DEC, VALS(rsl_msg_type_vals), 0x7f,
|
||||
+ FT_UINT8, BASE_HEX_DEC, VALS(rsl_msg_type_vals), 0xff,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_rsl_ie_id,
|
||||
@@ -4342,6 +4429,35 @@
|
||||
{ "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay",
|
||||
FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
},
|
||||
+ /* HSL */
|
||||
+ { &hf_rsl_hsl_bts_serno,
|
||||
+ { "BTS Serial Number", "rsl.hsl.bts_serno",
|
||||
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_hsl_tx_power,
|
||||
+ { "Transmit Power", "rsl.hsl.tx_power",
|
||||
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_hsl_bts_ver,
|
||||
+ { "BTS Version Number", "rsl.hsl.bts_ver",
|
||||
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_hsl_dsp_ver,
|
||||
+ { "DSP Version Number", "rsl.hsl.dsp_ver",
|
||||
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_hsl_fpga_ver,
|
||||
+ { "FPGA Version Number", "rsl.hsl.fpga_ver",
|
||||
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
|
||||
+ },
|
||||
+ { &hf_rsl_hsl_trau_remote_port,
|
||||
+ { "HSL TRAU Remote RTP Port", "rsl.hsl.trau.remote_port",
|
||||
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
|
||||
+ },
|
||||
+ { &hf_rsl_hsl_trau_remote_ip,
|
||||
+ { "HSL TRAU Remote IP Address", "rsl.hsl.trau.remote_ip",
|
||||
+ FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL },
|
||||
+ },
|
||||
};
|
||||
static gint *ett[] = {
|
||||
&ett_rsl,
|
||||
@@ -4481,6 +4597,13 @@
|
||||
RSL_ATT_TLVDEF(RSL_IE_IPAC_SPEECH_MODE, TLV_TYPE_TV, 0);
|
||||
RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2);
|
||||
RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2,TLV_TYPE_TV, 0);
|
||||
+ /* HSL */
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_HSL_BTS_SERNO, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_HSL_TRAU_PARAMS, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_HSL_TX_POWER, TLV_TYPE_TV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_HSL_BTS_VERSION, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_HSL_DSP_VERSION, TLV_TYPE_TLV, 0);
|
||||
+ RSL_ATT_TLVDEF(RSL_IE_HSL_FPGA_VERSION, TLV_TYPE_TLV, 0);
|
||||
|
||||
/* Register the protocol name and description */
|
||||
proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)",
|
|
@ -1,32 +0,0 @@
|
|||
Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/packet-gsm_abis_oml.c 2011-09-06 13:57:13.000000000 +0200
|
||||
+++ wireshark/epan/dissectors/packet-gsm_abis_oml.c 2011-09-06 14:12:12.000000000 +0200
|
||||
@@ -131,6 +131,7 @@
|
||||
{ ABIS_OM_MDISC_MMI, "MMI Transfer" },
|
||||
{ ABIS_OM_MDISC_TRAU, "TRAU O&M" },
|
||||
{ ABIS_OM_MDISC_MANUF, "Manufacturer specific" },
|
||||
+ { ABIS_OM_MDISC_FOM_HSL,"HSL Formatted O&M" },
|
||||
};
|
||||
|
||||
/* TS 12.21 Chapter 8.1.1 */
|
||||
@@ -1197,6 +1198,7 @@
|
||||
|
||||
switch (msg_disc) {
|
||||
case ABIS_OM_MDISC_FOM:
|
||||
+ case ABIS_OM_MDISC_FOM_HSL:
|
||||
offset = dissect_oml_fom(tvb, pinfo, oml_tree,
|
||||
offset, ti);
|
||||
break;
|
||||
Index: wireshark/epan/dissectors/packet-gsm_abis_oml.h
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/packet-gsm_abis_oml.h 2011-09-06 12:30:44.000000000 +0200
|
||||
+++ wireshark/epan/dissectors/packet-gsm_abis_oml.h 2011-09-06 14:12:12.000000000 +0200
|
||||
@@ -40,6 +40,7 @@
|
||||
#define ABIS_OM_MDISC_MMI 0x40
|
||||
#define ABIS_OM_MDISC_TRAU 0x20
|
||||
#define ABIS_OM_MDISC_MANUF 0x10
|
||||
+#define ABIS_OM_MDISC_FOM_HSL 0x81
|
||||
#define ABIS_OM_PLACEMENT_ONLY 0x80
|
||||
#define ABIS_OM_PLACEMENT_FIRST 0x40
|
||||
#define ABIS_OM_PLACEMENT_MIDDLE 0x20
|
|
@ -1,20 +0,0 @@
|
|||
These are patches to wireshark to add/enhance the GSM support.
|
||||
|
||||
== Basic ==
|
||||
The patches apply to SVN revision r38894 and were created
|
||||
using git format-patch. They can be either applied via the
|
||||
patch command or using git am on a git clone of wireshark.
|
||||
|
||||
|
||||
== Rebasing with git ==
|
||||
It is the easiest to checkout the above revision, apply the
|
||||
patches and then use git rebase git-svn to get to the latest
|
||||
svn version.
|
||||
|
||||
== patches ==
|
||||
0001-abis_oml.patch Add support for Abis OML
|
||||
0002-ericsson_rbs2409.patch Add support for Ericsson Abis over IP
|
||||
0003-lucent-hnb.patch Add support for Lucent HomeNodeB
|
||||
0004-rsl-ipaccess.patch Add IPaccess RSL extensions
|
||||
0005-rsl-hsl.patch Add support for HSL RSL extensions
|
||||
0006-abis_oml-hsl.patch Add support for HSL OML
|
Loading…
Reference in New Issue