-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Large Forward Open service #303
Add Large Forward Open service #303
Conversation
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
Hi All, This is my first contribution to OpENer, I'm not sure my PR takes care of everything (examples, doc, etc)? Also, I only tried LFO feature with EIPScanner stack and wireshark (I don't own any CIP scanner equipment), so I'm not 100% confident about implementation. Finally, I had to increase PC_OPENER_ETHERNET_BUFFER_SIZE value to fix buffer overflow here , nevertheless I'm not sure I did the right fix here. Kind regards, |
Hi @nefethael , Cheers, |
Hi @nefethael, Best regards, |
@nefethael already found the reason. You are only setting is_large_forward_open when calling LFO service. It is never reseted, and as a global variable is used, the flag stays true after the first LFO call. |
Okay, I tried to push it back on this branch, but I failed miserably and created a new one |
@nefethael I will again try to add this to your PR, so that you get proper credits for your contribution |
Signed-off-by: Martin Melik Merkumians <melik-merkumians@acin.tuwien.ac.at>
The flag is_large_forward_open is set permanently, as it is never reseted and saved in the global variable struct g_dummy_connection Signed-off-by: Martin Melik Merkumians <melik-merkumians@acin.tuwien.ac.at>
@CapXilinx Thanks for this quick integration. For PC_OPENER_ETHERNET_BUFFER_SIZE manner, my sampleapp assemblies have g_assembly_data064 & g_assembly_data096 with more than 512 bytes, so I had to increase buffer size accordingly. Maybe we could set assemblies size in opener_user_conf.h and calculate PC_OPENER_ETHERNET_BUFFER_SIZE from it? |
@nefethael although the idea sounds nice, the problem is, that this calculation would be inherently bound to the specific sample application. A probably better solution would be to statically check if the created assembly fits into the PC_OPENER_ETHERNET_BUFFER_SIZE. |
Signed-off-by: Vincent Prince vincent.prince.fr@gmail.com