~ubuntu-branches/ubuntu/trusty/keepalived/trusty

« back to all changes in this revision

Viewing changes to keepalived/include/vrrp_if.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-05-12 20:26:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090512202615-k850bw35qpuvpq4p
Tags: 1.1.17-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/rules: DEB_UPDATE_RCD_PARAMS := expicit init start/stop
    parameters (don't stop at 0 and 6)
  - debian/init.d: init script header adapted to stop rule
  - debian/keepalived.postinst: Remove shutdown and reboot links

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * Part:        vrrp_if.c include file.
7
7
 *
8
 
 * Version:     $Id: vrrp_if.h,v 1.1.15 2007/09/15 04:07:41 acassen Exp $
 
8
 * Version:     $Id: vrrp_if.h,v 1.1.17 2009/03/05 01:31:12 acassen Exp $
9
9
 *
10
10
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
11
11
 *
19
19
 *              as published by the Free Software Foundation; either version
20
20
 *              2 of the License, or (at your option) any later version.
21
21
 *
22
 
 * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
22
 * Copyright (C) 2001-2009 Alexandre Cassen, <acassen@freebox.fr>
23
23
 */
24
24
 
25
25
#ifndef _VRRP_IF_H
28
28
/* global includes */
29
29
#include <net/if.h>
30
30
 
 
31
/* needed to get correct values for SIOC* */
 
32
#include <linux/sockios.h>
 
33
 
31
34
/* local includes */
32
35
#include "scheduler.h"
33
36
#include "list.h"
34
37
 
35
38
/* types definition */
36
39
#ifndef SIOCETHTOOL
 
40
/* should not happen, otherwise we have a broken toolchain */
 
41
#warning "SIOCETHTOOL not defined. Defaulting to 0x8946, which is probably wrong !"
37
42
#define SIOCETHTOOL     0x8946
38
43
#endif
39
44
#ifndef SIOCGMIIPHY
 
45
/* should not happen, otherwise we have a broken toolchain */
 
46
#warning "SIOCGMIIPHY not defined. Defaulting to SIOCDEVPRIVATE, which is probably wrong !"
40
47
#define SIOCGMIIPHY (SIOCDEVPRIVATE)    /* Get the PHY in use. */
41
 
#define SIOCGMIIREG (SIOCDEVPRIVATE+1)  /* Read a PHY register. */
42
 
#define SIOCSMIIREG (SIOCDEVPRIVATE+2)  /* Write a PHY register. */
43
 
#define SIOCGPARAMS (SIOCDEVPRIVATE+3)  /* Read operational parameters. */
44
 
#define SIOCSPARAMS (SIOCDEVPRIVATE+4)  /* Set operational parameters. */
 
48
#define SIOCGMIIREG (SIOCGMIIPHY+1)     /* Read a PHY register. */
 
49
#endif
 
50
 
 
51
/* ethtool.h cannot be included because old versions use kernel-only types
 
52
 * which cannot be included from user-land. We don't need much anyway.
 
53
 */
 
54
#ifndef ETHTOOL_GLINK
 
55
#define ETHTOOL_GLINK   0x0000000a
 
56
/* for passing single values */
 
57
struct ethtool_value {
 
58
        uint32_t   cmd;
 
59
        uint32_t   data;
 
60
};
45
61
#endif
46
62
#define LINK_UP   1
47
63
#define LINK_DOWN 0