summaryrefslogtreecommitdiffstats
path: root/examples/proto/example.uc
blob: 4f46481783d2a7520de748847a13a8c042605787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
netifd.add_proto({
	name: "example",

	config: function(ctx) {
		return {
			server: ctx.uci.get("network", ctx.section, "server"),
		};
	},

	setup: function(proto) {
		proto.update_link(true, { ifname: proto.device });
	},

	teardown: function(proto) {
		proto.update_link(false);
	},
});