Only some small changes.

This commit is contained in:
Scalpel_cp 2008-06-22 15:14:21 +00:00
parent a729f0ee18
commit 0aee353319
4 changed files with 12 additions and 9 deletions

View file

@ -142,12 +142,15 @@ namespace Cosmos.Hardware.Network.TCPIPModel.NetworkLayer.IPv4
//Add the packetsections together into 32-bit words
UInt32 field1 = (UInt32)((this.Version << 4) | (this.HeaderLength << 0) | (this.TypeOfService << 8) | (this.TotalLength << 24));
Console.WriteLine("Field1: " + field1.ToBinary(32));
fields.Add(field1);
UInt32 field2 = (UInt32)((this.Identification << 8) | ((byte)(this.FragmentFlags)) << 21 | (this.FragmentOffset << 24));
Console.WriteLine("Field2: " + field2.ToBinary(32));
//fields.Add((UInt32)HostToNetworkOrder((int)field2));
UInt32 field3 = (UInt32)((this.TimeToLive << 0) | (((byte)(this.Protocol)) << 8) | (UInt16)(this.HeaderChecksum << 16));
Console.WriteLine("Field3: " + field3.ToBinary(32));
fields.Add(field3);
//Split the 32-bit words into bytes

View file

@ -27,12 +27,12 @@ namespace FrodeTest
//Test
Console.WriteLine("---- RUNNING PREDEFINED TESTS ----");
Test.StringTest.RunTest();
Test.BasicTest.RunTest();
Test.SwitchTest.RunTest();
//Test.BasicTest.RunTest();
//Test.SwitchTest.RunTest();
Test.BoolTest.RunTest();
Test.InterfaceTest.RunTest();
Test.ExtensionMethodsTest.RunTest();
//Test.BoolTest.RunTest();
//Test.InterfaceTest.RunTest();
//Test.ExtensionMethodsTest.RunTest();
//Test.BinaryHelperTest.RunTest();
//Test.TransmitStatusDescriptorTest.RunTest();
//Test.PacketHeaderTest.RunTest();

View file

@ -22,7 +22,7 @@ namespace FrodeTest.Test
ipv4Packet.DestinationAddress = new IPv4Address(172, 28, 6, 1);
ipv4Packet.SourceAddress = new IPv4Address(172,28,6,6);
ipv4Packet.TypeOfService = 0;
ipv4Packet.Identification = 12345;
ipv4Packet.Identification = 32767;
ipv4Packet.FragmentFlags = IPv4Packet.Fragmentation.DoNotFragment;
ipv4Packet.FragmentOffset = 0;
ipv4Packet.Protocol = IPv4Packet.Protocols.TCP;

View file

@ -18,9 +18,9 @@ namespace FrodeTest.Test
//Add char and string
//Bug discovered 7.june. SysFault when adding char and string.
//string added = string.Empty;
//added = ((char)('c')) + "oncatenating char and string works.";
//Console.WriteLine(added);
string added = string.Empty;
added = ((char)('c')) + "oncatenating char and string works.";
Console.WriteLine(added);
StringBuilder sb = new StringBuilder();
sb.Append("String");