Vladimir 'phcoder' Serbinenko
4d1e2bc9e3
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip
...
disks with unknown size.
* grub-core/disk/raid.c (scan_devices): Allow disks with unknown sizes.
2012-01-14 11:37:34 +01:00
Vladimir 'phcoder' Serbinenko
75b49ebed9
Remove defines pertaining to arbitrary limits not affecting GRUB
...
anymore.
* grub-core/fs/ext2.c (EXT2_PATH_MAX): Removed.
(EXT2_MAX_SYMLINKCNT): Likewise.
* grub-core/fs/nilfs2.c (NILFS_BTREE_LEVEL_MAX): Likewise.
* grub-core/net/tftp.c (TFTP_MAX_PACKET): Likewise.
* include/grub/i386/pc/pxe.h (GRUB_PXE_MIN_BLKSIZE): Likewise.
(GRUB_PXE_MAX_BLKSIZE): Likewise.
* include/grub/normal.h (GRUB_MAX_CMDLINE): Likewise.
* include/grub/zfs/dnode.h (DN_MAX_INDBLKSHIFT): Likewise.
(DN_MAX_OBJECT_SHIFT): Likewise.
(DN_MAX_OFFSET_SHIFT): Likewise.
(DN_MAX_OBJECT): Likewise.
(DNODES_PER_LEVEL_SHIFT): Likewise.
* include/grub/zfs/spa.h (SPA_MAXBLOCKSHIFT): Likewise.
(SPA_MAXBLOCKSIZE): Likewise.
(SPA_BLOCKSIZES): Likewise.
* include/grub/zfs/zap_impl.h (MZAP_MAX_BLKSHIFT): Likewise.
(MZAP_MAX_BLKSZ): Likewise.
2012-01-14 11:30:43 +01:00
Vladimir 'phcoder' Serbinenko
74a1dce71d
* grub-core/fs/zfs/zfs.c (grub_zfs_read): Remove useless alloc and
...
handle NULL appropriately.
Remove MIN.
2012-01-14 11:23:51 +01:00
Vladimir 'phcoder' Serbinenko
30c7d3ce34
Fix efiemu.
...
* grub-core/efiemu/runtime/efiemu.c: explicitly include right
cpu/types.h.
(efiemu_set_virtual_address_map): Remove UINT_TO_PTR.
* configure.ac: Fix efiemu check.
2012-01-13 15:12:28 +01:00
Vladimir 'phcoder' Serbinenko
3c76ea0c2c
* util/grub.d/30_os-prober.in: Fix occurence of grub-probe instead of
...
grub_probe.
Reported by: adamwill
2012-01-13 13:54:24 +01:00
Seth Goldberg
7e532280bd
* grub-core/lib/arg.c (grub_arg_parse): Fix NULL pointer dereference.
2012-01-12 22:20:29 +01:00
Vladimir 'phcoder' Serbinenko
3049237440
Fix handling of wide characters in gfxterm.
...
* grub-core/term/gfxterm.c (grub_colored_char): Remove width and index.
(clear_char): Likewise.
(paint_char): Skip code == NULL chars.
(grub_gfxterm_putchar): Set code = NULL on "shadowed" positions.
2012-01-12 22:16:07 +01:00
Vladimir 'phcoder' Serbinenko
e70cb72f73
* grub-core/normal/charset.c: Move comment to right place.
2012-01-12 22:13:20 +01:00
Vladimir 'phcoder' Serbinenko
5c827cf971
* grub-core/fs/affs.c (grub_affs_bblock): Revert flags.
...
(GRUB_AFFS_FLAG_FFS): Put back where it was.
(grub_affs_mount): Revert the correct version checking.
2012-01-11 12:53:38 +01:00
Vladimir 'phcoder' Serbinenko
53603892df
* docs/grub.texi (Unicode): Mention several other unsupported features.
2012-01-11 12:50:04 +01:00
Vladimir 'phcoder' Serbinenko
ff094b9b57
* grub-core/fs/squash4.c (squash_mount): Mark endian conversion in
...
case statements as compile-time one.
(direct_read): Prevent spurious warnings.
(grub_squash_read_data): Likewise.
2012-01-11 12:46:50 +01:00
Vladimir 'phcoder' Serbinenko
c029da8a89
Various squash4 fixes and LZO and XZ support.
...
* Makefile.util.def (libgrubmods.a): Add xzembed directory to cppflags.
Add xzembed source files.
* grub-core/Makefile.core.def (squash4): Add xzembed and minilzo flags.
* grub-core/fs/squash4.c (grub_squash_super): New field compression.
(grub_squash_inode): New subtype long_dir.
(SQUASH_TYPE_LONG_DIR): New inode type.
(COMPRESSION): New enum.
(XZBUFSIZ): New const.
(grub_squash_data): New fields blksz, decompress, xzdec, xzbuf.
(read_chunk): Use data->decompress.
(zlib_decompress): New function.
(lzo_decompress): Likewise.
(xz_decompress): Likewise.
(squash_mount): Set new data fields.
(grub_squash_iterate_dir): Handle long dir.
(squash_unmount): Free xzdec and xzbuf.
(grub_squash_open): Check ino type.
(direct_read): Stylistic fixes. Use data->decompress.
(grub_squash_read_data): Likewise.
* grub-core/io/gzio.c (grub_gzio): Remove disk_input.
(get_byte): Likewise.
(grub_zlib_disk_read): Removed.
* grub-core/lib/posix_wrap/sys/types.h (ssize_t): New type.
(GRUB_POSIX_BOOL_DEFINED): New define.
* grub-core/lib/posix_wrap/unistd.h: Include sys/types.h.
* grub-core/lib/xzembed/xz.h: Addmissing includes.
[!GRUB_POSIX_BOOL_DEFINED]: Define bool.
* include/grub/deflate.h (grub_zlib_disk_read): Removed.
2011-12-26 13:18:01 +01:00
Vladimir 'phcoder' Serbinenko
7a45a539db
Don't override more informative errors.
...
* grub-core/commands/acpi.c (grub_cmd_acpi): Don't override errors.
* grub-core/font/font.c (open_section): Likewise.
* grub-core/loader/i386/bsd.c (grub_bsd_load_aout): New argument
filename. Don't override errors.
(grub_cmd_openbsd_ramdisk): Don't override errors.
* grub-core/loader/i386/linux.c (grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
* grub-core/loader/ia64/efi/linux.c (grub_load_elf64): Likewise.
(grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
(grub_cmd_payload): Likewise.
* grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/multiboot.c (grub_cmd_multiboot): Likewise.
(grub_cmd_module): Likewise.
* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/xnu.c (grub_xnu_load_driver): Likewise.
(grub_cmd_xnu_mkext): Likewise.
(grub_cmd_xnu_ramdisk): Likewise.
(grub_xnu_check_os_bundle_required): Likewise.
(grub_xnu_load_kext_from_dir): Likewise.
(grub_cmd_xnu_kextdir): Likewise.
* grub-core/loader/xnu_resume.c (grub_xnu_resume): Likewise.
2011-12-26 12:58:08 +01:00
Vladimir 'phcoder' Serbinenko
b2d004db18
* grub-core/fs/minix.c (grub_minix_mount) [MODE_MINIX3]: Treat 0xffff
...
as 1024 in block size field. Found on one of my test images.
Small optimisation while on it.
2011-12-25 22:44:42 +01:00
Vladimir 'phcoder' Serbinenko
ec000eaca9
* docs/grub.texi (Filesystems): Mention SFS as Latin1 filesystem.
...
* grub-core/fs/sfs.c (grub_sfs_mount): Fix a memory leak while on it.
(grub_sfs_iterate_dir): Convert Latin1 to UTF8. Stylistic and
performance fixes while on it.
(grub_sfs_close): Fix memory leak while on it.
(grub_sfs_label): Convert Latin1 to UTF-8.
2011-12-25 22:39:56 +01:00
Vladimir 'phcoder' Serbinenko
f50e11653e
* grub-core/fs/hfs.c (grub_hfs_dir): Cap keylen to actually available
...
space to avoid overflows.
(grub_hfs_label): Convert from macroman to UTF-8.
2011-12-25 22:23:05 +01:00
Vladimir 'phcoder' Serbinenko
2ae254de13
* grub-core/fs/affs.c (grub_affs_label): Interpret label as latin1.
2011-12-25 22:07:15 +01:00
Vladimir 'phcoder' Serbinenko
0108f49101
* grub-core/normal/menu.c (menu_init): Don't stop menu init at gfxterm.
2011-12-25 17:41:55 +01:00
Vladimir 'phcoder' Serbinenko
f45f5f89ff
* unicode: Import Unicode 6.0 data.
2011-12-25 16:17:25 +01:00
Vladimir 'phcoder' Serbinenko
63fa8ef94e
* grub-core/term/gfxterm.c (grub_gfxterm_putchar): Don't set values
...
outside of range.
2011-12-25 16:15:01 +01:00
Vladimir 'phcoder' Serbinenko
4d8c476536
Avoid cutting in the middle of UTF-8 string.
...
* include/grub/charset.h (grub_getend): New function.
* grub-core/script/function.c (grub_script_function_find): Use
grub_getend.
* grub-core/normal/completion.c (add_completion): Likewise.
2011-12-25 16:11:41 +01:00
Vladimir 'phcoder' Serbinenko
f3cb4a4e57
* grub-core/normal/charset.c (grub_ucs4_to_utf8): Small stylistic fix.
...
(grub_bidi_line_logical_to_visual): Skip tags. They are deprecated.
* include/grub/unicode.h (GRUB_UNICODE_TAG_START): New enum value.
(GRUB_UNICODE_TAG_END): Likewise.
(GRUB_UNICODE_LAST_VALID): Likewise.
2011-12-25 16:07:33 +01:00
Vladimir 'phcoder' Serbinenko
5da8dbc5bc
* include/grub/unicode.h (grub_unicode_compact_range): Replace end with
...
len and make it smaller. All users updated.
* util/import_unicode.py: Put length and not end character.
Check length.
2011-12-25 16:03:42 +01:00
Vladimir 'phcoder' Serbinenko
8569f13d8d
Make better Unicode-compliant and unify some UTF-8 code pathes.
...
* grub-core/normal/charset.c (grub_utf8_to_utf16): Don't eat possibly
valid character.
(grub_is_valid_utf8): Use grub_utf8_process.
Check resulting code range.
(grub_utf8_to_ucs4): Use grub_utf8_process.
* include/grub/charset.h (grub_utf16_to_utf8): Don't eat up a possibly
valid character.
2011-12-25 15:57:50 +01:00
Vladimir 'phcoder' Serbinenko
cc4fddf5f5
* grub-core/io/bufio.c (grub_bufio_read): Fix handling of corner cases.
2011-12-25 15:43:15 +01:00
Vladimir 'phcoder' Serbinenko
bbc47747ad
* docs/grub.texi (Filesystems): Mention AFS.
2011-12-25 15:40:43 +01:00
Vladimir 'phcoder' Serbinenko
f63d6bf4a1
* docs/grub.texi (Filesystems): Clarify restrictions.
...
(Regexp): Mention non-Unicode regexp behaviour.
(Other): Mention non-Unicode matching behaviour.
2011-12-25 14:46:44 +01:00
Vladimir 'phcoder' Serbinenko
74bbf0dbae
Make HFS implementation use MacRoman.
...
* grub-core/fs/hfs.c (MAX_UTF8_PER_MAC_ROMAN): New define.
(macroman): New const array.
(macroman_to_utf8): New function.
(utf8_to_macroman): Likewise.
(grub_hfs_find_dir): Use utf8_to_macroman.
(grub_hfs_dir): Use macroman_to_utf8.
Set case_insensitive.
2011-12-24 20:20:41 +01:00
Vladimir 'phcoder' Serbinenko
4ea0316e67
* docs/grub.texi (Filesystems): Add IEEE1275 full-path example.
2011-12-24 15:38:53 +01:00
Vladimir 'phcoder' Serbinenko
d3c13cbd62
Integrate hints into autogeneration scripts.
...
* docs/grub.texi (Filesystems): Add a hostdisk example.
* Makefile.util.def (grub-mkdevicemap): Remove ofpath.
(grub-probe): Add ofpath.
* gentpl.py: Remove group nosparc64.
* grub-core/commands/search.c (cache_entry): New struct.
(cache): New var.
(FUNC_NAME): Use and save cache. Fix handling of trailing comma.
* grub-core/commands/search_wrap.c (options): Add platform-specific
hint options.
(grub_cmd_search): Handle platform-specific hints.
(GRUB_MOD_INIT): Declare grub_cmd_search as accept_dash.
* grub-core/kern/emu/hostdisk.c (map): New field device_map.
(grub_util_biosdisk_data): Likewise.
(grub_util_biosdisk_open): Set device_map.
(read_device_map): Handle "" as indication of no map.
Set device_map.
(find_system_device): Add hostdisk/ prefix for autogenerated entries.
(grub_util_biosdisk_get_compatibility_hint): New function.
* grub-core/normal/main.c (features): Add feature_platform_search_hint.
* include/grub/emu/hostdisk.h
(grub_util_biosdisk_get_compatibility_hint): New proto.
* util/grub-install.in: Don't call grub-mkdevicemap.
Add platform-specific hint to load.cfg.
* util/grub-mkconfig.in: Don't call grub-mkdevicemap.
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Add
hints. Set root preliminary to compatibility hint, not to OS name.
* util/grub-probe.c (PRINT_*): Add hints.
(print): Make static.
(escape_of_path): New function.
(guess_bios_drive): Likewise.
(guess_efi_drive): Likewise.
(guess_baremetal_drive): Likewise.
(print_full_name): Likewise.
(probe): Handle hints.
(main): Likewise.
* util/ieee1275/devicemap.c: Removed.
* util/ieee1275/ofpath.c (find_obppath): Allow to fail. All users
updated.
(grub_util_devname_to_ofpath): Return NULL on failure.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev): Fix
resource leak.
* util/getroot.c (grub_util_pull_device): Fix memory leak.
* po/POTFILES.in: Regenerated.
Allow purely long options
* grub-core/lib/arg.c (SHORT_ARG_HELP): Removed.
(SHORT_ARG_USAGE): Likewise.
(grub_arg_show_help): Compare opt with help_options.
(parse_option): Receive opt as argument. If makes big simplificatons.
All users updated
2011-12-24 15:09:26 +01:00
Vladimir 'phcoder' Serbinenko
00ce2df3d4
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN):
...
Restructure to avoid warning.
2011-12-24 13:12:01 +01:00
Vladimir 'phcoder' Serbinenko
e77e325f6f
* util/grub-install.in: Account for possible escaped comma in device
...
name.
2011-12-24 02:50:30 +01:00
Vladimir 'phcoder' Serbinenko
165099ea42
* util/ieee1275/ofpath.c (of_path_of_ide): Fix address for secondary
...
channel.
2011-12-24 02:46:47 +01:00
Vladimir 'phcoder' Serbinenko
ce4a999d4d
* grub-core/kern/ieee1275/openfw.c (grub_devalias_iterate): Fix
...
allocation and zero-setting.
(grub_ieee1275_get_devname): Check that alias is complete.
2011-12-24 02:45:17 +01:00
Vladimir 'phcoder' Serbinenko
379586ad7d
* grub-core/kern/disk.c (grub_disk_read): Fix hook calling for
...
unaligned segments.
2011-12-24 02:43:21 +01:00
Vladimir 'phcoder' Serbinenko
9197b0ade5
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Add ieee1275/
...
prefix.
(grub_ofdisk_open): Check and discard ieee1275 prefix.
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Add ieee1275 prefix.
2011-12-24 02:40:18 +01:00
Vladimir 'phcoder' Serbinenko
edddb7f9b2
* docs/grub.texi (Filesystems): Update.
2011-12-23 17:05:36 +01:00
Vladimir 'phcoder' Serbinenko
a1a8b1b90a
Support odc, newc and bigendian cpio formats.
...
* Makefile.util.def (libgrubmods): Add odc.c, newc.c and cpio_be.c.
* grub-core/Makefile.core.def (newc): New module.
(odc): Likewise.
(cpio_be): Likewise.
* grub-core/fs/cpio.c (ALIGN_CPIO): New macro.
(MAGIC): Likewise.
(MAGIC2): Likewise.
(head) [MODE_ODC]: Adapt for the format.
(head) [MODE_NEWC]: Likewise.
(head) [!MODE_*]: Write fields of interest as arrays.
(MAGIC_USTAR): Removed.
(read_number) [MODE_NEWC]: Change to hex.
(read_number) [!MODE_*]: Parse binary arrays.
(grub_cpio_find_file): Factor out the code for better structure and
always use read_number.
(grub_cpio_mount): Use MAGIC and MAGIC2.
(grub_cpio_dir): Exit on first hook non-0 return.
(grub_cpio_fs) [MODE_ODC]: Set name to odc.
(grub_cpio_fs) [MODE_NEWC]: Set name to newc.
(GRUB_MOD_INIT) [MODE_ODC]: Set name to odc.
(GRUB_MOD_INIT) [MODE_NEWC]: Set name to newc.
(GRUB_MOD_FINI) [MODE_ODC]: Set name to odc.
(GRUB_MOD_FINI) [MODE_NEWC]: Set name to newc.
* grub-core/fs/newc.c: New file.
* grub-core/fs/odc.c: Likewise.
* grub-core/fs/cpio_be.c: Likewise.
2011-12-23 16:15:18 +01:00
Vladimir 'phcoder' Serbinenko
58eba9eec7
Fix handling of tar numbers occupying the whole field.
...
* grub-core/fs/cpio.c (read_number): New function.
(grub_cpio_find_file): Use read_number instead of strtoull.
2011-12-23 14:11:31 +01:00
Vladimir 'phcoder' Serbinenko
a54a0e1270
* grub-core/fs/cpio.c (grub_cpio_find_file): Fix handling of names
...
occupying the whole field size.
2011-12-23 13:38:21 +01:00
Lukas Anzinger
a6120aca2e
* util/grub-mkconfig_lib.in (version_test_gt): Fix variable names.
2011-12-23 12:01:25 +01:00
Vladimir 'phcoder' Serbinenko
a93964ce11
* grub-core/net/net.c (grub_cmd_delroute): Add missing out condition.
2011-12-23 11:54:08 +01:00
Seth Goldberg
3ea1ca46c1
* grub-core/Makefile.core.def (lzma_decompress): Add missing
...
TARGET_IMG_LDFLAGS.
2011-12-23 11:39:30 +01:00
Vladimir 'phcoder' Serbinenko
b87f7ef26b
* util/getroot.c (ESCAPED_PATH_MAX): New define.
...
(mountinfo_entry): Increase the field size to take escaping into
account.
(find_root_device_from_libzfs): Add one byte to size of strings for
security.
2011-12-23 11:36:31 +01:00
Vladimir 'phcoder' Serbinenko
6209239517
missing ChangeLog
2011-12-23 10:24:08 +01:00
Vladimir 'phcoder' Serbinenko
1f0b1a7730
* grub-core/boot/i386/pc/startup_raw.S: Add missing argument for
...
_LzmaDecodeA.
2011-12-23 10:21:27 +01:00
Vladimir 'phcoder' Serbinenko
8eba9997db
* docs/grub.texi (Internationalisation): New section.
2011-12-22 20:55:55 +01:00
Vladimir 'phcoder' Serbinenko
dd0c91e98e
* docs/grub.texi (Loopback booting): New section.
2011-12-22 17:43:51 +01:00
Keshav P R
86717cbe08
* util/grub-mkstandalone.in: Fix minor typo errors.
2011-12-22 13:05:19 +01:00
Vladimir 'phcoder' Serbinenko
198e150aaf
IPv6, TCP, HTTP, ICMP and DNS support. Several cleanups and bugfixes.
...
* grub-core/Makefile.core.def (net): Add net/dns.c, net/tcp.c,
net/icmp.c and net/icmp6.c.
(http): New module.
(priority_queue): Likewise.
* grub-core/io/bufio.c: Rewritten.
* grub-core/lib/legacy_parse.c (legacy_command): New argument type
TYPE_WITH_CONFIGFILE_OPTION.
(legacy_commands): Add bootp and dhcp.
(is_option): Handle TYPE_WITH_CONFIGFILE_OPTION.
(grub_legacy_parse): Likewise.
* grub-core/lib/priority_queue.c: New file.
* grub-core/net/arp.c: Add missing license header.
(arp_find_entry): Removed.
(arp_find_entry): Likewise.
(grub_net_arp_resolve): Rename to ...
(grub_net_arp_send_request): ...this.
(grub_net_arp_receive): New card argument.
* grub-core/net/bootp.c (parse_dhcp_vendor): Clean up.
Set router and DNS server.
(grub_net_configure_by_dhcp_ack): Handle routing information.
(grub_cmd_bootp): Set checksum.
(grub_bootp_init): Remove net_dhcp.
* grub-core/net/dns.c: New file.
* grub-core/net/drivers/efi/efinet.c (send_card_buffer): Wait for
completion.
(get_card_packet): Handle allocation.
(grub_efinet_findcards): Set mtu.
* grub-core/net/drivers/emu/emunet.c: Add missing license header.
(get_card_packet): Handle allocation.
(emucard): Set mtu.
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Handle allocation
(GRUB_MOD_INIT): Set mtu.
* grub-core/net/drivers/ieee1275/ofnet.c (grub_ofnetcard_data): Remove
mtu.
(get_card_packet): Handle allocation.
(grub_ofnet_findcards): Set mtu.
* grub-core/net/ethernet.c (send_ethernet_packet): Add compile time
assert.
(grub_net_recv_ethernet_packet): Handle IPv6.
* grub-core/net/http.c: New file.
* grub-core/net/icmp.c: Likewise.
* grub-core/net/icmp6.c: Likewise.
* grub-core/net/ip.c (ip6addr): New type.
(ip6hdr): Likewise.
(reassemble): Likewise.
(cmp): New function.
(reassembles): New variable.
(grub_net_ip_chksum): Handle 0xffff sum and unaligned buffers.
(id): New variable.
(send_fragmented): New function.
(grub_net_send_ip_packet): Rename to ...
(grub_net_send_ip4_packet): ... this. Send fragmented if needed.
Handle non-UDP.
(grub_net_recv_ip_packets): Rename to ...
(handle_dgram): ... this. Check checksum. Handle non-UDP.
(free_rsm): New function.
(free_old_fragments): Likewise.
(grub_net_recv_ip4_packets): New function.
(grub_net_send_ip6_packet): Likewise.
(grub_net_send_ip_packet): Likewise.
(grub_net_recv_ip6_packets): Likewise.
(grub_net_recv_ip_packets): Likewise.
* grub-core/net/net.c (grub_net_link_layer_entry): New struct.
(LINK_LAYER_CACHE_SIZE): New const.
(link_layer_find_entry): New function.
(grub_net_link_layer_add_address): Likewise.
(grub_net_link_layer_resolve_check): Likewise.
(grub_net_link_layer_resolve): Likewise.
(grub_net_ipv6_get_slaac): Likewise.
(grub_net_ipv6_get_link_local): Likewise.
(grub_cmd_ipv6_autoconf): Likewise.
(parse_ip): Handle one number representation.
(parse_ip6): New functoion.
(match_net): Handle IPv6.
(grub_net_resolve_address): Handle IPv6 and DNS.
(grub_net_resolve_net_address): Handle IPv6.
(route_cmp): New function.
(grub_net_route_address): Find best route.
(grub_net_addr_to_str): Handle IPv6.
(grub_net_addr_cmp): New function.
(grub_net_add_addr): Register local route.
(print_net_address): Handle net address.
(grub_net_poll_cards): Retransmit TCP.
(grub_net_poll_cards_idle_real): Likewise.
(have_ahead): New function.
(grub_net_seek_real): Use underlying seek.
(GRUB_MOD_INIT): Register net_ipv6_autoconf and init dns.
* grub-core/net/tcp.c: New file.
* grub-core/net/tftp.c (tftp_data): Add priority_queue.
(cmp): New function.
(ack): Likewise.
(tftp_receive): Handle unordered input.
(destroy_pq): New function.
(tftp_close): Close pq.
* grub-core/net/udp.c: Put missing license header.
(grub_net_udp_socket): New function.
(udp_socket_register): Likewise.
(grub_net_udp_close): Likewise.
(grub_net_recv_udp_packet): Check checksum.
* include/grub/efi/api.h (grub_efi_simple_network): Add status.
* include/grub/misc.h (grub_memchr): New function.
* include/grub/net.h (GRUB_NET_*_SIZE): New enum.
(grub_net_card_driver): Return buf in recv.
(grub_net_slaac_mac_list): New struct.
(grub_network_level_protocol_id): Add ipv6.
(grub_net_network_level_addr): Likewise.
(grub_net_network_level_net_addr): Likewise.
(grub_net_app_protocol): Add seek.
(grub_net_socket): Removed.
(grub_net_sockets): Likewise.
(grub_net_socket_register): Likewise.
(grub_net_socket_unregister): Likewise.
(FOR_NET_SOCKETS): Likewise.
(grub_net_add_addr): Add const.
(GRUB_NET_BOOTP_*): New enum.
(grub_net_addr_cmp): New proto.
(GRUB_NET_MAX_STR_ADDR_LEN): Take IPV6 into account.
(GRUB_NET_MAX_STR_HWADDR_LEN): New define.
(grub_net_hwaddr_to_str): NEw proto.
(FOR_NET_NETWORK_LEVEL_INTERFACES): New macro.
(FOR_NET_NETWORK_LEVEL_INTERFACES_SAFE): Handle NULL.
(grub_dns_init): New proto.
(grub_dns_fini): Likewise.
(grub_net_tcp_retransmit): Likewise.
(grub_net_link_layer_add_address): Likewise.
(grub_net_link_layer_resolve_check): Likewise.
(grub_net_link_layer_resolve): Likewise.
(grub_net_dns_lookup): Likewise.
(grub_net_add_dns_server): Likewise.
(grub_net_remove_dns_server): Likewise.
(GRUB_NET_TRIES): New const.
(GRUB_NET_INTERVAL): Likewise.
* include/grub/net/arp.h: Mostly rewritten.
* include/grub/net/ethernet.h (grub_net_ethertype_t): New enum.
* include/grub/net/ip.h: Mostly rewritten.
* include/grub/net/netbuff.h: Indent.
* include/grub/net/tcp.h: New file.
* include/grub/net/udp.h: Mostly rewritten.
* include/grub/priority_queue.h: New file.
* include/grub/types.h (PRIdGRUB_SSIZE): New define.
(grub_swap_bytes64_compile_time): Likewise.
(grub_cpu_to_be16_compile_time): Likewise.
(grub_cpu_to_be32_compile_time): Likewise.
(grub_cpu_to_be64_compile_time): Likewise.
(grub_be_to_cpu64_compile_time): Likewise.
2011-12-20 18:17:07 +01:00