Commit 34e64ab1 authored by Robert Schmidt's avatar Robert Schmidt

Remove unused/useless Ethernet variables

parent bba14188
...@@ -87,7 +87,6 @@ int eth_socket_init_raw(openair0_device *device) { ...@@ -87,7 +87,6 @@ int eth_socket_init_raw(openair0_device *device) {
} }
/* initialize destination address */ /* initialize destination address */
bzero((void *)&(eth->local_addrc_ll), sizeof(struct sockaddr_ll));
bzero((void *)&(eth->local_addrd_ll), sizeof(struct sockaddr_ll)); bzero((void *)&(eth->local_addrd_ll), sizeof(struct sockaddr_ll));
bzero((void *)&(eth->if_index), sizeof(struct ifreq)); bzero((void *)&(eth->if_index), sizeof(struct ifreq));
...@@ -98,17 +97,12 @@ int eth_socket_init_raw(openair0_device *device) { ...@@ -98,17 +97,12 @@ int eth_socket_init_raw(openair0_device *device) {
for (int i=0;i<eth->num_fd;i++) for (int i=0;i<eth->num_fd;i++)
if (ioctl(eth->sockfdd[i], SIOCGIFINDEX, &(eth->if_index)) < 0) if (ioctl(eth->sockfdd[i], SIOCGIFINDEX, &(eth->if_index)) < 0)
perror("SIOCGIFINDEX"); perror("SIOCGIFINDEX");
eth->local_addrc_ll.sll_family = AF_PACKET;
eth->local_addrc_ll.sll_ifindex = eth->if_index.ifr_ifindex;
eth->local_addrd_ll.sll_family = AF_PACKET; eth->local_addrd_ll.sll_family = AF_PACKET;
eth->local_addrd_ll.sll_ifindex = eth->if_index.ifr_ifindex; eth->local_addrd_ll.sll_ifindex = eth->if_index.ifr_ifindex;
/* hear traffic from specific protocol*/ /* hear traffic from specific protocol*/
eth->local_addrc_ll.sll_protocol = htons((short)device->eth_params->my_portc);
eth->local_addrd_ll.sll_protocol = htons((short)device->eth_params->my_portd); eth->local_addrd_ll.sll_protocol = htons((short)device->eth_params->my_portd);
eth->local_addrc_ll.sll_halen = ETH_ALEN;
eth->local_addrc_ll.sll_pkttype = PACKET_OTHERHOST;
eth->local_addrd_ll.sll_halen = ETH_ALEN; eth->local_addrd_ll.sll_halen = ETH_ALEN;
eth->local_addrd_ll.sll_pkttype = PACKET_OTHERHOST; eth->local_addrd_ll.sll_pkttype = PACKET_OTHERHOST;
eth->addr_len = sizeof(struct sockaddr_ll); eth->addr_len = sizeof(struct sockaddr_ll);
......
...@@ -80,14 +80,6 @@ typedef struct { ...@@ -80,14 +80,6 @@ typedef struct {
struct sockaddr_in local_addrd; struct sockaddr_in local_addrd;
/*!\brief address length for both UDP and RAW socket*/ /*!\brief address length for both UDP and RAW socket*/
int addr_len; int addr_len;
/*!\brief destination address (control) for RAW socket*/
struct sockaddr_ll dest_addrc_ll;
/*!\brief local address (control) for RAW socket*/
struct sockaddr_ll local_addrc_ll;
/*!\brief destination address (user) for RAW socket*/
struct sockaddr_ll dest_addrd_ll;
/*!\brief local address (user) for RAW socket*/
struct sockaddr_ll local_addrd_ll;
/*!\brief inteface index for RAW socket*/ /*!\brief inteface index for RAW socket*/
struct ifreq if_index; struct ifreq if_index;
/*!\brief timeout ms */ /*!\brief timeout ms */
...@@ -146,7 +138,9 @@ typedef struct { ...@@ -146,7 +138,9 @@ typedef struct {
/*!\brief precomputed ethernet header (control) */ /*!\brief precomputed ethernet header (control) */
struct ether_header ehc; struct ether_header ehc;
/*!\brief precomputed ethernet header (data) */ /*!\brief precomputed ethernet header (data) */
struct ether_header ehd; struct ether_header ehd;
/*!\brief local address (user) for RAW socket*/
struct sockaddr_ll local_addrd_ll;
} eth_state_t; } eth_state_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment