xref: /aosp_15_r20/external/webrtc/net/dcsctp/common/internal_types.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 #ifndef NET_DCSCTP_COMMON_INTERNAL_TYPES_H_
11 #define NET_DCSCTP_COMMON_INTERNAL_TYPES_H_
12 
13 #include <functional>
14 #include <utility>
15 
16 #include "net/dcsctp/public/types.h"
17 #include "rtc_base/strong_alias.h"
18 
19 namespace dcsctp {
20 
21 // Stream Sequence Number (SSN)
22 using SSN = webrtc::StrongAlias<class SSNTag, uint16_t>;
23 
24 // Message Identifier (MID)
25 using MID = webrtc::StrongAlias<class MIDTag, uint32_t>;
26 
27 // Fragment Sequence Number (FSN)
28 using FSN = webrtc::StrongAlias<class FSNTag, uint32_t>;
29 
30 // Transmission Sequence Number (TSN)
31 using TSN = webrtc::StrongAlias<class TSNTag, uint32_t>;
32 
33 // Reconfiguration Request Sequence Number
34 using ReconfigRequestSN =
35     webrtc::StrongAlias<class ReconfigRequestSNTag, uint32_t>;
36 
37 // Verification Tag, used for packet validation.
38 using VerificationTag = webrtc::StrongAlias<class VerificationTagTag, uint32_t>;
39 
40 // Tie Tag, used as a nonce when connecting.
41 using TieTag = webrtc::StrongAlias<class TieTagTag, uint64_t>;
42 
43 }  // namespace dcsctp
44 #endif  // NET_DCSCTP_COMMON_INTERNAL_TYPES_H_
45