mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
QUIC: Rename ConnectionIDInfo to Context
Lets just call it what it is given that it contains more than just connection IDs.
This commit is contained in:
parent
fd29b48803
commit
c19e79246f
1 changed files with 9 additions and 10 deletions
|
@ -17,12 +17,8 @@ public function decrypt_crypto_payload(
|
||||||
): bytes &cxxname="QUIC_decrypt_crypto_payload";
|
): bytes &cxxname="QUIC_decrypt_crypto_payload";
|
||||||
|
|
||||||
|
|
||||||
##############
|
|
||||||
## Context - tracked in one connection
|
|
||||||
##############
|
|
||||||
|
|
||||||
# Can we decrypt?
|
# Can we decrypt?
|
||||||
function can_decrypt(long_header: LongHeaderPacket, context: ConnectionIDInfo, crypto: CryptoSinkUnit&): bool {
|
function can_decrypt(long_header: LongHeaderPacket, context: Context, crypto: CryptoSinkUnit&): bool {
|
||||||
|
|
||||||
if ( ! long_header.is_initial )
|
if ( ! long_header.is_initial )
|
||||||
return False;
|
return False;
|
||||||
|
@ -40,7 +36,7 @@ function can_decrypt(long_header: LongHeaderPacket, context: ConnectionIDInfo, c
|
||||||
|
|
||||||
# This unit is connected with the server and client sinks receiving
|
# This unit is connected with the server and client sinks receiving
|
||||||
# CRYPTO frames and forwards data to the SSL handle in the context.
|
# CRYPTO frames and forwards data to the SSL handle in the context.
|
||||||
type CryptoSinkUnit = unit(is_orig: bool, context: ConnectionIDInfo&) {
|
type CryptoSinkUnit = unit(is_orig: bool, context: Context&) {
|
||||||
var buffered: bytes;
|
var buffered: bytes;
|
||||||
var length: uint32 = 0;
|
var length: uint32 = 0;
|
||||||
var is_orig: bool = is_orig;
|
var is_orig: bool = is_orig;
|
||||||
|
@ -104,7 +100,10 @@ type CryptoSinkUnit = unit(is_orig: bool, context: ConnectionIDInfo&) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
type ConnectionIDInfo = struct {
|
##############
|
||||||
|
## Context
|
||||||
|
##############
|
||||||
|
type Context = struct {
|
||||||
client_cid_len: uint8;
|
client_cid_len: uint8;
|
||||||
server_cid_len: uint8;
|
server_cid_len: uint8;
|
||||||
|
|
||||||
|
@ -479,7 +478,7 @@ public type ShortPacketPayload = unit {
|
||||||
#
|
#
|
||||||
# A UDP datagram contains one or more QUIC packets.
|
# A UDP datagram contains one or more QUIC packets.
|
||||||
##############
|
##############
|
||||||
type Packet = unit(from_client: bool, context: ConnectionIDInfo&) {
|
type Packet = unit(from_client: bool, context: Context&) {
|
||||||
var decrypted_data: bytes;
|
var decrypted_data: bytes;
|
||||||
var packet_size: uint64 = 0;
|
var packet_size: uint64 = 0;
|
||||||
var start: iterator<stream>;
|
var start: iterator<stream>;
|
||||||
|
@ -622,11 +621,11 @@ type Packet = unit(from_client: bool, context: ConnectionIDInfo&) {
|
||||||
# Entrypoints
|
# Entrypoints
|
||||||
##############
|
##############
|
||||||
public type RequestFrame = unit {
|
public type RequestFrame = unit {
|
||||||
%context = ConnectionIDInfo;
|
%context = Context;
|
||||||
: Packet(True, self.context())[];
|
: Packet(True, self.context())[];
|
||||||
};
|
};
|
||||||
|
|
||||||
public type ResponseFrame = unit {
|
public type ResponseFrame = unit {
|
||||||
%context = ConnectionIDInfo;
|
%context = Context;
|
||||||
: Packet(False, self.context())[];
|
: Packet(False, self.context())[];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue