Skip to contentSkip to conversation

Create bridge using rtnetlink

Bridge Milos Gajdos 1 participant 1 message May 27, 2014 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

Guys,
I've been thinking about this past few days and thought I'd ask here.
Is it possible to create bridge device using rtnetlink interface ?
I've tried to go through iproute package source but got a bit overwhelmed and confused. Could someone give me a hint how to go about it ?
I had a look at bridge utils source but that one literally uses direct syscalls. What I'm after is rtnetlink thingy which would correspond to:

ip link add name mybridge type bridge

Any advice/hints would be very appreciated!
thanks