Fixes following dp-packet access. Removes netinet/if_ether.h
include due to duplicate definition of ether_addr.
------
In file included from /usr/include/netinet/if_ether.h:60:0,
from lib/lldp/lldpd.h:23,
from lib/ovs-lldp.h:26,
from lib/ovs-lldp.c:30:
/usr/include/net/ethernet.h: At top level:
/usr/include/net/ethernet.h:32:8: error: redefinition of 'struct
ether_addr'
struct ether_addr
^
In file included from
../dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:179:0,
from lib/netdev-dpdk.h:18,
from lib/dp-packet.h:25,
from lib/ovs-lldp.h:23,
from lib/ovs-lldp.c:30:
../dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_ether.h:83:8: note:
originally defined here
struct ether_addr {
^
lib/ovs-lldp.c: In function 'lldp_process_packet':
lib/ovs-lldp.c:676:30: error: 'const struct dp_packet' has no member
named 'data_'
(char *) p->data_, p->size_);
^
lib/ovs-lldp.c:676:40: error: 'const struct dp_packet' has no member
named 'size_'
(char *) p->data_, p->size_);
------
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@nicira.com>
#include <net/if.h>
#ifndef _WIN32
#include <netinet/in.h>
#include <net/if.h>
#ifndef _WIN32
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#endif
#include <sys/socket.h>
#include <sys/types.h>
#endif
#include <sys/socket.h>
#include <sys/types.h>
#ifndef _WIN32
#include <grp.h>
#include <libgen.h>
#ifndef _WIN32
#include <grp.h>
#include <libgen.h>
-#include <netinet/if_ether.h>
#include <pwd.h>
#include <sys/select.h>
#include <sys/utsname.h>
#include <pwd.h>
#include <sys/select.h>
#include <sys/utsname.h>
#define _LLDPD_H
#ifndef _WIN32
#define _LLDPD_H
#ifndef _WIN32
-#include <netinet/if_ether.h>
#include <netinet/in.h>
#endif
#include <stdlib.h>
#include <netinet/in.h>
#endif
#include <stdlib.h>
{
if (lldp) {
lldpd_recv(lldp->lldpd, lldpd_first_hardware(lldp->lldpd),
{
if (lldp) {
lldpd_recv(lldp->lldpd, lldpd_first_hardware(lldp->lldpd),
- (char *) p->data_, p->size_);
+ (char *) dp_packet_data(p), dp_packet_size(p));
/* Local chassis info */
chassis.c_id_subtype = LLDP_CHASSISID_SUBTYPE_LLADDR;
chassis.c_id = chassis_mac;
/* Local chassis info */
chassis.c_id_subtype = LLDP_CHASSISID_SUBTYPE_LLADDR;
chassis.c_id = chassis_mac;
- chassis.c_id_len = ETHER_ADDR_LEN;
+ chassis.c_id_len = ETH_ADDR_LEN;
chassis.c_name = "Dummy chassis";
chassis.c_descr = "Long dummy chassis description";
chassis.c_cap_available = LLDP_CAP_BRIDGE;
chassis.c_name = "Dummy chassis";
chassis.c_descr = "Long dummy chassis description";
chassis.c_cap_available = LLDP_CAP_BRIDGE;
}
/* Decode the constructed LLDPPDU */
}
/* Decode the constructed LLDPPDU */
- assert(lldp_decode(NULL, packet.data_, packet.size_, hw,
+ assert(lldp_decode(NULL, dp_packet_data(&packet), dp_packet_size(&packet), hw,
&nchassis, &nport) != -1);
/* Expecting returned pointers to allocated structures */
&nchassis, &nport) != -1);
/* Expecting returned pointers to allocated structures */