Recently I have been researching how to make SRv6 packets with ostinato. Does the author or anyone else have any ideas? for example How do I add SRv6 extension headers ? etc.
Mac, Eth, IPv6, Userscript, UDP, Pattern
const sids = [
0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e1f,
0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e2f,
0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e4f,
0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e4f,
0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e5f
];
protocol.name = "SRv6 SRH"
protocol.protocolFrameSize = function() { return 8 + sids.length*4; }
protocol.protocolId = function(id_type)
{
if (id_type == Protocol.ProtocolIdIp)
return 43;
return 0;
}
protocol.protocolFrameValue = function(index)
{
var segmentsLeft = sids.length/4-1;
var tag = 0xabcd;
var pfv = new Array(protocol.protocolFrameSize());
// next header (8)
pfv[0] = protocol.payloadProtocolId(Protocol.ProtocolIdIp);
// hdr ext len (8)
pfv[1] = sids.length/2; // 2 quad-words per SID
// routing type (8)
pfv[2] = 4;
// segments left (8)
pfv[3] = segmentsLeft;
// last entry (8)
pfv[4] = sids.length/4-1;
// flags (8)
pfv[5] = 0;
// Tag (16)
pfv[6] = (tag >> 8) & 0xFF;
pfv[7] = (tag >> 0) & 0xFF;
// SIDs
for (i = 0; i < sids.length; i++) {
pfv[8+i*4+0] = (sids[i] >> 24) & 0xFF;
pfv[8+i*4+1] = (sids[i] >> 16) & 0xFF;
pfv[8+i*4+2] = (sids[i] >> 8) & 0xFF;
pfv[8+i*4+3] = (sids[i] >> 0) & 0xFF;
}
return pfv;
}
Hello !Recently I have been researching how to make SRv6 packets with ostinato. Does the author or anyone else have any ideas? for example How do I add SRv6 extension headers ? etc.
--
Get Ostinato News and Updates on Twitter - Follow @ostinato (http://twitter.com/ostinato)
---
You received this message because you are subscribed to the Google Groups "ostinato" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ostinato+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ostinato/759b6311-f377-4f32-90aa-19ad66c8dd13n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ostinato/72140bc0-f607-4799-9020-635dc5ce6721n%40googlegroups.com.