Beispiel #1
0
        public byte[] toByte()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(pcapDataHeader.toByte());
            bytes.AddRange(linuxCookedHeader.toByte());
            bytes.AddRange(IPHeader.toByte());
            bytes.AddRange(uDPHeader.toByte());
            bytes.AddRange(ASCIIEncoding.ASCII.GetBytes(sipMessage));
            return(bytes.ToArray());
        }
Beispiel #2
0
 public LinuxCookedHeader(UInt16 packetType,
                          UInt16 addressType,
                          UInt16 addressLength,
                          byte[] source, //6byte
                          UInt16 unused,
                          UInt16 protocol,
                          IPHeader ipHeader)
 {
     this.packetType    = packetType;
     this.addressType   = addressType;
     this.addressLength = addressLength;
     this.source        = source;
     this.unused        = unused;
     this.protocol      = protocol;
     this.ipHeader      = ipHeader;
 }