Пример #1
0
int
main( int argc, char *argv[] ) {
  init_trema( &argc, &argv );

  services services;
  if ( !set_match_type( argc, argv, &services ) ) {
    usage();
    exit( EXIT_FAILURE );
  }

  set_packet_in_handler( handle_packet_in, &services );

  start_trema();

  return 0;
}
Пример #2
0
int
main( int argc, char *argv[] ) {
  init_trema( &argc, &argv );

  init_match_table();

  // built-in packetin-filter-rule
  if ( !set_match_type( argc, argv ) ) {
    usage();
    finalize_match_table();
    exit( EXIT_FAILURE );
  }

  set_packet_in_handler( handle_packet_in, NULL );

  start_trema();

  finalize_match_table();

  return 0;
}
Пример #3
0
int
main( int argc, char *argv[] ) {
  init_trema( &argc, &argv );

  init_packetin_match_table();

  // built-in packetin-filter-rule
  if ( !set_match_type( argc, argv ) ) {
    usage();
    finalize_packetin_match_table();
    exit( EXIT_FAILURE );
  }

  set_packet_in_handler( handle_packet_in, NULL );
  add_message_requested_callback( PACKETIN_FILTER_MANAGEMENT_SERVICE, handle_request );

  start_trema();

  finalize_packetin_match_table();

  return 0;
}