Пример #1
0
/*
 * The IGMP group address.
 *
 * @return [Trema::IP, nil]
 *   the value of IGMP IP group address as a Trema::IP object
 *   or nil if packet is not IGMP.
 */
static VALUE
packet_in_igmp_group( VALUE self ) {
  if ( ( get_packet_in_info( self )->format & NW_IGMP ) ) {
    PACKET_IN_RETURN_IP( igmp_group );
  }
  else {
    return Qnil;
  }
}
Пример #2
0
/*
 * The IPV4 destination IP address of a packet.
 *
 * @return [Trema::IP, nil]
 *   the value of IPv4 destination IP address as a Trema::IP object or nil if
 *   packet is not an IPv4.
 */
static VALUE
packet_in_ipv4_daddr( VALUE self ) {
  if ( ( get_packet_in_info( self )->format & NW_IPV4 ) ) {
    PACKET_IN_RETURN_IP( ipv4_daddr );
  }
  else {
    return Qnil;
  }
}
Пример #3
0
/*
 * The ICMPv4 redirect message gateway IP address.
 *
 * @return [Trema::IP, nil]
 *   the value of ICMPv4 redirect message IP gateway address as a Trema::IP
 *   object or nil if packet is not ICMPv4.
 */
static VALUE
packet_in_icmpv4_gateway( VALUE self ) {
  if ( ( get_packet_in_info( self )->format & NW_ICMPV4 ) ) {
    PACKET_IN_RETURN_IP( icmpv4_gateway );
  }
  else {
    return Qnil;
  }
}
Пример #4
0
/*
 * The ARP target protocol address of a packet.
 *
 * @return [Trema::IP]
 *   the value of ARP target protocol address as a Trema::IP object or nil if
 *   packet is not an ARP.
 */
static VALUE
packet_in_arp_tpa( VALUE self ) {
  if ( ( get_packet_in_info( self )->format & NW_ARP ) ) {
    PACKET_IN_RETURN_IP( arp_tpa );
  }
  else {
    return Qnil;
  }
}
Пример #5
0
/*
 * The IGMP group address.
 *
 * @return [Trema::IP] igmp_group an IGMP group address.
 */
static VALUE
packet_in_igmp_group( VALUE self ) {
  PACKET_IN_RETURN_IP( igmp_group );
}
Пример #6
0
/*
 * The gateway address of ICMPv4 redicect.
 *
 * @return [Trema::IP] icmp_gateway The gateway address of ICMPv4 redicect.
 */
static VALUE
packet_in_icmpv4_gateway( VALUE self ) {
  PACKET_IN_RETURN_IP( icmpv4_gateway );
}
Пример #7
0
/*
 * The IPV4 destination protocol address.
 *
 * @return [Trema::IP] ipv4_daddr IP protocol address.
 */
static VALUE
packet_in_ipv4_daddr( VALUE self ) {
  PACKET_IN_RETURN_IP( ipv4_daddr );
}
Пример #8
0
/*
 * The ARP target protocol address.
 *
 * @return [Trema::IP] arp_tpa IP protocol address.
 */
static VALUE
packet_in_arp_tpa( VALUE self ) {
  PACKET_IN_RETURN_IP( arp_tpa );
}