Line 464... |
Line 464... |
eth->baseaddr = config.ethernets[i].baseaddr;
|
eth->baseaddr = config.ethernets[i].baseaddr;
|
|
|
if ( eth->baseaddr != 0 ) {
|
if ( eth->baseaddr != 0 ) {
|
/* Mark which DMA controller and channels */
|
/* Mark which DMA controller and channels */
|
eth->dma = config.ethernets[i].dma;
|
eth->dma = config.ethernets[i].dma;
|
|
eth->mac_int = config.ethernets[i].irq;
|
eth->tx_channel = config.ethernets[i].tx_channel;
|
eth->tx_channel = config.ethernets[i].tx_channel;
|
eth->rx_channel = config.ethernets[i].rx_channel;
|
eth->rx_channel = config.ethernets[i].rx_channel;
|
eth->rtx_type = ETH_RTX_SOCK/*config.ethernets[i].rtx_type*/;
|
eth->rtx_type = config.ethernets[i].rtx_type;
|
|
|
switch (eth->rtx_type) {
|
switch (eth->rtx_type) {
|
case ETH_RTX_FILE:
|
case ETH_RTX_FILE:
|
/* (Re-)open TX/RX files */
|
/* (Re-)open TX/RX files */
|
eth->rxfile = config.ethernets[i].rxfile;
|
eth->rxfile = config.ethernets[i].rxfile;
|
Line 504... |
Line 505... |
}
|
}
|
|
|
/* get interface index number */
|
/* get interface index number */
|
debug (3, "RTX getting interface...\n");
|
debug (3, "RTX getting interface...\n");
|
memset(&(eth->ifr), 0, sizeof(eth->ifr));
|
memset(&(eth->ifr), 0, sizeof(eth->ifr));
|
strncpy(eth->ifr.ifr_name, "lo"/*config.ethernets[i].sock_interface*/, IFNAMSIZ);
|
strncpy(eth->ifr.ifr_name, config.ethernets[i].sockif, IFNAMSIZ);
|
if (ioctl(eth->rtx_sock, SIOCGIFINDEX, &(eth->ifr)) == -1) {
|
if (ioctl(eth->rtx_sock, SIOCGIFINDEX, &(eth->ifr)) == -1) {
|
fprintf( stderr, "SIOCGIFINDEX failed!\n");
|
fprintf( stderr, "SIOCGIFINDEX failed!\n");
|
return;
|
return;
|
}
|
}
|
debug (3, "RTX Socket Interface : %d\n", eth->ifr.ifr_ifindex);
|
debug (3, "RTX Socket Interface : %d\n", eth->ifr.ifr_ifindex);
|