def get_info(self, alias_info=True): info = { "large_packets": self.large_packets, "compression_level": self.compression_level, "max_packet_size": self.max_packet_size, "aliases": USE_ALIASES, "input": { "buffer-size": READ_BUFFER_SIZE, "packetcount": self.input_packetcount, "raw_packetcount": self.input_raw_packetcount, "count": self.input_stats, "cipher": { "": self.cipher_in_name or "", "padding": self.cipher_in_padding, }, }, "output": { "packet-join-size": PACKET_JOIN_SIZE, "large-packet-size": LARGE_PACKET_SIZE, "inline-size": INLINE_SIZE, "min-compress-size": MIN_COMPRESS_SIZE, "packetcount": self.output_packetcount, "raw_packetcount": self.output_raw_packetcount, "count": self.output_stats, "cipher": { "": self.cipher_out_name or "", "padding": self.cipher_out_padding }, }, } c = self._compress if c: info["compressor"] = compression.get_compressor_name( self._compress) e = self._encoder if e: if self._encoder == self.noencode: info["encoder"] = "noencode" else: info["encoder"] = packet_encoding.get_encoder_name( self._encoder) if alias_info: info["send_alias"] = self.send_aliases info["receive_alias"] = self.receive_aliases c = self._conn if c: try: info.update(self._conn.get_info()) except: log.error("error collecting connection information on %s", self._conn, exc_info=True) info["has_more"] = self._source_has_more.is_set() for t in (self._write_thread, self._read_thread, self._read_parser_thread, self._write_format_thread): if t: info.setdefault("thread", {})[t.name] = t.is_alive() return info
def get_info(self, alias_info=True): info = { "large_packets" : self.large_packets, "compression_level" : self.compression_level, "max_packet_size" : self.max_packet_size, "aliases" : USE_ALIASES, "input" : { "buffer-size" : READ_BUFFER_SIZE, "packetcount" : self.input_packetcount, "raw_packetcount" : self.input_raw_packetcount, "count" : self.input_stats, "cipher" : {"": self.cipher_in_name or "", "padding" : self.cipher_in_padding, }, }, "output" : { "packet-join-size" : PACKET_JOIN_SIZE, "large-packet-size" : LARGE_PACKET_SIZE, "inline-size" : INLINE_SIZE, "min-compress-size" : MIN_COMPRESS_SIZE, "packetcount" : self.output_packetcount, "raw_packetcount" : self.output_raw_packetcount, "count" : self.output_stats, "cipher" : {"": self.cipher_out_name or "", "padding" : self.cipher_out_padding }, }, } c = self._compress if c: info["compressor"] = compression.get_compressor_name(self._compress) e = self._encoder if e: if self._encoder==self.noencode: info["encoder"] = "noencode" else: info["encoder"] = packet_encoding.get_encoder_name(self._encoder) if alias_info: info["send_alias"] = self.send_aliases info["receive_alias"] = self.receive_aliases c = self._conn if c: try: info.update(self._conn.get_info()) except: log.error("error collecting connection information on %s", self._conn, exc_info=True) info["has_more"] = self._source_has_more.is_set() for t in (self._write_thread, self._read_thread, self._read_parser_thread, self._write_format_thread): if t: info.setdefault("thread", {})[t.name] = t.is_alive() return info
def get_info(self, alias_info=True): info = { "input.packetcount": self.input_packetcount, "input.raw_packetcount": self.input_raw_packetcount, "input.cipher": self.cipher_in_name or "", "input.cipher.padding": self.cipher_in_padding, "output.packetcount": self.output_packetcount, "output.raw_packetcount": self.output_raw_packetcount, "output.cipher": self.cipher_out_name or "", "output.cipher.padding": self.cipher_out_padding, "large_packets": self.large_packets, "compression_level": self.compression_level, "max_packet_size": self.max_packet_size } updict(info, "input.count", self.input_stats) updict(info, "output.count", self.output_stats) c = self._compress if c: info["compressor"] = compression.get_compressor_name( self._compress) e = self._encoder if e: if self._encoder == self.noencode: info["encoder"] = "noencode" else: info["encoder"] = packet_encoding.get_encoder_name( self._encoder) if alias_info: for k, v in self.send_aliases.items(): info["send_alias." + str(k)] = v info["send_alias." + str(v)] = k for k, v in self.receive_aliases.items(): info["receive_alias." + str(k)] = v info["receive_alias." + str(v)] = k c = self._conn if c: try: info.update(self._conn.get_info()) except: log.error("error collecting connection information on %s", self._conn, exc_info=True) info["has_more"] = self._source_has_more.is_set() for t in (self._write_thread, self._read_thread, self._read_parser_thread, self._write_format_thread): if t: info["thread.%s" % t.name] = t.is_alive() return info
def get_info(self, alias_info=True): info = { "input.packetcount" : self.input_packetcount, "input.raw_packetcount" : self.input_raw_packetcount, "input.cipher" : self.cipher_in_name or "", "input.cipher.padding" : self.cipher_in_padding, "output.packetcount" : self.output_packetcount, "output.raw_packetcount": self.output_raw_packetcount, "output.cipher" : self.cipher_out_name or "", "output.cipher.padding" : self.cipher_out_padding, "large_packets" : self.large_packets, "compression_level" : self.compression_level, "max_packet_size" : self.max_packet_size} updict(info, "input.count", self.input_stats) updict(info, "output.count", self.output_stats) c = self._compress if c: info["compressor"] = compression.get_compressor_name(self._compress) e = self._encoder if e: if self._encoder==self.noencode: info["encoder"] = "noencode" else: info["encoder"] = packet_encoding.get_encoder_name(self._encoder) if alias_info: for k,v in self.send_aliases.items(): info["send_alias." + str(k)] = v info["send_alias." + str(v)] = k for k,v in self.receive_aliases.items(): info["receive_alias." + str(k)] = v info["receive_alias." + str(v)] = k c = self._conn if c: try: info.update(self._conn.get_info()) except: log.error("error collecting connection information on %s", self._conn, exc_info=True) info["has_more"] = self._source_has_more.is_set() for t in (self._write_thread, self._read_thread, self._read_parser_thread, self._write_format_thread): if t: info["thread.%s" % t.name] = t.is_alive() return info
def get_info(self): info = { "input.count": self.input_stats, "input.packetcount": self.input_packetcount, "input.raw_packetcount": self.input_raw_packetcount, "input.cipher": self.cipher_in_name or "", "output.count": self.output_stats, "output.packetcount": self.output_packetcount, "output.raw_packetcount": self.output_raw_packetcount, "output.cipher": self.cipher_out_name or "", "large_packets": self.large_packets, "compression_level": self.compression_level, "max_packet_size": self.max_packet_size } c = self._compress if c: info["compressor"] = compression.get_compressor_name( self._compress) e = self._encoder if e: if self._encoder == self.noencode: info["encoder"] = "noencode" else: info["encoder"] = packet_encoding.get_encoder_name( self._encoder) for k, v in self.send_aliases.items(): info["send_alias." + str(k)] = v info["send_alias." + str(v)] = k for k, v in self.receive_aliases.items(): info["receive_alias." + str(k)] = v info["receive_alias." + str(v)] = k c = self._conn if c: try: info.update(self._conn.get_info()) except: log.error("error collecting connection information on %s", self._conn, exc_info=True) return info