Attention is currently required from: roox, laforge.
manawyrm has posted comments on this change. ( https://gerrit.osmocom.org/c/dahdi-tools/+/27273 )
Change subject: Fix compilation with gcc-10.2.0
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
Interesting that it breaks on 10.2.0, it compiles fine on gcc version 11.2.0 (debian bookworm).
Still, good change.
--
To view, visit https://gerrit.osmocom.org/c/dahdi-tools/+/27273
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-tools
Gerrit-Branch: master
Gerrit-Change-Id: I1d6f46874f74e1dfc70cabf7c4a8b8cdae9af4fa
Gerrit-Change-Number: 27273
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Reviewer: roox <mardnh(a)gmx.de>
Gerrit-Attention: roox <mardnh(a)gmx.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 21 Feb 2022 20:40:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/dahdi-tools/+/27277
to look at the new patch set (#2).
Change subject: add contrib/jenkins.sh for jenkins.osmocom.org build verification
......................................................................
add contrib/jenkins.sh for jenkins.osmocom.org build verification
Change-Id: I47701be92476ba9adfdf9783747c6c511cec1903
---
A contrib/jenkins.sh
1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-tools refs/changes/77/27277/2
--
To view, visit https://gerrit.osmocom.org/c/dahdi-tools/+/27277
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-tools
Gerrit-Branch: master
Gerrit-Change-Id: I47701be92476ba9adfdf9783747c6c511cec1903
Gerrit-Change-Number: 27277
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-tools/+/27275 )
Change subject: dahdi_pcap: Fix the use of the pkttype field
......................................................................
dahdi_pcap: Fix the use of the pkttype field
* pkttype is big-endian, so '3' is not valid, but htons(3)
* let's not use magic numbers but the actual #define PACKET_*
* differentiate PACKET_HOST (rx) from PACKET_OUTGOING (tx),
which makes wireshark properly show rx/tx packets, allows coloring
or filtering based on direction, etc.
Change-Id: I8c66a011a0fa0c5275bf3d5cf6b42064f02e28c0
---
M dahdi_pcap.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-tools refs/changes/75/27275/1
diff --git a/dahdi_pcap.c b/dahdi_pcap.c
index 225fe78..0eadde3 100644
--- a/dahdi_pcap.c
+++ b/dahdi_pcap.c
@@ -41,6 +41,7 @@
#include <sys/ioctl.h>
#include <stdlib.h>
#include <getopt.h>
+#include <linux/if_packet.h>
#define BLOCK_SIZE 512
#define MAX_CHAN 16
@@ -161,7 +162,7 @@
hdr.caplen = res+sizeof(struct lapd_sll_hdr)-2;
hdr.len = res+sizeof(struct lapd_sll_hdr)-2;
- lapd->sll_pkttype = 3;
+ lapd->sll_pkttype = htons(is_read ? PACKET_HOST : PACKET_OUTGOING);
lapd->sll_hatype = 0;
lapd->sll_halen = htons(8);
// lapd->sll_addr = ???
--
To view, visit https://gerrit.osmocom.org/c/dahdi-tools/+/27275
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-tools
Gerrit-Branch: master
Gerrit-Change-Id: I8c66a011a0fa0c5275bf3d5cf6b42064f02e28c0
Gerrit-Change-Number: 27275
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-tools/+/27276 )
Change subject: dahdi_pcap: Allow caller to specify network / user mode
......................................................................
dahdi_pcap: Allow caller to specify network / user mode
A LAPD dissector (such as the one in wireshark) needs to know if
the local side is the user or the network in order to properly
decode/display the trace. This is encoded in the sll_addr field
whose first octet indicates if the local (capturing) node serves
as the network or user side of ISDN.
Change-Id: Ief575bc4118fe5f20ef4b374d29eca442b04dabb
---
M dahdi_pcap.c
1 file changed, 22 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-tools refs/changes/76/27276/1
diff --git a/dahdi_pcap.c b/dahdi_pcap.c
index 0eadde3..1e69a36 100644
--- a/dahdi_pcap.c
+++ b/dahdi_pcap.c
@@ -101,7 +101,7 @@
return fd;
}
-int log_packet(struct chan_fds * fd, char is_read, pcap_dumper_t * dump)
+int log_packet(struct chan_fds * fd, char is_read, int we_are_network, pcap_dumper_t * dump)
{
unsigned char buf[BLOCK_SIZE * 4];
int res = 0;
@@ -165,7 +165,7 @@
lapd->sll_pkttype = htons(is_read ? PACKET_HOST : PACKET_OUTGOING);
lapd->sll_hatype = 0;
lapd->sll_halen = htons(8);
- // lapd->sll_addr = ???
+ lapd->sll_addr[0] = we_are_network;
lapd->sll_protocol[0] = 0x00;
lapd->sll_protocol[1] = 0x30;
@@ -198,10 +198,11 @@
printf("Usage: dahdi_pcap [OPTIONS]\n");
printf("Capture packets from DAHDI channels to pcap file\n\n");
printf("Options:\n");
- printf(" -p, --proto=[mtp2|lapd] The protocol to capture, default mtp2\n");
- printf(" -c, --chan=<channels> Comma separated list of channels to capture from, max %d. Mandatory\n", MAX_CHAN);
- printf(" -f, --file=<filename> The pcap file to capture to. Mandatory\n");
- printf(" -h, --help Display this text\n");
+ printf(" -p, --proto=[mtp2|lapd] The protocol to capture, default mtp2\n");
+ printf(" -c, --chan=<channels> Comma separated list of channels to capture from, max %d. Mandatory\n", MAX_CHAN);
+ printf(" -r, --role=[network|user] Is the local side the network or user side in ISDN?\n");
+ printf(" -f, --file=<filename> The pcap file to capture to. Mandatory\n");
+ printf(" -h, --help Display this text\n");
}
int main(int argc, char **argv)
@@ -211,6 +212,7 @@
int num_chans = 0;
int max_fd = 0;
int proto = DLT_MTP2_WITH_PHDR;
+ int we_are_network = 0;
int i;
int packetcount;
@@ -221,12 +223,13 @@
static struct option long_options[] = {
{"proto", required_argument, 0, 'p'},
{"chan", required_argument, 0, 'c'},
+ {"role", required_argument, 0, 'r'},
{"file", required_argument, 0, 'f'},
{"help", 0, 0, 'h'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "p:c:f:?",
+ c = getopt_long(argc, argv, "p:c:r:f:?",
long_options, &option_index);
if (c == -1)
break;
@@ -269,6 +272,16 @@
}
max_fd++;
break;
+ case 'r':
+ if (!strcasecmp("network", optarg))
+ we_are_network = 1;
+ else if (!strcasecmp("user", optarg))
+ we_are_network = 0;
+ else {
+ fprintf(stderr, "Role must be user or network!\n");
+ exit(1);
+ }
+ break;
case 'f':
// File to capture to
filename=optarg;
@@ -318,11 +331,11 @@
{
if(FD_ISSET(chans[i].rfd, &rd_set))
{
- packetcount += log_packet(&chans[i], 1, dump);
+ packetcount += log_packet(&chans[i], 1, we_are_network, dump);
}
if(FD_ISSET(chans[i].tfd, &rd_set))
{
- packetcount += log_packet(&chans[i], 0, dump);
+ packetcount += log_packet(&chans[i], 0, we_are_network, dump);
}
}
printf("Packets captured: %d\r", packetcount);
--
To view, visit https://gerrit.osmocom.org/c/dahdi-tools/+/27276
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-tools
Gerrit-Branch: master
Gerrit-Change-Id: Ief575bc4118fe5f20ef4b374d29eca442b04dabb
Gerrit-Change-Number: 27276
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange