Add 2026/Fiumano - consegna pbridge.c#385
Open
alessandrofiumano wants to merge 2 commits intolucaderi:masterfrom
Open
Add 2026/Fiumano - consegna pbridge.c#385alessandrofiumano wants to merge 2 commits intolucaderi:masterfrom
alessandrofiumano wants to merge 2 commits intolucaderi:masterfrom
Conversation
lucaderi
requested changes
Mar 25, 2026
Owner
lucaderi
left a comment
There was a problem hiding this comment.
Ci sono un po' di cose da sistemare anche se l'impalcatura e buona
2026/Fiumano/pbridge.c
Outdated
| if (stat(device, &s) == 0) | ||
| { | ||
| /* Device is a file on filesystem */ | ||
| if ((pd = pcap_open_offline(device, errbuf)) == NULL) |
Owner
There was a problem hiding this comment.
Questo lo dei togliere col bridge
2026/Fiumano/pbridge.c
Outdated
| } | ||
| else | ||
| { | ||
| if ((pd = pcap_open_live(device, snaplen, promisc, 500, errbuf)) == NULL) |
Owner
There was a problem hiding this comment.
col bridge due interfacce sono obbligatorie
2026/Fiumano/pbridge.c
Outdated
| printf("%02X ", p[i]); | ||
| printf("\n"); | ||
| } | ||
| if (pd2 != NULL) pcap_sendpacket((pcap_t*)_deviceId, p, (int) h->caplen); // forwarding all'altra interfaccia |
Owner
There was a problem hiding this comment.
Questo non credo vada bene. Lo hai provato il codice?
Author
There was a problem hiding this comment.
Riguardo a pcap_sendpacket il codice è stato testato e a primo impatto mi sembrava funzionasse correttamente. Comunque sia posso adattarlo con una variante che utilizza pcap_inject
…mp offline, filtri e verbosità. Resi obbligatori i parametri -i e -o, sostituita la funzione DummyProcesssPacket con ProcessPacket.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.