summaryrefslogtreecommitdiff
path: root/ACE/ace/Netlink_Addr.inl
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 14:51:23 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 14:51:23 +0000
commit99aa8c60282c7b8072eb35eb9ac815702f5bf586 (patch)
treebda96bf8c3a4c2875a083d7b16720533c8ffeaf4 /ACE/ace/Netlink_Addr.inl
parentc4078c377d74290ebe4e66da0b4975da91732376 (diff)
downloadATCD-99aa8c60282c7b8072eb35eb9ac815702f5bf586.tar.gz
undoing accidental deletion
Diffstat (limited to 'ACE/ace/Netlink_Addr.inl')
-rw-r--r--ACE/ace/Netlink_Addr.inl51
1 files changed, 51 insertions, 0 deletions
diff --git a/ACE/ace/Netlink_Addr.inl b/ACE/ace/Netlink_Addr.inl
new file mode 100644
index 00000000000..5b47a0c053f
--- /dev/null
+++ b/ACE/ace/Netlink_Addr.inl
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+// $Id$
+
+#ifdef ACE_HAS_NETLINK
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+ACE_INLINE ACE_Netlink_Addr::~ACE_Netlink_Addr (void){}
+
+ACE_INLINE ACE_Netlink_Addr::ACE_Netlink_Addr (void):
+ACE_Addr (this->determine_type(), sizeof (sockaddr_nl))
+{
+ this->nl_.nl_family = AF_NETLINK;
+}
+
+ACE_INLINE void ACE_Netlink_Addr::set(int pid, int gid)
+{
+ this->nl_.nl_pid = pid;
+ this->nl_.nl_groups = gid;
+}
+
+ACE_INLINE void ACE_Netlink_Addr::reset (void)
+{
+ ACE_OS::memset (&this->nl_, 0, sizeof (this->nl_));
+ this->nl_.nl_family = AF_NETLINK;
+}
+
+ACE_INLINE int ACE_Netlink_Addr::determine_type (void) const
+{
+ return AF_NETLINK;
+}
+
+ACE_INLINE void *ACE_Netlink_Addr::get_addr (void) const
+{
+ return (void*)&(this->nl_);
+}
+
+ACE_INLINE int ACE_Netlink_Addr::get_addr_size (void) const
+{
+ return sizeof(this->nl_);
+}
+
+
+ACE_INLINE void ACE_Netlink_Addr::set_addr (void *addr, int len){
+ ACE_OS::memcpy (&this->nl_,addr,len);
+}
+
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+#endif /* ACE_HAS_NETLINK */
+