{"id":22480176,"url":"https://github.com/netrack/openflow","last_synced_at":"2026-02-23T22:15:51.869Z","repository":{"id":25766818,"uuid":"29205011","full_name":"netrack/openflow","owner":"netrack","description":"The OpenFlow middleware library","archived":false,"fork":false,"pushed_at":"2019-03-19T11:35:29.000Z","size":389,"stargazers_count":87,"open_issues_count":3,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-06-18T23:06:29.850Z","etag":null,"topics":["go","networking","nfv","openflow","sdn"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netrack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-13T18:44:34.000Z","updated_at":"2024-05-30T21:41:08.000Z","dependencies_parsed_at":"2022-08-24T14:14:09.784Z","dependency_job_id":null,"html_url":"https://github.com/netrack/openflow","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netrack%2Fopenflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netrack%2Fopenflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netrack%2Fopenflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netrack%2Fopenflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netrack","download_url":"https://codeload.github.com/netrack/openflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228483524,"owners_count":17927363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","networking","nfv","openflow","sdn"],"created_at":"2024-12-06T15:19:58.679Z","updated_at":"2026-02-23T22:15:46.817Z","avatar_url":"https://github.com/netrack.png","language":"Go","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# openflow - The OpenFlow protocol library\n\n[![Build Status][BuildStatus]](https://travis-ci.org/netrack/openflow)\n[![Documentation][Documentation]](https://godoc.org/github.com/netrack/openflow)\n\nThe openflow library is a pure Go implementation of the OpenFlow protocol.\nThe ideas of the programming interface mostly borrowed from the Go standard\nHTTP library.\n\n# Installation\n\n```bash\n$ go get github.com/netrack/openflow\n```\n\n# Usage\n\nThe usage is pretty similar to the handling HTTP request, but instead of routes\nwe are using message types.\n\n```go\npackage main\n\nimport (\n    of \"github.com/netrack/openflow\"\n)\n\nfunc main() {\n    // Define the OpenFlow handler for hello messages.\n    of.HandleFunc(of.TypeHello, func(rw of.ResponseWriter, r *of.Request) {\n        // Send back hello response.\n        rw.Write(\u0026of.Header{Type: of.TypeHello}, nil)\n    })\n\n    // Start the TCP server on 6633 port.\n    of.ListenAndServe(\":6633\", nil)\n}\n```\n\n```go\npackage main\n\nimport (\n    \"github.com/netrack/openflow/ofp\"\n    of \"github.com/netrack/openflow\"\n)\n\nfunc main() {\n    pattern := of.TypeMatcher(of.TypePacketIn)\n\n    mux := of.NewServeMux()\n    mux.HandleFunc(pattern, func(rw of.ResponseWriter, r *of.Request) {\n        var packet ofp.PacketIn\n        packet.ReadFrom(r.Body)\n\n        apply := \u0026ofp.InstructionApplyActions{\n            ofp.Actions{\u0026ofp.ActionOutput{ofp.PortFlood, 0}},\n        }\n\n        // For each incoming packet-in request, create a\n        // respective flow modification command.\n        fmod := ofp.NewFlowMod(ofp.FlowAdd, packet)\n        fmod.Instructions = ofp.Instructions{apply}\n\n        rw.Write(\u0026of.Header{Type: of.TypeFlowMod}, fmod)\n    })\n\n    of.ListenAndServe(\":6633\", mux)\n}\n```\n\n# License\n\nThe openflow library is distributed under MIT license, therefore you are free\nto do with code whatever you want. See the [LICENSE](LICENSE) file for full\nlicense text.\n\n\n[BuildStatus]:   https://travis-ci.org/netrack/openflow.svg?branch=master\n[Documentation]: https://godoc.org/github.com/netrack/openflow?status.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetrack%2Fopenflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetrack%2Fopenflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetrack%2Fopenflow/lists"}