Code Monkey home page Code Monkey logo

pyospf's Introduction

pyospf

pyospf is an OSPF probe implementation in Python. It is designed for making OSPF adjacency with router to retrieve LSDB for real-time monitor or future analysis.

Run it

Run it by executing following command. It will load the config file located in ./etc/pyospf.ini and then run pyospf in the front.

$ ./pyospfd

Apart from this, you can also use 'nohup' to run it in daemon.

Retrieving data

using HTTP API

A HTTP server is running within the program. It is listening the TCP port 7000 by default.

Try following APIs to get the OSPF data. (All APIs use HTTP GET method.)

Noted: Use basic auth mode with the authentication data configured in config file when using the API.

Get LSDB

http://<bind_host>:<bind_port>/lsdb

Get LSDB summary

http://<bind_host>:<bind_port>/lsdb_summary

Get LSA by type

http://<bind_host>:<bind_port>/lsdb/router

http://<bind_host>:<bind_port>/lsdb/network

http://<bind_host>:<bind_port>/lsdb/summary

http://<bind_host>:<bind_port>/lsdb/sum-asbr

http://<bind_host>:<bind_port>/lsdb/external

http://<bind_host>:<bind_port>/lsdb/nssa

http://<bind_host>:<bind_port>/lsdb/opaque-9

http://<bind_host>:<bind_port>/lsdb/opaque-10

http://<bind_host>:<bind_port>/lsdb/opaque-11

Get Statistics

http://<bind_host>:<bind_port>/stats

Get probe status

http://<bind_host>:<bind_port>/probe

Store data in database

We plan to implement this in near future.

Thanks

Special thanks to PyRT(Python Routeing Toolkit). Its OSPF PDU parser is used as same as in pyospf.

pyospf's People

Contributors

changhe188 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.