This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16452 )
Change subject: e1cap_dump: Add -h and -V to print help / version of program
......................................................................
e1cap_dump: Add -h and -V to print help / version of program
Change-Id: I621c1f15e1bdb38691ae1fc50c5190ae2701eb58
---
M src/e1cap_dump.c
1 file changed, 23 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c
index 73be84b..68460ab 100644
--- a/src/e1cap_dump.c
+++ b/src/e1cap_dump.c
@@ -19,6 +19,8 @@
#include "flip_bits.h"
#include "hdlc.h"
+#include "config.h"
+
struct e1_recorder g_recorder;
enum mode {
@@ -201,12 +203,32 @@
return 0;
}
+static void print_help(void)
+{
+ printf( " -h Print this message\n"
+ " -V Print version of the program\n"
+ " -l LINE_NR Filter on line number\n"
+ " -s SLOT_NR Filter on timeslot number\n"
+ " -b Raw binary output mode (for piping stdout)\n"
+ " -S Super-Channel mode\n"
+ " -u SUBSLOT_NR Filter on 16k sub-slot number\n"
+ " -p PCAP_FILE Write LAPD PCAP file\n"
+ );
+};
+
static int handle_options(int argc, char **argv)
{
int opt;
- while ((opt = getopt(argc, argv, "l:s:bSu:p:")) != -1) {
+ while ((opt = getopt(argc, argv, "hVl:s:bSu:p:")) != -1) {
switch (opt) {
+ case 'h':
+ print_help();
+ exit(0);
+ case 'V':
+ printf("%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
+ exit(0);
+ break;
case 'l': /* Filter on E1 Line Number */
g_filter_line = atoi(optarg);
break;
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16452
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1-recorder
Gerrit-Branch: master
Gerrit-Change-Id: I621c1f15e1bdb38691ae1fc50c5190ae2701eb58
Gerrit-Change-Number: 16452
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191204/382dfad5/attachment.htm>