Commit Graph

13 Commits

Author SHA1 Message Date
Manoel R. Abranches 9a9cee4e43 Use the correct address types in net.c.
implement ntoa ipv4 function.
2010-09-15 13:00:51 -03:00
Paulo de Rezende Pinatti 10830203a0 Added ARP protocol to network stack and fixed bug in grub_netbuff_alloc function.
* include/grub/net/arp.h: added arp header, arp cache entry and related constants and functions
* net/arp.c: added functions arp_init_table, arp_find_entry, arp_resolve and arp_receive
* net/ethernet.c (send_ethernet_packet): replaced hardcoded hardware address by parameter target_addr
* net/ethernet.c (recv_ethernet_packet): added call to arp_receive when packet is of type 0x803 (ARP) and only return when packet is of type determined by parameter ethertype
* net/ip.c (send_ip_packet): added call to arp_resolve to determine hardware address of destination
* net/netbuff.c (grub_netbuff_alloc): fixed swapped parameters in call to grub_memalign
2010-08-13 14:42:16 -03:00
Manoel R. Abranches 7c978f0690 Implement the size field. 2010-07-29 18:17:01 -03:00
Manoel R. Abranches 17ef14c916 Process errot packets in TFTP reply. 2010-07-29 18:13:00 -03:00
Manoel R. Abranches 11d1ea5df6 Use server and client IP from the bootp packet. 2010-07-29 17:52:54 -03:00
Paulo de Rezende Pinatti 818a356eb1 Fixed get_card_packet to correctly read data from network card into buffer.
* net/ieee1275/interface.c (get_card_packet): read data regardless of ethernet header
2010-07-29 16:36:17 -03:00
Manoel R. Abranches 3ec6213b17 Clean Debug messages 2010-06-29 06:50:15 -03:00
Manoel R. Abranches 1edb7287ff Parse ipv6 header on incoming packets. 2010-06-23 14:49:46 -03:00
Manoel R. Abranches bf6d9eeb53 Abort transference when getting file size. 2010-06-23 14:47:55 -03:00
Manoel R. Abranches 8c599704a7 Network code specific for ieee1275 machines.
Used to parse BOOTP packet from the server and use write/read on the network card.
May be removed later.
2010-06-21 19:20:55 -03:00
Manoel R. Abranches 60cdb895da Adaptation for the new protocols and interface structs.
implementation of receive in the protocols.
Also all unwanted packets are discarded.
2010-06-21 19:15:45 -03:00
Manoel R. Abranches 8d402bc9a8 small change in the interface structure. 2010-04-29 17:56:09 -03:00
Manoel R. Abranches 066528b4b1 Initial Implementation of TFTP protocol and new protocol structs. 2010-04-27 18:05:35 -03:00