mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 13:48:32 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1961beea1 | ||
|
|
d0ad985eb0 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,4 +25,5 @@ host/tests
|
||||
usb_strings_generated.h
|
||||
firmware/usbstring/usbstring
|
||||
firmware/apps/*/usb_strings.txt.patched
|
||||
firmware/misc/crctool
|
||||
firmware/misc/crctool
|
||||
host/include/osmocom/simtrace2/version.h
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
osmocom/simtrace2/version.h: osmocom/simtrace2/version.h.tpl
|
||||
$(AM_V_GEN)$(MKDIR_P) $(dir $@)
|
||||
$(AM_V_GEN)sed \
|
||||
-e "s/{{VERSION}}/$$(echo '@VERSION@' | cut -d. -f1-3)/g" \
|
||||
-e "s/{{VERSION_MAJOR}}/$$(echo '@VERSION@' | cut -d. -f1)/g" \
|
||||
-e "s/{{VERSION_MINOR}}/$$(echo '@VERSION@' | cut -d. -f2)/g" \
|
||||
-e "s/{{VERSION_PATCH}}/$$(echo '@VERSION@' | cut -d. -f3)/g" \
|
||||
$< > $@
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
osmocom/simtrace2/apdu_dispatch.h \
|
||||
osmocom/simtrace2/simtrace2_api.h \
|
||||
@@ -5,4 +14,5 @@ nobase_include_HEADERS = \
|
||||
osmocom/simtrace2/simtrace_prot.h \
|
||||
osmocom/simtrace2/usb_util.h \
|
||||
osmocom/simtrace2/gsmtap.h \
|
||||
osmocom/simtrace2/version.h \
|
||||
$(NULL)
|
||||
|
||||
16
host/include/osmocom/simtrace2/version.h.tpl
Normal file
16
host/include/osmocom/simtrace2/version.h.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#define LIBOSMO_SIMTRACE2_VERSION {{VERSION}}
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_STR "{{VERSION}}"
|
||||
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_MAJOR {{VERSION_MAJOR}}
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_MINOR {{VERSION_MINOR}}
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_PATCH {{VERSION_PATCH}}
|
||||
|
||||
#define LIBOSMO_SIMTRACE2_VERSION_GREATER_EQUAL(major, minor, patch) \
|
||||
(LIBOSMO_SIMTRACE2_VERSION_MAJOR > (major) || \
|
||||
(LIBOSMO_SIMTRACE2_VERSION_MAJOR == (major) && \
|
||||
LIBOSMO_SIMTRACE2_VERSION_MINOR > (minor)) || \
|
||||
(LIBOSMO_SIMTRACE2_VERSION_MAJOR == (major) && \
|
||||
LIBOSMO_SIMTRACE2_VERSION_MINOR == (minor) && \
|
||||
LIBOSMO_SIMTRACE2_VERSION_PATCH >= (patch)))
|
||||
@@ -66,7 +66,7 @@ int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned in
|
||||
|
||||
memcpy(buf + sizeof(*gh), apdu, len);
|
||||
|
||||
rc = write(gsmtap_inst_fd(g_gti), buf, gross_len);
|
||||
rc = write(gsmtap_inst_fd2(g_gti), buf, gross_len);
|
||||
if (rc < 0) {
|
||||
perror("write gsmtap");
|
||||
free(buf);
|
||||
|
||||
Reference in New Issue
Block a user