OpenSDN source code
linux_port.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef vnsw_agent_ksync_linux_port_h
7 #define vnsw_agent_ksync_linux_port_h
8 
9 /**************************************************************************
10  * Implements KSyncVxlanPortObject for Linux
11  **************************************************************************/
13 public:
15  virtual ~KSyncLinuxPortObject() { }
16 
17  // Allocates an entry of type KSyncLinuxPortEntry from DBEntry of type
18  // Interface
19  virtual KSyncEntry *DBToKSyncEntry(const DBEntry *e);
20 
21  // Allocate and initialize an entry of type KSyncLinuxPortEntry
22  virtual KSyncEntry *Alloc(const KSyncEntry *entry, uint32_t index);
23 
24 private:
26 };
27 
28 /**************************************************************************
29  * Implements KSyncVxlanPortEntry for Linux
30  **************************************************************************/
32 public:
33  KSyncLinuxPortEntry(KSyncLinuxPortObject *obj, const Interface *intrface);
35  const KSyncLinuxPortEntry *entry);
36  virtual ~KSyncLinuxPortEntry() { }
37 
38  // Adds port to the bridge
39  bool Add();
40  // Handle change to the port. If there is change in bridge, removes port
41  // from old bridge and adds to new bridge
42  bool Change();
43  // Deletes port from the bridge
44  bool Delete();
45 private:
48 };
49 #endif // vnsw_agent_ksync_linux_port_h
virtual ~KSyncLinuxPortEntry()
Definition: linux_port.h:36
const KSyncLinuxBridgeEntry * old_bridge_
Definition: linux_port.h:46
DISALLOW_COPY_AND_ASSIGN(KSyncLinuxPortEntry)
KSyncLinuxPortEntry(KSyncLinuxPortObject *obj, const Interface *intrface)
Definition: linux_vxlan.cc:142
virtual ~KSyncLinuxPortObject()
Definition: linux_port.h:15
KSyncLinuxPortObject(KSyncLinuxVxlan *ksync)
Definition: linux_vxlan.cc:192
DISALLOW_COPY_AND_ASSIGN(KSyncLinuxPortObject)
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *e)
Definition: linux_vxlan.cc:203
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
Definition: linux_vxlan.cc:196
KSyncVxlan * ksync() const