Rename GetIfaceMaxPayloadSize to GetIfaceMaxPacketSize to reflect the actual function.

pull/451/merge
Victor Julien 12 years ago
parent bd21b5ed9c
commit fc7879322e

@ -415,7 +415,7 @@ TmEcode ReceivePcapThreadInit(ThreadVars *tv, void *initdata, void **data) {
if (pcapconfig->snaplen == 0) {
/* We set snaplen if we can get the MTU */
ptv->pcap_snaplen = GetIfaceMaxPayloadSize(pcapconfig->iface);
ptv->pcap_snaplen = GetIfaceMaxPacketSize(pcapconfig->iface);
} else {
ptv->pcap_snaplen = pcapconfig->snaplen;
}
@ -562,7 +562,7 @@ TmEcode ReceivePcapThreadInit(ThreadVars *tv, void *initdata, void **data) {
if (pcapconfig->snaplen == 0) {
/* We try to set snaplen from MTU value */
ptv->pcap_snaplen = GetIfaceMaxPayloadSize(pcapconfig->iface);
ptv->pcap_snaplen = GetIfaceMaxPacketSize(pcapconfig->iface);
/* be conservative with old pcap lib to mimic old tcpdump behavior
when MTU was not available. */
if (ptv->pcap_snaplen <= 0)

@ -1426,7 +1426,7 @@ int main(int argc, char **argv)
case RUNMODE_PFRING:
/* FIXME this don't work effficiently in multiinterface */
/* find payload for interface and use it */
default_packet_size = GetIfaceMaxPayloadSize(pcap_dev);
default_packet_size = GetIfaceMaxPacketSize(pcap_dev);
if (default_packet_size)
break;
default:

@ -97,7 +97,7 @@ int GetIfaceMTU(char *pcap_dev)
}
/**
* \brief output max payload size for a link
* \brief output max packet size for a link
*
* This does a best effort to find the maximum packet size
* for the link. In case of uncertainty, it will output a
@ -106,7 +106,7 @@ int GetIfaceMTU(char *pcap_dev)
* \param Name of a network interface
* \retval 0 in case of error
*/
int GetIfaceMaxPayloadSize(char *pcap_dev)
int GetIfaceMaxPacketSize(char *pcap_dev)
{
int ll_header = GetIfaceMaxHWHeaderLength(pcap_dev);
int mtu = GetIfaceMTU(pcap_dev);

@ -22,4 +22,4 @@
*/
int GetIfaceMTU(char *pcap_dev);
int GetIfaceMaxPayloadSize(char *pcap_dev);
int GetIfaceMaxPacketSize(char *pcap_dev);

Loading…
Cancel
Save