Design and Implementation of Border Gateway Protocol BGP 4 Based on Event Driven Programming

Border Gateway Protocol (BGP) is a distributed dynamic routing protocol for exchanging routing information among autonomous systems. In this paper, the implementation of distributed routing protocol BGP 4 in high performance router developed by Tsinghua University is presented. A method based on event driven programming is presented to implement the complicated protocol. Event driven programming can reflect the real situation of networks, so it is suitable for the network programming. This method can also be used to implement other higher layer protocols of Internet.