~ubuntu-branches/ubuntu/trusty/libnl3/trusty

« back to all changes in this revision

Viewing changes to lib/route/qdisc/blackhole.c

  • Committer: Bazaar Package Importer
  • Author(s): Heiko Stuebner
  • Date: 2011-05-21 19:25:13 UTC
  • Revision ID: james.westby@ubuntu.com-20110521192513-1ieyu9w9kym4bt16
Tags: upstream-3.0
ImportĀ upstreamĀ versionĀ 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * lib/route/qdisc/blackhole.c  Blackhole Qdisc
 
3
 *
 
4
 *      This library is free software; you can redistribute it and/or
 
5
 *      modify it under the terms of the GNU Lesser General Public
 
6
 *      License as published by the Free Software Foundation version 2.1
 
7
 *      of the License.
 
8
 *
 
9
 * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
 
10
 */
 
11
 
 
12
/**
 
13
 * @ingroup qdisc
 
14
 * @defgroup qdisc_blackhole Blackhole
 
15
 * @{
 
16
 */
 
17
 
 
18
#include <netlink-local.h>
 
19
#include <netlink/netlink.h>
 
20
#include <netlink/route/tc-api.h>
 
21
 
 
22
static struct rtnl_tc_ops blackhole_ops = {
 
23
        .to_kind                = "blackhole",
 
24
        .to_type                = RTNL_TC_TYPE_QDISC,
 
25
};
 
26
 
 
27
static void __init blackhole_init(void)
 
28
{
 
29
        rtnl_tc_register(&blackhole_ops);
 
30
}
 
31
 
 
32
static void __exit blackhole_exit(void)
 
33
{
 
34
        rtnl_tc_unregister(&blackhole_ops);
 
35
}
 
36
 
 
37
/** @} */