Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PKUFlyingPig/CS144-Computer-Network
/ functions
Functions
633 in github.com/PKUFlyingPig/CS144-Computer-Network
⨍
Functions
633
◇
Types & classes
190
↓ 1,668 callers
Method
execute
tests/sender_harness.hh:173
↓ 113 callers
Method
size
libsponge/util/buffer.cc:43
↓ 103 callers
Method
value
libsponge/util/util.cc:100
↓ 84 callers
Method
str
\name Expose contents as a std::string_view @{
libsponge/util/buffer.hh:27
↓ 75 callers
Method
what
Returns a C string describing the error
libsponge/util/util.hh:29
↓ 54 callers
Method
serialize
Serialize the TCPHeader to a string (does not recompute the checksum)
libsponge/tcp_helpers/tcp_header.cc:51
↓ 49 callers
Function
to_string
tests/string_conversions.hh:15
↓ 39 callers
Method
parse
\param[in,out] p is a NetParser from which the TCP fields will be extracted \returns a ParseResult indicating success or the reason for failure \detai
libsponge/tcp_helpers/tcp_header.cc:17
↓ 34 callers
Method
empty
libsponge/stream_reassembler.cc:95
↓ 29 callers
Function
get_random_generator
\details A properly seeded mt19937 generator takes a lot of entropy! This code borrows from the following: - https://kristerw.blogspot.com/2017/05/s
libsponge/util/util.cc:64
↓ 29 callers
Function
make_frame
tests/net_interface.cc:45
↓ 26 callers
Function
SystemCall
\param[in] attempt is the name of the syscall to try (for error reporting) \param[in] return_value is the return value of the syscall \param[in] errno
libsponge/util/util.cc:42
↓ 25 callers
Method
frames_out
apps/lab7.cc:118
↓ 24 callers
Method
at
\brief Get character at location `n`
libsponge/util/buffer.hh:38
↓ 23 callers
Method
send_ack
\param[in] seqno is the sequence number of the segment \param[in] ackno is the acknowledgment number of the segment \param[in] swin is the optional wi
tests/tcp_fsm_test_harness.cc:87
↓ 22 callers
Method
ipv4_numeric
libsponge/util/address.cc:108
↓ 22 callers
Method
raw_value
libsponge/wrapping_integers.hh:17
↓ 19 callers
Method
concatenate
libsponge/util/buffer.cc:34
↓ 19 callers
Method
summary
libsponge/tcp_helpers/tcp_header.cc:96
↓ 18 callers
Method
expect_seg
tests/tcp_fsm_test_harness.cc:167
↓ 18 callers
Function
make_arp
tests/net_interface.cc:31
↓ 17 callers
Method
buffer_size
libsponge/byte_stream.cc:73
↓ 17 callers
Function
check_segment
tests/fsm_retx.hh:15
↓ 17 callers
Method
eof
libsponge/byte_stream.cc:77
↓ 17 callers
Function
unwrap
Transform a WrappingInt32 into an "absolute" 64-bit sequence number (zero-indexed) \param n The relative sequence number \param isn The initial sequen
libsponge/wrapping_integers.cc:29
↓ 16 callers
Method
append
libsponge/util/buffer.cc:15
↓ 15 callers
Method
add_route
\param[in] route_prefix The "up-to-32-bit" IPv4 address prefix to match the datagram's destination address against \param[in] prefix_length For this r
libsponge/router.cc:26
↓ 15 callers
Method
u16
libsponge/util/parser.cc:64
↓ 15 callers
Method
u8
libsponge/util/parser.cc:66
↓ 14 callers
Method
bytes_written
libsponge/byte_stream.cc:79
↓ 14 callers
Function
make_datagram
tests/net_interface.cc:22
↓ 13 callers
Function
random_private_ethernet_address
tests/net_interface.cc:11
↓ 13 callers
Function
to_string
\returns A string with a textual representation of an Ethernet address
libsponge/tcp_helpers/ethernet_header.cc:52
↓ 12 callers
Method
add_rule
\param[in] fd is the FileDescriptor to be polled \param[in] direction indicates whether to poll for reading (Direction::In) or writing (Direction::Out
libsponge/util/eventloop.cc:23
↓ 12 callers
Method
end_input
libsponge/byte_stream.cc:69
↓ 12 callers
Method
port
Numeric port (host byte order).
libsponge/util/address.hh:53
↓ 12 callers
Method
push_substring
\details This function accepts a substring (aka a segment) of bytes, possibly out-of-order, from the logical stream, and assembles any newly contiguou
libsponge/stream_reassembler.cc:48
↓ 11 callers
Method
add_interface
Add an interface to the router \param[in] interface an already-constructed network interface \returns The index of the interface after it has been add
libsponge/router.hh:69
↓ 11 callers
Method
error
Returns `true` if there has been an error
libsponge/util/parser.hh:50
↓ 11 callers
Method
execute
tests/tcp_fsm_test_harness.cc:144
↓ 11 callers
Function
hexdump
\param[in] data is a pointer to the bytes to show \param[in] len is the number of bytes to show \param[in] indent is the number of spaces to indent
libsponge/util/util.cc:113
↓ 10 callers
Function
as_string
tests/string_conversions.hh:27
↓ 10 callers
Method
ip
Dotted-quad IP address string ("18.243.0.1").
libsponge/util/address.hh:51
↓ 10 callers
Method
send_fin
\param[in] seqno is the sequence number of the segment \param[in] ackno is the optional acknowledgment number of the segment; if no value, ACK flag is
tests/tcp_fsm_test_harness.cc:75
↓ 10 callers
Method
send_to
apps/network_simulator.cc:106
↓ 10 callers
Method
simulate
apps/network_simulator.cc:249
↓ 10 callers
Method
u32
libsponge/util/parser.cc:62
↓ 9 callers
Function
ack_listen_test
in LISTEN, send ACK
tests/fsm_ack_rst_relaxed.cc:16
↓ 9 callers
Function
ip
apps/network_simulator.cc:36
↓ 9 callers
Method
length_in_sequence_space
libsponge/tcp_helpers/tcp_segment.cc:25
↓ 9 callers
Method
to_string
tests/tcp_expectation.hh:24
↓ 8 callers
Method
bytes_in_flight
libsponge/tcp_sender.cc:28
↓ 8 callers
Method
can_read
\returns `true` if there is a packet available for reading from TestRFD
tests/tcp_fsm_test_harness.cc:40
↓ 8 callers
Method
expect
apps/network_simulator.cc:126
↓ 8 callers
Method
fill_window
libsponge/tcp_sender.cc:30
↓ 8 callers
Method
name
libsponge/tcp_helpers/tcp_state.cc:12
↓ 8 callers
Method
state
< \brief summarize the state of the sender, receiver, and the connection
libsponge/tcp_connection.hh:75
↓ 8 callers
Method
to_string
libsponge/util/address.cc:103
↓ 8 callers
Function
wrap
Transform an "absolute" 64-bit sequence number (zero-indexed) into a WrappingInt32 \param n The input absolute 64-bit sequence number \param isn The i
libsponge/wrapping_integers.cc:17
↓ 8 callers
Method
write
apps/lab7.cc:109
↓ 7 callers
Method
add
libsponge/util/util.cc:89
↓ 7 callers
Method
buffer
libsponge/util/parser.hh:40
↓ 7 callers
Method
buffer_empty
libsponge/byte_stream.cc:75
↓ 7 callers
Function
check_argc
apps/tcp_ipv4.cc:48
↓ 7 callers
Function
check_roundtrip
tests/wrapping_integers_roundtrip.cc:11
↓ 7 callers
Method
connect
apps/lab7.cc:132
↓ 7 callers
Method
get_error
Get the current value stored in BaseParser::_error
libsponge/util/parser.hh:43
↓ 7 callers
Method
pseudo_cksum
\details This value is needed when computing the checksum of an encapsulated TCP segment. ~~~{.txt} 0 7 8 15 16 23 24 31 +--------+----
libsponge/tcp_helpers/ipv4_header.cc:125
↓ 7 callers
Function
random_router_ethernet_address
apps/network_simulator.cc:24
↓ 7 callers
Method
read
apps/lab7.cc:90
↓ 7 callers
Method
send_byte
\param[in] seqno is the sequence number of the segment \param[in] ackno is the optional acknowledgment number of the segment; if no value, ACK flag is
tests/tcp_fsm_test_harness.cc:120
↓ 6 callers
Method
ackno
libsponge/tcp_receiver.cc:52
↓ 6 callers
Method
active
libsponge/tcp_connection.cc:77
↓ 6 callers
Function
check_argc
apps/tcp_ip_ethernet.cc:44
↓ 6 callers
Method
eof
EOF flag state
libsponge/util/file_descriptor.hh:89
↓ 6 callers
Method
read
Read (i.e., copy and then pop) the next "len" bytes of the stream \param[in] len bytes will be popped and returned \returns a string
libsponge/byte_stream.cc:55
↓ 6 callers
Method
read
\returns a vector of bytes received on the TestRFD
tests/tcp_fsm_test_harness.cc:46
↓ 6 callers
Method
recv_frame
\param[in] frame the incoming Ethernet frame
libsponge/network_interface.cc:157
↓ 6 callers
Method
remaining_capacity
libsponge/byte_stream.cc:83
↓ 6 callers
Method
send_datagram
\param[in] dgram the IPv4 datagram to be sent \param[in] next_hop the IP address of the interface to send it to (typically a router or default gateway
libsponge/network_interface.cc:145
↓ 6 callers
Method
send_rst
\param[in] seqno is the sequence number of the segment \param[in] ackno is the optional acknowledgment number of the segment; if no value, ACK flag is
tests/tcp_fsm_test_harness.cc:97
↓ 6 callers
Method
send_syn
\param[in] seqno is the sequence number of the segment \param[in] ackno is the optional acknowledgment number of the segment; if no value, ACK flag is
tests/tcp_fsm_test_harness.cc:108
↓ 6 callers
Method
sendto
libsponge/util/socket.cc:134
↓ 6 callers
Method
set_error
\brief Set BaseParser::_error \param[in] res is the value to store in BaseParser::_error
libsponge/util/parser.hh:47
↓ 6 callers
Method
to_string
\returns A string with the header's contents
libsponge/tcp_helpers/tcp_header.cc:81
↓ 6 callers
Method
unassembled_bytes
libsponge/tcp_connection.cc:19
↓ 5 callers
Function
bidirectional_stream_copy
apps/bidirectional_stream_copy.cc:12
↓ 5 callers
Function
clear
apps/network_simulator.cc:39
↓ 5 callers
Function
compare_tcp_headers_nolen
tests/test_utils.hh:32
↓ 5 callers
Method
end_input_stream
libsponge/tcp_connection.cc:105
↓ 5 callers
Function
read
tests/fsm_stream_reassembler_many.cc:21
↓ 5 callers
Method
segment_received
libsponge/tcp_receiver.cc:15
↓ 5 callers
Function
show_usage
apps/tcp_ipv4.cc:19
↓ 5 callers
Method
wait_until_closed
libsponge/tcp_helpers/tcp_sponge_socket.cc:194
↓ 5 callers
Method
write
libsponge/byte_stream.cc:20
↓ 4 callers
Function
check_argc
apps/tcp_udp.cc:42
↓ 4 callers
Function
inet_cksum
tests/ipv4_parser.cc:22
↓ 4 callers
Method
input_ended
libsponge/byte_stream.cc:71
↓ 4 callers
Method
next_seqno_absolute
\brief absolute seqno for the next byte to be sent
libsponge/tcp_sender.hh:102
↓ 4 callers
Method
peek_output
\param[in] len bytes will be copied from the output side of the buffer
libsponge/byte_stream.cc:31
next →
1–100 of 633, ranked by callers