예제 #1
0
파일: port.c 프로젝트: dalent/trema
/*
 * Tests if the link and port are both up.
 *
 * @return [Boolean] true if link is up otherwise false.
 */
static VALUE
port_and_link_up( VALUE self ) {
  if ( port_up( self ) == Qtrue && link_up( self ) == Qtrue ) {
    return Qtrue;
  }
  return Qfalse;
}
예제 #2
0
파일: port.c 프로젝트: miyakz1192/trema
/*
 * Tests if the port is down.
 *
 * @return [Boolean] true if port is down otherwise false.
 */
static VALUE
port_down( VALUE self ) {
  return port_up( self ) == Qfalse ? Qtrue : Qfalse;
}