Class: Pcap::Packet

Inherits:
Object
  • Object
show all
Defined in:
lib/pcap_misc.rb,
ext/packet.c

Direct Known Subclasses

IPPacket

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) _load



138
139
140
# File 'ext/packet.c', line 138

static VALUE
packet_load(class, str)
VALUE class;

+ (Object) _load_from

marshal backward compatibility



138
139
140
# File 'ext/packet.c', line 138

static VALUE
packet_load(class, str)
VALUE class;

Instance Method Details

- (Object) =~



259
260
261
# File 'ext/packet.c', line 259

static VALUE
packet_match(self, expr)
VALUE self;

- (Object) _dump



194
195
196
# File 'ext/packet.c', line 194

static VALUE
packet_dump(self, limit)
VALUE self;

- (Object) _dump_to



194
195
196
# File 'ext/packet.c', line 194

static VALUE
packet_dump(self, limit)
VALUE self;

- (Object) caplen

- (Object) inspect



8
9
10
# File 'lib/pcap_misc.rb', line 8

def inspect
  "#<#{self.class}: #{self}>"
end

- (Boolean) ip?

Returns:

  • (Boolean)

- (Object) length

- (Object) raw_data

- (Object) size

- (Boolean) tcp?

Returns:

  • (Boolean)

- (Object) time

- (Object) time_i

- (Object) time_i=



242
243
244
# File 'ext/packet.c', line 242

static VALUE
packet_set_time_i(self, val)
VALUE self;

- (Object) to_s



4
5
6
# File 'lib/pcap_misc.rb', line 4

def to_s
  'Some packet'
end

- (Object) udata

- (Object) udata=



227
228
229
# File 'ext/packet.c', line 227

static VALUE
packet_set_udata(self, val)
VALUE self;

- (Boolean) udp?

Returns:

  • (Boolean)