Changeset 00d7e1b in mainline for uspace/srv/net/il/ip


Ignore:
Timestamp:
2011-10-07T20:20:33Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
49bd793b
Parents:
e2c50e1
Message:

networking improvements

  • start the networking stack from init
  • add loopback network interface driver (cherrypicked and sanitized from lp:~helenos-nicf/helenos/nicf)
  • add libnic and various small pieces from lp:~helenos-nicf/helenos/nicf
  • fix client side of NIC_GET_ADDRESS
  • net binary overhaul

Note: "ping 127.0.0.1" works, but the first three pings timeout for some reason

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/il/ip/ip.c

    re2c50e1 r00d7e1b  
    354354        ip_netif->routing = NET_DEFAULT_IP_ROUTING;
    355355        configuration = &names[0];
    356 
     356       
    357357        /* Get configuration */
    358358        rc = net_get_device_conf_req(ip_globals.net_sess, ip_netif->device_id,
     
    406406                        return ENOTSUP;
    407407                }
    408 
     408               
    409409                if (configuration[6].value) {
    410410                        ip_netif->arp = get_running_module(&ip_globals.modules,
     
    417417                        }
    418418                }
     419               
    419420                if (configuration[7].value)
    420421                        ip_netif->routing = (configuration[7].value[0] == 'y');
    421 
     422               
    422423                net_free_settings(configuration, data);
    423424        }
    424 
     425       
    425426        /* Bind netif service which also initializes the device */
    426427        ip_netif->sess = nil_bind_service(ip_netif->service,
     
    432433                return ENOENT;
    433434        }
    434 
     435       
    435436        /* Has to be after the device netif module initialization */
    436437        if (ip_netif->arp) {
     
    448449                }
    449450        }
    450 
     451       
    451452        /* Get packet dimensions */
    452453        rc = nil_packet_size_req(ip_netif->sess, ip_netif->device_id,
     
    461462                ip_netif->packet_dimension.content = IP_MIN_CONTENT;
    462463        }
    463 
     464       
    464465        index = ip_netifs_add(&ip_globals.netifs, ip_netif->device_id, ip_netif);
    465466        if (index < 0)
     
    478479                printf("%s: Default gateway (%s)\n", NAME, defgateway);
    479480        }
    480 
     481       
    481482        return EOK;
    482483}
     
    498499                return rc;
    499500        }
    500 
     501       
    501502        ip_netif->device_id = device_id;
    502503        ip_netif->service = netif;
    503504        ip_netif->state = NIC_STATE_STOPPED;
    504 
     505       
    505506        fibril_rwlock_write_lock(&ip_globals.netifs_lock);
    506507
Note: See TracChangeset for help on using the changeset viewer.