diff options
author | Piotr Krysik <perper@o2.pl> | 2009-06-22 17:56:04 +0200 |
---|---|---|
committer | Piotr Krysik <perper@o2.pl> | 2009-06-22 17:56:04 +0200 |
commit | 59d16fcfe6b32c36fdbe64c594234fa96473dc70 (patch) | |
tree | c4cd8b93fb0517ec3f03dbfcd66edfaea7880a14 | |
parent | 99df35563a8135496bb9f4be0df43379e7f9e393 (diff) |
added Harald's code for pcap output
-rw-r--r-- | src/lib/decoder/Makefile.am | 7 | ||||
-rw-r--r-- | src/lib/decoder/gsmstack.c | 4 | ||||
-rw-r--r-- | src/lib/gsm_receiver_cf.cc | 6 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/decoder/Makefile.am b/src/lib/decoder/Makefile.am index 3a3e3f5..1ad7899 100644 --- a/src/lib/decoder/Makefile.am +++ b/src/lib/decoder/Makefile.am @@ -30,6 +30,8 @@ libdecoder_la_SOURCES = \ cch.c \ fire_crc.c \ gsmstack.c \ + out_pcap.c \ + tun.c \ interleave.c noinst_HEADERS = \ @@ -38,6 +40,9 @@ noinst_HEADERS = \ fire_crc.h \ gsmstack.h \ interleave.h \ - system.h + system.h \ + out_pcap.h \ + tun.h \ + gsmtap.h # burst_types.h diff --git a/src/lib/decoder/gsmstack.c b/src/lib/decoder/gsmstack.c index a1f32d8..c3f1921 100644 --- a/src/lib/decoder/gsmstack.c +++ b/src/lib/decoder/gsmstack.c @@ -88,11 +88,11 @@ GS_new(GS_CTX *ctx) if (ctx->tun_fd < 0) fprintf(stderr, "cannot open 'gsm' tun device, did you create it?\n"); - ctx->pcap_fd = open_pcap_file("tvoid.pcap"); + ctx->pcap_fd = open_pcap_file("gsm-receiver.pcap"); if (ctx->pcap_fd < 0) fprintf(stderr, "cannot open PCAP file: %s\n", strerror(errno)); - ctx->burst_pcap_fd = open_pcap_file("tvoid-burst.pcap"); + ctx->burst_pcap_fd = open_pcap_file("gsm-receiver-burst.pcap"); if (ctx->burst_pcap_fd < 0) fprintf(stderr, "cannot open burst PCAP file: %s\n", strerror(errno)); diff --git a/src/lib/gsm_receiver_cf.cc b/src/lib/gsm_receiver_cf.cc index e314381..2081e07 100644 --- a/src/lib/gsm_receiver_cf.cc +++ b/src/lib/gsm_receiver_cf.cc @@ -42,13 +42,11 @@ void gsm_receiver_cf::process_normal_burst(burst_counter burst_nr, const unsigned char * burst_binary) { if (burst_nr.get_timeslot_nr() == 0) { -// std::cout << " t2:" << burst_nr.get_t2() << " fn:" << burst_nr.get_frame_nr(); -// printf(" burst = [ "); +// printf(" %2d %6x %6x", burst_nr.get_t2(), burst_nr.get_frame_nr(), burst_nr.get_frame_nr_mod()); // for (int i = 0; i < BURST_SIZE ; i++) { // printf(" %d", burst_binary[i]); // } -// printf("];\n"); -// std::cout << " t2: " << burst_nr.get_t2() << "\n"; +// std::cout << "\n"; // std::cout << " bcc: " << d_bcc << "\n"; GS_process(&d_gs_ctx, TIMESLOT0, 6, &burst_binary[3], burst_nr.get_frame_nr()); } |