20 #ifndef GNSS_SDR_GR_COMPLEX_IP_PACKET_SOURCE_H 21 #define GNSS_SDR_GR_COMPLEX_IP_PACKET_SOURCE_H 24 #include <boost/thread.hpp> 25 #include <gnuradio/sync_block.h> 26 #include <arpa/inet.h> 27 #include <net/ethernet.h> 29 #include <netinet/if_ether.h> 32 #include <sys/ioctl.h> 44 using sptr = gnss_shared_ptr<Gr_Complex_Ip_Packet_Source>;
45 static sptr make(std::string src_device,
46 const std::string &origin_address,
49 int n_baseband_channels,
50 const std::string &wire_sample_type,
54 const std::string &origin_address,
57 int n_baseband_channels,
58 const std::string &wire_sample_type,
70 int work(
int noutput_items,
71 gr_vector_const_void_star &input_items,
72 gr_vector_void_star &output_items);
75 void demux_samples(
const gr_vector_void_star &output_items,
int num_samples_readed);
76 void my_pcap_loop_thread(pcap_t *pcap_handle);
77 void pcap_callback(u_char *args,
const struct pcap_pkthdr *pkthdr,
const u_char *packet);
78 static void static_pcap_callback(u_char *args,
const struct pcap_pkthdr *pkthdr,
const u_char *packet);
85 boost::thread *d_pcap_thread;
87 struct sockaddr_in si_me
90 std::string d_src_device;
91 std::string d_origin_address;
99 int d_n_baseband_channels;
100 int d_wire_sample_type;
101 float d_bytes_per_sample;
108 #endif // GNSS_SDR_GR_COMPLEX_IP_PACKET_SOURCE_H
This interface represents a GNSS block.