FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    NET_DEVICE structure and related operational functions of network drive transplantation

     

    "In Linux system, network devices are abstracted as struct net_ Device structure. It is the interface between network device hardware and upper layer protocol. Understanding it is very useful for writing network driver. Therefore, this paper will start to briefly introduce struct net in linux-2.6.38.8/include/linux/netdevice. H file_ All members of the device structure (not in the order they are defined). 1. Network device related information (1) . equipment name [cpp] view plain copy char name[IFNAMSIZ]; char * ifalias; // For SNMP protocol In Linux system, each network device has a unique device name (for example, eth0, the letter part represents the type of network device, and the number part represents the number of such network devices). (2) . power management service quality( power managementQuality Of Service) [cpp] view plain copy struct pm_ qos_ request_ list pm_ qos_ req; For Wi Fi and Gigabit Ethernet, it can help control the delay and bandwidth requirements of the network, so as to save power on the premise of availability. (3) . hardware information [cpp] view plain copy //Memory area in the host when network device memory is mapped unsigned long mem_ end; unsigned long mem_ start; //Network device I / O base address unsigned long base_ addr; //Interrupt number unsigned int irq; //For transmission media, such as twisted pair, coaxial cable, etc., specify which port to use in multi port equipment unsigned char if_ port; /* if_ Possible values of port are as follows: enum { IF_ PORT_ UNKNOWN = 0 IF_ PORT_ 10BASE2, IF_ PORT_ 10BASET, IF_ PORT_ AUI, IF_ PORT_ 100BASET, IF_ PORT_ 100BASETX, IF_ PORT_ 100BASEFX }; **/ // DMA channel unsigned char dma; //The maximum transmission unit, the maximum Ethernet data frame is 1500 bytes unsigned int mtu; //Hardware type of network equipment, such as 10Mbps Ethernet arphrd_ ETHER unsigned short type; //The length of hardware data frame header is 14 bytes for Ethernet unsigned short hard_ header_ len; //Broadcast address unsigned char broadcast[MAX_ ADDR_ LEN]; //Hardware (such as MAC) address length and hardware address of the device unsigned char addr_ len; unsigned char * dev_ addr; unsigned char perm_ addr[MAX_ ADDR_ LEN]; unsigned char addr_ assign_ type; (4) , identifier [cpp] view plain copy int ifindex; // Unique index number identifying the network device int iflink; // For virtual network devices unsigned short dev_ id; // For sharing network devices (5) . length of reserved space when allocating socket buffer [cpp] view plain copy unsigned short needed_ headroom; unsigned short needed_ tailroom; (6) . output network device information in sysfs file system [cpp] view plain copy struct device dev; const struct attribute_ group * sysfs_ groups[4]; (7) . linked list of network equipment [cpp] view plain copy //Hash linked list of network devices with device name as keyword struct hlist_ node name_ hlist; //Network equipment linked list struct list_ head dev_ list; //Linked list of network devices supporting NaPi transmission struct list_ head napi_ list; //Linked list of unregistered network devices struct list_ head unreg_ list; //A linked list of network device hardware addresses struct netdev_ hw_ addr_ list dev_ addrs; /* n-tuple filter list attached to this device */ struct ethtool_ rx_ ntuple_ list ethtool_ ntuple_ list; //Unicast address list struct netdev_ hw_ addr_ list uc; //Multicast address list struct netdev_ hw_ addr_ list mc; //Spin lock for preventing unicast address linked list and multicast address linked list from being accessed concurrently spinlock_ t addr_ list_ lock; //Listen to all multicast addresses unsigned int allmulti; //Linked list of network devices with delayed registration / logout struct list_ head todo_ list; //Hash linked list of network devices with index number as keyword struct hlist_ node index_ hlist; //Link view mechanism list struct list_ head link_ watch_ list; (8) Hybrid mode [cpp] view plain copy //Number of unicast addresses in hybrid mode int uc_ promisc; //Hybrid mode counter unsigned int promiscuity; (9) Network layer protocol specific data [cpp] view plain copy struct vlan_ group __ rcu * vlgrp; /* VLAN group */ void * dsa_ ptr; /* dsa specific data */ void * atalk_ ptr; /* AppleTalk link */ struct in_ device __ rcu * ip_ ptr; /* IPv4 specific data */ struct dn_ dev __ rcu * dn_ ptr; /* DECnet specific data */ struct inet6_ dev __ rcu * ip6_ ptr; /* IPv6 specific data */ void * ec_ ptr; /* Econet specific data */ void * ax25_ ptr; /* AX.25 specific data */ struct wireless_ dev * ieee80211_ ptr; /* IEEE eight hundred and two point one one specific data, assign before registering */ (10) . functional characteristics of equipment hardware [cpp] view plain copy unsigned long features; // The possible values of features are as follows: #define NETIF_ F_ SG one /* Scatter/gather IO. */ #define NETIF_ F_ IP_ CSUM two /* Can checksum TCP/UDP over IPv4. */ #define NETIF_ F_ NO_ CSUM four /* Does not require checksum. F.e. loopack. */ #define NETIF_ F_ HW_ CSUM eight /* Can checksum all the packets. */ #define NETIF_ F_ IPV6_ CSUM sixteen /* Can checksum TCP/UDP over IPV6 */ #define NETIF_ F_ HIGHDMA thirty-two /* Can DMA to high memory. */ #define NETIF_ F_ FRAGLIST sixty-four /* Scatter/gather IO. */ #define NETIF_ F_ HW_ VLAN_ TX one hundred and twenty-eight /* Transmit VLAN hw acceleration */ #define NETIF_ F_ HW_ VLAN_ RX two hundred and fifty-six /* Receive VLAN hw acceleration */ #define NETIF_ F_ HW_ VLAN_ FILTER five hundred and twelve /* Receive filtering on VLAN */ #define NETIF_ F_ VLAN_ CHALLENGED one thousand and twenty-four /* Device cannot handle VLAN packets */ #define NETIF_ F_ GSO two thousand and forty-eight /* Enable software GSO. */ #define NETIF_ F_ LLTX four thousand and ninety-six /* LockLess TX - deprecated. Please */ /* do not use LLTX in new drivers */ #define NETIF_ F_ NETNS_ LOCAL eight thousand one hundred and ninety-two /* Does not change network namespaces */ #define NETIF_ F_ GRO sixteen thousand three hundred and eighty-four /* Generic receive offload */ #define NETIF_ F_ LRO thirty-two thousand seven hundred and sixty-eight /* large receive offload */ #define NETIF_ F_ FCOE_ CRC ( one << 24) /* FCoE CRC32 */ #define NETIF_ F_ SCTP_ CSUM ( one << 25) /* SCTP checksum offload */ #define NETIF_ F_ FCOE_ MTU ( one << 26) /* Supports max FCoE MTU, two thousand one hundred and fifty-eight bytes*/ #define NETIF_ F_ NTUPLE ( one << 27) /* N-tuple filters supported */ #define NETIF_ F_ RXHASH ( one << 28) /* Rece

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us