Sha256: 0c0715d8135da9b73c6959e529e806178c2cc4798cf7de551d5ddd04bdbe2b4d

Contents?: true

Size: 1.17 KB

Versions: 23

Compression:

Stored size: 1.17 KB

Contents

/*
 * Author: Nick Karanatsios <nickkaranatsios@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.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */


#include "ruby.h"
#include "trema.h"


void
handle_switch_disconnected( uint64_t datapath_id, void *user_data ) {
  VALUE controller = ( VALUE ) user_data;
  if ( rb_respond_to( controller, rb_intern( "switch_disconnected" ) ) == Qfalse ) {
    return;
  }
  rb_funcall( controller, rb_intern( "switch_disconnected" ), 1, ULL2NUM( datapath_id ) );
}


/*
 * Local variables:
 * c-basic-offset: 2
 * indent-tabs-mode: nil
 * End:
 */

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trema-0.1.3.2 ruby/trema/switch-disconnected.c
trema-0.1.3.1 ruby/trema/switch-disconnected.c
trema-0.1.3 ruby/trema/switch-disconnected.c