File tree Expand file tree Collapse file tree 2 files changed +34
-30
lines changed Expand file tree Collapse file tree 2 files changed +34
-30
lines changed Original file line number Diff line number Diff line change @@ -288,36 +288,6 @@ if_indextoname(index) -- return the corresponding interface name\n\
288
288
#include <net/if.h>
289
289
#endif
290
290
291
- #ifdef HAVE_SOCKADDR_ALG
292
- #include <linux/if_alg.h>
293
- #ifndef AF_ALG
294
- #define AF_ALG 38
295
- #endif
296
- #ifndef SOL_ALG
297
- #define SOL_ALG 279
298
- #endif
299
-
300
- /* Linux 3.19 */
301
- #ifndef ALG_SET_AEAD_ASSOCLEN
302
- #define ALG_SET_AEAD_ASSOCLEN 4
303
- #endif
304
- #ifndef ALG_SET_AEAD_AUTHSIZE
305
- #define ALG_SET_AEAD_AUTHSIZE 5
306
- #endif
307
- /* Linux 4.8 */
308
- #ifndef ALG_SET_PUBKEY
309
- #define ALG_SET_PUBKEY 6
310
- #endif
311
-
312
- #ifndef ALG_OP_SIGN
313
- #define ALG_OP_SIGN 2
314
- #endif
315
- #ifndef ALG_OP_VERIFY
316
- #define ALG_OP_VERIFY 3
317
- #endif
318
-
319
- #endif /* HAVE_SOCKADDR_ALG */
320
-
321
291
/* Generic socket object definitions and includes */
322
292
#define PySocket_BUILDING_SOCKET
323
293
#include "socketmodule.h"
Original file line number Diff line number Diff line change @@ -98,6 +98,37 @@ typedef int socklen_t;
98
98
#include <sys/kern_control.h>
99
99
#endif
100
100
101
+ #ifdef HAVE_SOCKADDR_ALG
102
+ #include <linux/if_alg.h>
103
+ #ifndef AF_ALG
104
+ #define AF_ALG 38
105
+ #endif
106
+ #ifndef SOL_ALG
107
+ #define SOL_ALG 279
108
+ #endif
109
+
110
+ /* Linux 3.19 */
111
+ #ifndef ALG_SET_AEAD_ASSOCLEN
112
+ #define ALG_SET_AEAD_ASSOCLEN 4
113
+ #endif
114
+ #ifndef ALG_SET_AEAD_AUTHSIZE
115
+ #define ALG_SET_AEAD_AUTHSIZE 5
116
+ #endif
117
+ /* Linux 4.8 */
118
+ #ifndef ALG_SET_PUBKEY
119
+ #define ALG_SET_PUBKEY 6
120
+ #endif
121
+
122
+ #ifndef ALG_OP_SIGN
123
+ #define ALG_OP_SIGN 2
124
+ #endif
125
+ #ifndef ALG_OP_VERIFY
126
+ #define ALG_OP_VERIFY 3
127
+ #endif
128
+
129
+ #endif /* HAVE_SOCKADDR_ALG */
130
+
131
+
101
132
#ifndef Py__SOCKET_H
102
133
#define Py__SOCKET_H
103
134
#ifdef __cplusplus
@@ -159,6 +190,9 @@ typedef union sock_addr {
159
190
#ifdef HAVE_SYS_KERN_CONTROL_H
160
191
struct sockaddr_ctl ctl ;
161
192
#endif
193
+ #ifdef HAVE_SOCKADDR_ALG
194
+ struct sockaddr_alg alg ;
195
+ #endif
162
196
} sock_addr_t ;
163
197
164
198
/* The object holding a socket. It holds some extra information,
You can’t perform that action at this time.
0 commit comments