[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / SOCK_Netlink.h
blobc3be221552b91d10d5385a381e47c3dec7066e05
1 // $Id: SOCK_Netlink.h 80826 2008-03-04 14:51:23Z wotte $
2 //=============================================================================
3 /**
4 * @file SOCK_Netlink.h
6 * $Id: SOCK_Netlink.h 80826 2008-03-04 14:51:23Z wotte $
8 * @author Robert Iakobashvilli <coroberti@gmail.com>
9 * @author Raz Ben Yehuda <raziebe@013.net.il>
11 //=============================================================================
13 #ifndef ACE_SOCK_NETLINK_H
14 #define ACE_SOCK_NETLINK_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/config-all.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #ifdef ACE_HAS_NETLINK
26 #include "ace/SOCK.h"
27 #include "ace/Netlink_Addr.h"
28 #include "ace/Addr.h"
30 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
32 /**
33 * @class ACE_SOCK_Netlink
35 * @brief Defines the member functions for the ACE_SOCK Netlink
36 * abstraction.
38 * Netlink sockets are used in Linux as a communication facilty of kernel to user
39 * and user to kernel.
40 * This code was created so one could use ACE reactor
41 * as a gateway to a linux kernel.
44 class ACE_Export ACE_SOCK_Netlink : public ACE_SOCK {
45 public:
46 // = Initialization and termination methods.
47 /// Default constructor.
48 ACE_SOCK_Netlink(void);
49 ~ACE_SOCK_Netlink(void);
50 ACE_SOCK_Netlink (ACE_Netlink_Addr &local,
51 int protocol_family,
52 int protocol);
53 /**
54 * opens a RAW socket over an ACE_SOCK and binds it
56 **/
57 int open (ACE_Netlink_Addr &local,
58 int protocol_family,
59 int protocol);
61 /**
62 * receives abuffer with the size n
64 ssize_t recv (void *buf,
65 size_t n,
66 int flags) const;
67 /**
68 * send a buffer of size n bytes
71 ssize_t send (void *buf,
72 size_t n,
73 int flags) const;
75 /**
76 * Recieves an iovec of size @a n to the netlink socket
78 ssize_t recv (iovec iov[],
79 int n,
80 ACE_Addr &addr,
81 int flags = 0) const;
83 /**
84 * Sends an iovec of size @a n to the netlink socket
86 ssize_t send (const iovec iov[],
87 int n,
88 const ACE_Addr &addr,
89 int flags = 0) const;
91 /// Declare the dynamic allocation hooks.
92 ACE_ALLOC_HOOK_DECLARE;
95 ACE_END_VERSIONED_NAMESPACE_DECL
97 #if defined (__ACE_INLINE__)
98 #include "ace/SOCK_Netlink.inl"
99 #endif /* __ACE_INLINE__ */
101 #endif /* ACE_HAS_NETLINK */
103 #include /**/ "ace/post.h"
105 #endif /* ACE_SOCK_NETLINK_H */