# Revision history [back]

### Send packet to switch and back to controller

I am trying to create a latency-monitoring system by sending sepcial ping-like packets from the controller.

TransmitPacketInput input = new TransmitPacketInputBuilder().setNode(nodeRef(node.getId()))
.setEgress(nodeConnectorRef(node.getId(), egress))
.build();


The thing is, because my PINGs are from the controller to the controller, I need to compute the latencies of links individually, and I also need to calculate the latency of a link from the controller to the switch. This mean my packet must do this:

Controller - Switch - Controller

I've tried a few things, but none have really worked. What I have learned is that if I "setEgress", then the packet will immediately be forwarded out of the port, regardless of the flow rules installed on the switch.

As a result, I have two options, but I don't know if I can do either:

1. I could send the packet with "egress" set to the controller port. (But which port is that?)
2. I could find a way to let the flow rules decide of the output port, and NOT "egress". So far every time I tried not setting egress, I have gotten errors on the "transmitPacket" call, with "input" being apparently null.

Are either of those possible?

### Send packet to switch and back to controller

I am trying to create a latency-monitoring system by sending sepcial special ping-like packets from the controller.

TransmitPacketInput input = new TransmitPacketInputBuilder().setNode(nodeRef(node.getId()))
.setEgress(nodeConnectorRef(node.getId(), egress))
.build();


The thing is, because my PINGs are from the controller to the controller, I need to compute the latencies of links individually, and I also need to calculate the latency of a link from the controller to the switch. This mean my packet must do this:

Controller - Switch - Controller

I've tried a few things, but none have really worked. What I have learned is that if I "setEgress", then the packet will immediately be forwarded out of the port, regardless of the flow rules installed on the switch.

As a result, I have two options, but I don't know if I can do either:

1. I could send the packet with "egress" set to the controller port. (But which port is that?)
2. I could find a way to let the flow rules decide of the output port, and NOT "egress". So far every time I tried not setting egress, I have gotten errors on the "transmitPacket" call, with "input" being apparently null.

Are either of those possible?

### Send packet to switch and back to controller

I am trying to create a latency-monitoring system by sending special ping-like packets from the controller.

TransmitPacketInput input = new TransmitPacketInputBuilder().setNode(nodeRef(node.getId()))
.setEgress(nodeConnectorRef(node.getId(), egress))
.build();
packetProcessingService.transmitPacket(input);


The thing is, because my PINGs are from the controller to the controller, I need to compute the latencies of links individually, and I also need to calculate the latency of a link from the controller to the switch. This mean my packet must do this:

Controller - Switch - Controller

I've tried a few things, but none have really worked. What I have learned is that if I "setEgress", then the packet will immediately be forwarded out of the port, regardless of the flow rules installed on the switch.

As a result, I have two options, but I don't know if I can do either:

1. I could send the packet with "egress" set to the controller port. (But which port is that?)
2. I could find a way to let the flow rules decide of the output port, and NOT "egress". So far every time I tried not setting egress, I have gotten errors on the "transmitPacket" call, with "input" being apparently null.

Are either of those possible?

### Send packet to switch and back to controller

I am trying to create a latency-monitoring system by sending special ping-like packets from the controller.

TransmitPacketInput input = new TransmitPacketInputBuilder().setNode(nodeRef(node.getId()))
.setEgress(nodeConnectorRef(node.getId(), egress))
.build();
packetProcessingService.transmitPacket(input);


The thing is, because my PINGs are from the controller to the controller, I need to compute the latencies of links individually, and I also need to calculate the latency of a link from the controller to the switch. This mean my packet must do this:

Controller - Switch - Controller

I've tried a few things, but none have really worked. What I have learned is that if I "setEgress", then the packet will immediately be forwarded out of the port, regardless of the flow rules installed on the switch.

As a result, I have two options, but I don't know if I can do either:

1. I could send the packet with "egress" set to the controller port. (But which port is that?)
2. I could find a way to let the flow rules decide of the output port, and NOT "egress". So far every time I tried not setting egress, I have gotten errors on the "transmitPacket" call, with "input" being apparently null.

Are either of those possible?

PS: Incidentally, I have no idea what "setIngress" does...