Skip to content

Add 2026/Fiumano - consegna pbridge.c#385

Open
alessandrofiumano wants to merge 2 commits intolucaderi:masterfrom
alessandrofiumano:master
Open

Add 2026/Fiumano - consegna pbridge.c#385
alessandrofiumano wants to merge 2 commits intolucaderi:masterfrom
alessandrofiumano:master

Conversation

@alessandrofiumano
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@lucaderi lucaderi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ci sono un po' di cose da sistemare anche se l'impalcatura e buona

if (stat(device, &s) == 0)
{
/* Device is a file on filesystem */
if ((pd = pcap_open_offline(device, errbuf)) == NULL)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questo lo dei togliere col bridge

}
else
{
if ((pd = pcap_open_live(device, snaplen, promisc, 500, errbuf)) == NULL)
Copy link
Copy Markdown
Owner

@lucaderi lucaderi Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

col bridge due interfacce sono obbligatorie

printf("%02X ", p[i]);
printf("\n");
}
if (pd2 != NULL) pcap_sendpacket((pcap_t*)_deviceId, p, (int) h->caplen); // forwarding all'altra interfaccia
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questo non credo vada bene. Lo hai provato il codice?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants