All Projects → fearful-symmetry → garlic

fearful-symmetry / garlic

Licence: GPL-3.0 license
GArLIC: GolAng LInux Connector: A Proc Connector library for go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to garlic

netlink-examples
Linux kernel Netlink examples inspired by "Why and How to Use Netlink Socket"
Stars: ✭ 28 (+33.33%)
Mutual labels:  netlink
wgnlpy
WireGuard + Netlink + Python
Stars: ✭ 38 (+80.95%)
Mutual labels:  netlink
ethtool
Package ethtool allows control of the Linux ethtool generic netlink interface. MIT Licensed.
Stars: ✭ 47 (+123.81%)
Mutual labels:  netlink
wgctl
Utility to configure and manage your WireGuard tunnels
Stars: ✭ 59 (+180.95%)
Mutual labels:  netlink
connect
tiny cross-platform socket API library
Stars: ✭ 46 (+119.05%)
Mutual labels:  netlink
libipvs
Pure Go lib to work with IPVS using generic netlink socket
Stars: ✭ 41 (+95.24%)
Mutual labels:  netlink
netfilter
Pure-Go Netfilter Netlink family implementation.
Stars: ✭ 51 (+142.86%)
Mutual labels:  netlink
tentacool
REST API to manage Linux networking via netlink
Stars: ✭ 63 (+200%)
Mutual labels:  netlink
basebox
A tiny OpenFlow controller for OF-DPA switches.
Stars: ✭ 39 (+85.71%)
Mutual labels:  netlink
Keepalived
Keepalived
Stars: ✭ 2,877 (+13600%)
Mutual labels:  netlink
OpenNetLink
Development of NetLink for open OS based on cross platform.
Stars: ✭ 17 (-19.05%)
Mutual labels:  netlink

GArLIC: GolAng LInux Connector

GARLIC is a simple proc connector interface for golang.

It's dead simple, and built on top of @mdlayher's gloang netlink library

The Proc Connector interface is mildly obscure, and you can read more here

Go Report Card CircleCI GoDoc

Tutorial

//Open a connection to the local Proc connector instance
//This requires root.
cn, err := DialPCN()
	if err != nil {
		log.Fatalf("%s", err)
	}

//Read in events
for {
    data, err := cn.ReadPCN()

	if err != nil {
		log.Errorf("Read fail: %s", err)
    }
	fmt.Printf("%#v\n", data)
}

//You can also filter by a list of events
cn, err := DialPCNWithEvents([]EventType{ProcEventGID, ProcEventExit})
	if err != nil {
		log.Fatalf("%s", err)
	}

Why?

Because it's fun. Also, garlic is my favorite seasoning.

What's next?

  • A CLI implementation is in the works.
  • Find a non-root way to run the tests.
  • Start looking at perf data
  • add new interfaces
  • Expand tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].