private void StartPassing(uint id, byte protocol, ushort pass_length, uint fragment_offset, ushort pseudoheader_checksum, ulong dst_addr_0, ulong src_addr_0, ulong dst_addr_1 = 0, ulong src_addr_1 = 0) { state = InternetInState.Pass; cur_segment_data.offset = 0; cur_segment_data.ip.id = id; cur_segment_data.ip.protocol = protocol; cur_segment_data.size = pass_length; cur_segment_data.ip.fragment_offset = fragment_offset; cur_segment_data.ip.pseudoheader_checksum = pseudoheader_checksum; cur_segment_data.ip.dst_addr_0 = dst_addr_0; cur_segment_data.ip.dst_addr_1 = dst_addr_1; cur_segment_data.ip.src_addr_0 = src_addr_0; cur_segment_data.ip.src_addr_1 = src_addr_1; Logging.log.Info("Passing started!"); ResetAllBusses(); // We know that the next byte is for passing so to limit interrupts, we set it here already datagramBusInBufferConsumerControlBusOut.ready = true; }
void StartWriting(ushort last_byte) { StartIdle(); Logging.log.Warn($"WRITING CURRENTLY NOT SUPPORTED ON INTERNET_IN"); state = InternetInState.Write; idx_out = cur_segment_data.offset; write_len = last_byte; ResetAllBusses(); }
void StartReading() { state = InternetInState.Read; // Reset various values idx_in = 0x00; cur_segment_data.ip.id = 0; cur_segment_data.ip.protocol = 0; cur_segment_data.frame_number = long.MinValue; cur_segment_data.ip.fragment_offset = 0; cur_segment_data.ip.pseudoheader_checksum = 0; cur_segment_data.ip.src_addr_0 = 0; cur_segment_data.ip.src_addr_1 = 0; cur_segment_data.ip.dst_addr_0 = 0; cur_segment_data.ip.dst_addr_1 = 0; ResetAllBusses(); //datagramBusInBufferConsumerControlBusOut.ready = true; }
private void StartIdle() { state = InternetInState.Idle; ResetAllBusses(); }
// Intermediate state for transition without resetting busses private void Finish() { state = InternetInState.Finish; }