Skip to content

Instantly share code, notes, and snippets.

@wesyoung
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save wesyoung/748575f93110ec37802d to your computer and use it in GitHub Desktop.

Select an option

Save wesyoung/748575f93110ec37802d to your computer and use it in GitHub Desktop.
sub main {
my $ret = connect_bgpdata( $bgp_remote, $bgp_remote_port );
die('connect failure') unless ( $ret == 0 );
my $xml_msg;
my ( @addrs, @peers, $hash, $timestamp, $asn );
$Logger->debug('reading first message');
while ( $xml_msg = read_xml_message() ) {
warn 'test';
if ( !defined($xml_msg) ) {
$Logger->warn( get_error_code() . ": " . get_error_msg() );
}
parse_xml_msg($xml_msg);
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment