net.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/if.h>
#include <linux/sockios.h>
#include <linux/ethtool.h>
#include <linux/if_arp.h>
#include "hd.h"
#include "hd_int.h"
#include "net.h"

Defines

#define u8   uint8_t
#define u16   uint16_t
#define u32   uint32_t
#define u64   uint64_t

Functions

static void get_driverinfo (hd_data_t *hd_data, hd_t *hd)
static void get_linkstate (hd_data_t *hd_data, hd_t *hd)
static void add_xpnet (hd_data_t *hdata)
static void add_uml (hd_data_t *hdata)
static void add_kma (hd_data_t *hdata)
static void add_if_name (hd_t *hd_card, hd_t *hd)
void hd_scan_net (hd_data_t *hd_data)

Define Documentation

#define u16   uint16_t

Referenced by aaa_word(), aad_word(), aam_word(), aas_word(), adc_word(), add_word(), and_word(), deb_inw(), dec_word(), decode_rm10_address(), div_word(), emu_vm86(), fetch_data_byte(), fetch_data_long(), fetch_data_word(), fetch_word_imm(), idiv_word(), imul_word(), inc_word(), Mem_rw(), Mem_ww(), mul_byte(), mul_word(), neg_word(), or_word(), pop_word(), rcl_word(), rcr_word(), rdw(), rol_word(), ror_word(), sar_word(), sbb_word(), shl_word(), shld_word(), shr_word(), shrd_word(), store_data_byte(), store_data_long(), store_data_word(), sub_word(), wrw(), x86emu_intr_handle(), X86EMU_prepareForInt(), x86emuOp2_bsf(), x86emuOp2_bsr(), x86emuOp2_bt_R(), x86emuOp2_btc_R(), x86emuOp2_btr_R(), x86emuOp2_btX_I(), x86emuOp2_imul_R_RM(), x86emuOp2_lfs_R_IMM(), x86emuOp2_lgs_R_IMM(), x86emuOp2_long_jump(), x86emuOp2_lss_R_IMM(), x86emuOp2_movsx_byte_R_RM(), x86emuOp2_movsx_word_R_RM(), x86emuOp2_movzx_byte_R_RM(), x86emuOp2_movzx_word_R_RM(), x86emuOp2_opc_01(), x86emuOp2_shld_CL(), x86emuOp2_shld_IMM(), x86emuOp2_shrd_CL(), x86emuOp2_shrd_IMM(), x86emuOp_adc_word_AX_IMM(), x86emuOp_adc_word_R_RM(), x86emuOp_adc_word_RM_R(), x86emuOp_add_word_AX_IMM(), x86emuOp_add_word_R_RM(), x86emuOp_add_word_RM_R(), x86emuOp_and_word_AX_IMM(), x86emuOp_and_word_R_RM(), x86emuOp_and_word_RM_R(), x86emuOp_call_far_IMM(), x86emuOp_call_near_IMM(), x86emuOp_cmp_word_AX_IMM(), x86emuOp_cmp_word_R_RM(), x86emuOp_cmp_word_RM_R(), x86emuOp_cmps_word(), x86emuOp_enter(), x86emuOp_imul_byte_IMM(), x86emuOp_imul_word_IMM(), x86emuOp_int3(), x86emuOp_int_IMM(), x86emuOp_into(), x86emuOp_jcxz(), x86emuOp_jump_byte_IMM(), x86emuOp_jump_far_IMM(), x86emuOp_jump_near_B(), x86emuOp_jump_near_BE(), x86emuOp_jump_near_IMM(), x86emuOp_jump_near_L(), x86emuOp_jump_near_LE(), x86emuOp_jump_near_NB(), x86emuOp_jump_near_NBE(), x86emuOp_jump_near_NL(), x86emuOp_jump_near_NLE(), x86emuOp_jump_near_NO(), x86emuOp_jump_near_NP(), x86emuOp_jump_near_NS(), x86emuOp_jump_near_NZ(), x86emuOp_jump_near_O(), x86emuOp_jump_near_P(), x86emuOp_jump_near_S(), x86emuOp_jump_near_Z(), x86emuOp_lds_R_IMM(), x86emuOp_lea_word_R_M(), x86emuOp_les_R_IMM(), x86emuOp_mov_AL_M_IMM(), x86emuOp_mov_AX_M_IMM(), x86emuOp_mov_M_AL_IMM(), x86emuOp_mov_M_AX_IMM(), x86emuOp_mov_word_AX_IMM(), x86emuOp_mov_word_BP_IMM(), x86emuOp_mov_word_BX_IMM(), x86emuOp_mov_word_CX_IMM(), x86emuOp_mov_word_DI_IMM(), x86emuOp_mov_word_DX_IMM(), x86emuOp_mov_word_R_RM(), x86emuOp_mov_word_RM_IMM(), x86emuOp_mov_word_RM_R(), x86emuOp_mov_word_RM_SR(), x86emuOp_mov_word_SI_IMM(), x86emuOp_mov_word_SP_IMM(), x86emuOp_mov_word_SR_RM(), x86emuOp_movs_word(), x86emuOp_opc81_word_RM_IMM(), x86emuOp_opc83_word_RM_IMM(), x86emuOp_opcC1_word_RM_MEM(), x86emuOp_opcD1_word_RM_1(), x86emuOp_opcD3_word_RM_CL(), x86emuOp_opcF7_word_RM(), x86emuOp_opcFF_word_RM(), x86emuOp_or_word_AX_IMM(), x86emuOp_or_word_R_RM(), x86emuOp_or_word_RM_R(), x86emuOp_pop_RM(), x86emuOp_push_all(), x86emuOp_push_SP(), x86emuOp_push_word_IMM(), x86emuOp_pushf_word(), x86emuOp_ret_far_IMM(), x86emuOp_ret_near_IMM(), x86emuOp_sbb_word_AX_IMM(), x86emuOp_sbb_word_R_RM(), x86emuOp_sbb_word_RM_R(), x86emuOp_scas_word(), x86emuOp_sub_word_AX_IMM(), x86emuOp_sub_word_R_RM(), x86emuOp_sub_word_RM_R(), x86emuOp_test_AX_IMM(), x86emuOp_test_word_RM_R(), x86emuOp_xchg_word_AX_BP(), x86emuOp_xchg_word_AX_BX(), x86emuOp_xchg_word_AX_CX(), x86emuOp_xchg_word_AX_DI(), x86emuOp_xchg_word_AX_DX(), x86emuOp_xchg_word_AX_SI(), x86emuOp_xchg_word_AX_SP(), x86emuOp_xchg_word_RM_R(), x86emuOp_xlat(), x86emuOp_xor_word_AX_IMM(), x86emuOp_xor_word_R_RM(), x86emuOp_xor_word_RM_R(), and xor_word().

#define u32   uint32_t

Referenced by adc_byte(), adc_long(), adc_word(), add_byte(), add_long(), add_word(), and_long(), cmp_byte(), cmp_long(), cmp_word(), daa_byte(), deb_inl(), dec_byte(), dec_long(), dec_word(), decode_rm00_address(), decode_rm10_address(), decode_sib_address(), div_byte(), div_long(), div_word(), emu_vm86(), fetch_byte_imm(), fetch_data_byte_abs(), fetch_data_long_abs(), fetch_data_word_abs(), fetch_decode_modrm(), fetch_long_imm(), fetch_word_imm(), idiv_long(), imul_long_direct(), inc_byte(), inc_long(), inc_word(), ins(), Mem_rl(), Mem_wl(), mul_long(), mul_word(), neg_long(), or_long(), outs(), pop_long(), pop_word(), push_long(), push_word(), rcl_long(), rcr_byte(), rcr_long(), rcr_word(), rdl(), rol_long(), ror_long(), sar_long(), sbb_byte(), sbb_long(), sbb_word(), store_data_byte_abs(), store_data_long_abs(), store_data_word_abs(), sub_byte(), sub_long(), sub_word(), test_byte(), test_long(), test_word(), wrl(), X86EMU_exec(), x86emuOp2_bsf(), x86emuOp2_bsr(), x86emuOp2_bt_R(), x86emuOp2_btc_R(), x86emuOp2_btr_R(), x86emuOp2_btX_I(), x86emuOp2_imul_R_RM(), x86emuOp2_movsx_byte_R_RM(), x86emuOp2_movsx_word_R_RM(), x86emuOp2_movzx_byte_R_RM(), x86emuOp2_movzx_word_R_RM(), x86emuOp2_shld_CL(), x86emuOp2_shld_IMM(), x86emuOp2_shrd_CL(), x86emuOp2_shrd_IMM(), x86emuOp_adc_word_AX_IMM(), x86emuOp_adc_word_R_RM(), x86emuOp_adc_word_RM_R(), x86emuOp_add_word_AX_IMM(), x86emuOp_add_word_R_RM(), x86emuOp_add_word_RM_R(), x86emuOp_and_word_AX_IMM(), x86emuOp_and_word_R_RM(), x86emuOp_and_word_RM_R(), x86emuOp_cmp_word_AX_IMM(), x86emuOp_cmp_word_R_RM(), x86emuOp_cmp_word_RM_R(), x86emuOp_cmps_word(), x86emuOp_imul_byte_IMM(), x86emuOp_imul_word_IMM(), x86emuOp_lods_word(), x86emuOp_mov_word_AX_IMM(), x86emuOp_mov_word_BP_IMM(), x86emuOp_mov_word_BX_IMM(), x86emuOp_mov_word_CX_IMM(), x86emuOp_mov_word_DI_IMM(), x86emuOp_mov_word_DX_IMM(), x86emuOp_mov_word_R_RM(), x86emuOp_mov_word_RM_IMM(), x86emuOp_mov_word_RM_R(), x86emuOp_mov_word_SI_IMM(), x86emuOp_mov_word_SP_IMM(), x86emuOp_movs_byte(), x86emuOp_movs_word(), x86emuOp_opc81_word_RM_IMM(), x86emuOp_opc83_word_RM_IMM(), x86emuOp_opcC1_word_RM_MEM(), x86emuOp_opcD1_word_RM_1(), x86emuOp_opcD3_word_RM_CL(), x86emuOp_opcF7_word_RM(), x86emuOp_opcFF_word_RM(), x86emuOp_or_word_AX_IMM(), x86emuOp_or_word_R_RM(), x86emuOp_or_word_RM_R(), x86emuOp_pop_RM(), x86emuOp_push_all(), x86emuOp_push_word_IMM(), x86emuOp_pushf_word(), x86emuOp_sbb_word_AX_IMM(), x86emuOp_sbb_word_R_RM(), x86emuOp_sbb_word_RM_R(), x86emuOp_scas_word(), x86emuOp_stos_word(), x86emuOp_sub_word_AX_IMM(), x86emuOp_sub_word_R_RM(), x86emuOp_sub_word_RM_R(), x86emuOp_test_AX_IMM(), x86emuOp_test_word_RM_R(), x86emuOp_two_byte(), x86emuOp_xchg_word_AX_BP(), x86emuOp_xchg_word_AX_BX(), x86emuOp_xchg_word_AX_CX(), x86emuOp_xchg_word_AX_DI(), x86emuOp_xchg_word_AX_DX(), x86emuOp_xchg_word_AX_SI(), x86emuOp_xchg_word_AX_SP(), x86emuOp_xchg_word_RM_R(), x86emuOp_xor_word_AX_IMM(), x86emuOp_xor_word_R_RM(), x86emuOp_xor_word_RM_R(), and xor_long().

#define u64   uint64_t
#define u8   uint8_t

Referenced by aad_word(), adc_byte(), add_byte(), and_byte(), daa_byte(), deb_inb(), dec_byte(), div_byte(), emu_vm86(), fetch_byte_imm(), inc_byte(), Mem_rb(), Mem_wb(), neg_byte(), or_byte(), rcl_byte(), rcr_byte(), rdb(), rdl(), rdw(), rol_byte(), ror_byte(), sar_byte(), sbb_byte(), shl_byte(), shr_byte(), sub_byte(), wrb(), wrl(), wrw(), X86EMU_exec(), x86emu_intr_handle(), x86emuOp2_btX_I(), x86emuOp2_movsx_byte_R_RM(), x86emuOp2_movzx_byte_R_RM(), x86emuOp2_set_byte(), x86emuOp2_shld_IMM(), x86emuOp2_shrd_IMM(), x86emuOp_aad(), x86emuOp_aam(), x86emuOp_adc_byte_AL_IMM(), x86emuOp_adc_byte_R_RM(), x86emuOp_adc_byte_RM_R(), x86emuOp_add_byte_AL_IMM(), x86emuOp_add_byte_R_RM(), x86emuOp_add_byte_RM_R(), x86emuOp_and_byte_AL_IMM(), x86emuOp_and_byte_R_RM(), x86emuOp_and_byte_RM_R(), x86emuOp_cmp_byte_AL_IMM(), x86emuOp_cmp_byte_R_RM(), x86emuOp_cmp_byte_RM_R(), x86emuOp_enter(), x86emuOp_esc_coprocess_d9(), x86emuOp_esc_coprocess_da(), x86emuOp_esc_coprocess_dc(), x86emuOp_esc_coprocess_dd(), x86emuOp_esc_coprocess_de(), x86emuOp_esc_coprocess_df(), x86emuOp_in_byte_AL_IMM(), x86emuOp_in_word_AX_IMM(), x86emuOp_int_IMM(), x86emuOp_lahf(), x86emuOp_mov_byte_AH_IMM(), x86emuOp_mov_byte_AL_IMM(), x86emuOp_mov_byte_BH_IMM(), x86emuOp_mov_byte_BL_IMM(), x86emuOp_mov_byte_CH_IMM(), x86emuOp_mov_byte_CL_IMM(), x86emuOp_mov_byte_DH_IMM(), x86emuOp_mov_byte_DL_IMM(), x86emuOp_mov_byte_R_RM(), x86emuOp_mov_byte_RM_IMM(), x86emuOp_mov_byte_RM_R(), x86emuOp_movs_byte(), x86emuOp_opc80_byte_RM_IMM(), x86emuOp_opc82_byte_RM_IMM(), x86emuOp_opcC0_byte_RM_MEM(), x86emuOp_opcC1_word_RM_MEM(), x86emuOp_opcD0_byte_RM_1(), x86emuOp_opcD2_byte_RM_CL(), x86emuOp_opcD3_word_RM_CL(), x86emuOp_opcF6_byte_RM(), x86emuOp_opcFE_byte_RM(), x86emuOp_or_byte_AL_IMM(), x86emuOp_or_byte_R_RM(), x86emuOp_or_byte_RM_R(), x86emuOp_out_byte_IMM_AL(), x86emuOp_out_word_IMM_AX(), x86emuOp_sbb_byte_AL_IMM(), x86emuOp_sbb_byte_R_RM(), x86emuOp_sbb_byte_RM_R(), x86emuOp_sub_byte_AL_IMM(), x86emuOp_sub_byte_R_RM(), x86emuOp_sub_byte_RM_R(), x86emuOp_test_AL_IMM(), x86emuOp_test_byte_RM_R(), x86emuOp_two_byte(), x86emuOp_xchg_byte_RM_R(), x86emuOp_xlat(), x86emuOp_xor_byte_AL_IMM(), x86emuOp_xor_byte_R_RM(), x86emuOp_xor_byte_RM_R(), and xor_byte().