This repository was archived by the owner on Aug 1, 2024. It is now read-only.
File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -354,8 +354,9 @@ type PFCPSessionEstablishmentResponse struct {
354
354
}
355
355
356
356
type CreatedPDR struct {
357
- PDRID * pfcpType.PacketDetectionRuleID `tlv:"56"`
358
- LocalFTEID * pfcpType.FTEID `tlv:"21"`
357
+ PDRID * pfcpType.PacketDetectionRuleID `tlv:"56"`
358
+ LocalFTEID * pfcpType.FTEID `tlv:"21"`
359
+ UEIPAddress * pfcpType.UEIPAddress `tlv:"93"`
359
360
}
360
361
361
362
type LoadControlInformation struct {
Original file line number Diff line number Diff line change @@ -11,18 +11,22 @@ import (
11
11
)
12
12
13
13
type UEIPAddress struct {
14
- Ipv6d bool
15
- Sd bool
16
- V4 bool
17
- V6 bool
14
+ Ipv6d bool //bit 4
15
+ Sd bool //bit 3
16
+ V4 bool //bit 2
17
+ V6 bool //bit 1
18
+ CHV4 bool //bit 5
19
+ CHV6 bool //bit 6
18
20
Ipv4Address net.IP
19
21
Ipv6Address net.IP
20
22
Ipv6PrefixDelegationBits uint8
21
23
}
22
24
23
25
func (u * UEIPAddress ) MarshalBinary () (data []byte , err error ) {
24
26
// Octet 5
25
- tmpUint8 := btou (u .Ipv6d )<< 3 |
27
+ tmpUint8 := btou (u .CHV6 )<< 5 |
28
+ btou (u .CHV4 )<< 4 |
29
+ btou (u .Ipv6d )<< 3 |
26
30
btou (u .Sd )<< 2 |
27
31
btou (u .V4 )<< 1 |
28
32
btou (u .V6 )
@@ -60,6 +64,9 @@ func (u *UEIPAddress) UnmarshalBinary(data []byte) error {
60
64
if length < idx + 1 {
61
65
return fmt .Errorf ("Inadequate TLV length: %d" , length )
62
66
}
67
+
68
+ u .CHV6 = utob (uint8 (data [idx ]) & BitMask6 )
69
+ u .CHV4 = utob (uint8 (data [idx ]) & BitMask5 )
63
70
u .Ipv6d = utob (uint8 (data [idx ]) & BitMask4 )
64
71
u .Sd = utob (uint8 (data [idx ]) & BitMask3 )
65
72
u .V4 = utob (uint8 (data [idx ]) & BitMask2 )
You can’t perform that action at this time.
0 commit comments