[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 2/3] libc: IP-Adresse bei der Treiberregistrierung entfernt



- libc: Bei der Registrierung eines Netzwerktreibers wird die IP-Adresse des
  Geraets nicht mehr uebertragen.

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/cdi/lib/net/net.c |    7 +------
 src/modules/include/network.h |    5 ++---
 src/modules/lib/network.c     |    4 +---
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/modules/cdi/lib/net/net.c b/src/modules/cdi/lib/net/net.c
index beb812c..88a5bb1 100644
--- a/src/modules/cdi/lib/net/net.c
+++ b/src/modules/cdi/lib/net/net.c
@@ -58,18 +58,13 @@ void cdi_net_driver_destroy(struct cdi_net_driver* driver)
 void cdi_net_device_init(struct cdi_net_device* device)
 {
     device->number = netcard_highest_id;
-    if (device->ip == 0) {
-        // FIXME
-        device->ip = 0x4201a8c0;
-    }
 
     // Zur Liste der Netzwerkkarten hinzufügen
     cdi_list_push(netcard_list, device);
 
     // Beim tcpip Modul registrieren
     register_netcard(device->number,
-                     device->mac,
-                     device->ip);
+                     device->mac);
 
     ++netcard_highest_id;
 }
diff --git a/src/modules/include/network.h b/src/modules/include/network.h
index ef0bb99..ca36a97 100644
--- a/src/modules/include/network.h
+++ b/src/modules/include/network.h
@@ -43,14 +43,13 @@
     (big_endian_word((x) >> 16)))
 
 struct net_device {
-    dword number;
+    uint32_t number;
     uint64_t mac;
-    dword ip;
 };
 
 dword string_to_ip(const char* ip);
 char* ip_to_string(dword ip);
 char* mac_to_string(uint64_t mac);
-void register_netcard(dword device_numer, uint64_t mac, dword ip);
+void register_netcard(dword device_numer, uint64_t mac);
 
 #endif
diff --git a/src/modules/lib/network.c b/src/modules/lib/network.c
index d0343d3..ac32ef4 100644
--- a/src/modules/lib/network.c
+++ b/src/modules/lib/network.c
@@ -110,13 +110,11 @@ char* mac_to_string(uint64_t mac)
  *
  * @param ip IP-Adresse, die der Netzwerkkarte zugeordnet ist.
  */
-//FIXME: ip braucht keine Sau hier
-void register_netcard(dword device_number, uint64_t mac, dword ip)
+void register_netcard(dword device_number, uint64_t mac)
 {
     struct net_device driver = {
         .number = device_number,
         .mac = mac,
-        .ip = ip
     };
 
     char buffer[8 + sizeof(struct net_device)];
-- 
1.5.6.5