ruby/trema/match.c in trema-0.2.2.1 vs ruby/trema/match.c in trema-0.2.3

- old
+ new

@@ -1,8 +1,6 @@ /* - * Author: Yasuhito Takamiya <yasuhito@gmail.com> - * * Copyright (C) 2008-2012 NEC Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. @@ -33,11 +31,11 @@ struct ofp_match *match = xmalloc( sizeof( struct ofp_match ) ); return Data_Wrap_Struct( klass, NULL, xfree, match ); } -static struct +static struct ofp_match *get_match( VALUE self ) { struct ofp_match *match; Data_Get_Struct( self, struct ofp_match, match ); return match; } @@ -100,11 +98,11 @@ * * [:tp_dst] * the destination TCP/UDP port number to wildcard. * * @return [Match] self - * the modified or exact match from packet depending on whether the options + * the modified or exact match from packet depending on whether the options * argument supplied or not. */ static VALUE match_from( int argc, VALUE *argv, VALUE self ) { VALUE message, obj, wildcard_id, options; @@ -334,11 +332,11 @@ } /* * An IPv4 destination address in its numeric representation. - * + * * @return [IP] the value of nw_dst. */ static VALUE match_nw_dst( VALUE self ) { return match_nw( self, 0 ); @@ -363,17 +361,17 @@ } /* * Creates a {Match} instance which describe fields such as MAC addresses, IP - * addresses, TCP/UDP ports of a flow to match against. An exact match + * addresses, TCP/UDP ports of a flow to match against. An exact match * flow would match on all fields whereas don't care bits are wildcarded and * ignored. * * @overload initialize(options={}) * - * @example + * @example * Match.new( * :in_port => port_no, * :dl_src => "xx:xx:xx;xx:xx:xx", * :dl_dst => "xx:xx:xx:xx:xx:xx", * :dl_type => ethertype, @@ -473,11 +471,11 @@ dl_addr = dl_src; } else { dl_addr = rb_funcall( rb_eval_string( "Trema::Mac" ), rb_intern( "new" ), 1, dl_src ); } - dl_addr_short( dl_addr, match->dl_src ); + dl_addr_to_a( dl_addr, match->dl_src ); match->wildcards &= ( uint32_t ) ~OFPFW_DL_SRC; } VALUE dl_dst = rb_hash_aref( options, ID2SYM( rb_intern( "dl_dst" ) ) ); if ( dl_dst != Qnil ) { @@ -486,10 +484,10 @@ dl_addr = dl_dst; } else { dl_addr = rb_funcall( rb_eval_string( "Trema::Mac" ), rb_intern( "new" ), 1, dl_dst ); } - dl_addr_short( dl_addr, match->dl_dst ); + dl_addr_to_a( dl_addr, match->dl_dst ); match->wildcards &= ( uint32_t ) ~OFPFW_DL_DST; } VALUE dl_type = rb_hash_aref( options, ID2SYM( rb_intern( "dl_type" ) ) ); if ( dl_type != Qnil ) {