summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetutils.h
Unidiff
Diffstat (limited to 'libopie2/opienet/onetutils.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/onetutils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie2/opienet/onetutils.h b/libopie2/opienet/onetutils.h
index 6640515..8be042b 100644
--- a/libopie2/opienet/onetutils.h
+++ b/libopie2/opienet/onetutils.h
@@ -77,52 +77,56 @@ bool operator==( const OMacAddress &m1, const OMacAddress &m2 );
77 77
78class OHostAddress : public QHostAddress 78class OHostAddress : public QHostAddress
79{ 79{
80 public: 80 public:
81 OHostAddress(); 81 OHostAddress();
82 ~OHostAddress(); 82 ~OHostAddress();
83}; 83};
84 84
85 85
86/*====================================================================================== 86/*======================================================================================
87 * OPrivateIOCTL 87 * OPrivateIOCTL
88 *======================================================================================*/ 88 *======================================================================================*/
89 89
90class OPrivateIOCTL : public QObject 90class OPrivateIOCTL : public QObject
91{ 91{
92 public: 92 public:
93 OPrivateIOCTL( QObject* parent, const char* name, int cmd, int getargs, int setargs ); 93 OPrivateIOCTL( QObject* parent, const char* name, int cmd, int getargs, int setargs );
94 ~OPrivateIOCTL(); 94 ~OPrivateIOCTL();
95 95
96 int numberGetArgs() const; 96 int numberGetArgs() const;
97 int typeGetArgs() const; 97 int typeGetArgs() const;
98 int numberSetArgs() const; 98 int numberSetArgs() const;
99 int typeSetArgs() const; 99 int typeSetArgs() const;
100 100
101 void invoke() const;
102 void setParameter( int, u_int32_t );
103
101 private: 104 private:
102 u_int32_t _ioctl; 105 u_int32_t _ioctl;
103 u_int16_t _getargs; 106 u_int16_t _getargs;
104 u_int16_t _setargs; 107 u_int16_t _setargs;
108
105}; 109};
106 110
107 /*====================================================================================== 111 /*======================================================================================
108 * Miscellaneous 112 * Miscellaneous
109 *======================================================================================*/ 113 *======================================================================================*/
110 114
111/* dump bytes */ 115/* dump bytes */
112 116
113void dumpBytes( const unsigned char* data, int num ); 117void dumpBytes( const unsigned char* data, int num );
114 118
115/* Network to host order macros */ 119/* Network to host order macros */
116 120
117#ifdef LBL_ALIGN 121#ifdef LBL_ALIGN
118#define EXTRACT_16BITS(p) \ 122#define EXTRACT_16BITS(p) \
119 ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \ 123 ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \
120 (u_int16_t)*((const u_int8_t *)(p) + 1))) 124 (u_int16_t)*((const u_int8_t *)(p) + 1)))
121#define EXTRACT_32BITS(p) \ 125#define EXTRACT_32BITS(p) \
122 ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 24 | \ 126 ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 24 | \
123 (u_int32_t)*((const u_int8_t *)(p) + 1) << 16 | \ 127 (u_int32_t)*((const u_int8_t *)(p) + 1) << 16 | \
124 (u_int32_t)*((const u_int8_t *)(p) + 2) << 8 | \ 128 (u_int32_t)*((const u_int8_t *)(p) + 2) << 8 | \
125 (u_int32_t)*((const u_int8_t *)(p) + 3))) 129 (u_int32_t)*((const u_int8_t *)(p) + 3)))
126#else 130#else
127#define EXTRACT_16BITS(p) \ 131#define EXTRACT_16BITS(p) \
128 ((u_int16_t)ntohs(*(const u_int16_t *)(p))) 132 ((u_int16_t)ntohs(*(const u_int16_t *)(p)))