-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathin6addr.py
More file actions
56 lines (42 loc) · 1.1 KB
/
Copy pathin6addr.py
File metadata and controls
56 lines (42 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""++
Copyright (c) Microsoft Corporation
Module Name:
in6addr.h
Environment:
user mode or kernel mode
--"""
from . import cpreproc
from .minwindef import BYTE, USHORT, CStructure, Union, POINTER, IArray
if cpreproc.pragma_once("__IN_6_ADDR__"):
# REGION *** Desktop Family or OneCore Family or Games Family ***
class in6_addr(CStructure):
"""
IPv6 Internet address (RFC 2553)
This is an 'on-wire' format structure.
"""
class U(Union):
_fields_ = [
("Byte", BYTE * 16),
("Word", USHORT * 8)
]
_fields_ = [
("u", U)
]
Byte: IArray[int]
Word: IArray[int]
IN6_ADDR = in6_addr
PIN6_ADDR = LPIN6_ADDR = POINTER(IN6_ADDR)
in_addr6 = in6_addr
#
# Defines to match RFC 2553.
#
_S6_un = lambda x: x.u
_S6_u8 = lambda x: x.Byte
s6_addr = lambda x: x._S6_un._S6_u8
#
# Defines for our implementation.
#
s6_bytes = lambda x: x.u.Byte
s6_words = lambda x: x.u.Word
# REGION ***
# __IN_6_ADDR__