FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Understand and learn to use the IFREQ structure in Linux

     

    Prototype: / * * Interface request structure used for socket * Ioctl's. All interface ioctl's must have parameter * Definitions which begin with ifr_name. The * Remainder may be interface specific. * / struct ifreq { #define IFHWADDRLEN 6 union { char ifrn_name [IFNAMSIZ]; / * if name, e.g. "en0" * / } Ifr_ifrn; Be union { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; struct sockaddr ifru_netmask; struct sockaddr ifru_hwaddr; short ifru_flags; int ifru_ivalue; int ifru_mtu; struct ifmap ifru_map; char ifru_slave [IFNAMSIZ]; / * Just fits the size * / char ifru_newname [IFNAMSIZ]; void __user * ifru_data; struct if_setTIngs ifru_setTIngs; } Ifr_ifru; } #define ifr_name ifr_ifrn.ifrn_name / * interface name * / #define ifr_hwaddr ifr_ifru.ifru_hwaddr / * MAC address * / #define ifr_addr ifr_ifru.ifru_addr / * address * / #define ifr_dstaddr ifr_ifru.ifru_dstaddr / * other end of p-p lnk * / #define ifr_broadaddr ifr_ifru.ifru_broadaddr / * broadcast address * / #define ifr_netmask ifr_ifru.ifru_netmask / * interface net mask * / #define ifr_flags ifr_ifru.ifru_flags / * flags * / #define ifr_metric ifr_ifru.ifru_ivalue / * metric * / #define ifr_mtu ifr_ifru.ifru_mtu / * mtu * / #define ifr_map ifr_ifru.ifru_map / * device map * / #define ifr_slave ifr_ifru.ifru_slave / * slave device * / #define ifr_data ifr_ifru.ifru_data / * for use by interface * / #define ifr_ifindex ifr_ifru.ifru_ivalue / * interface index * / #define ifr_bandwidth ifr_ifru.ifru_ivalue / * link bandwidth * / #define ifr_qlen ifr_ifru.ifru_ivalue / * Queue length * / #define ifr_newname ifr_ifru.ifru_newname / * New name * / #define ifr_setTIngs ifr_ifru.ifru_setTIngs / * Device / proto settings * / basic introduction: The IFREQ structure is defined in /usr/include/net/IF.h, configuring an IP address, activating interface, configuring an interface information such as an MTU. It contains an interface name and specific content - (is a common body, it is possible to be an IP address, broadcast address, subnet mask, MAC number, MTU, or other content). ifconf ifreq contained in the structure. The ifconf structures are often used to store all the information interfaces. for example: In the Linux system, the ifconfig command via ioctl interface to communicate with the kernel, e.g., when the system administrator to enter the following command to change the interface eth0 MTU size: ifconfig eth0 mtu 1250 First ifconfig command to open a socket, and initializes a data structure parameters of the system administrator through the input and transmits the data to the kernel via ioctl calls. SIOCSIFMTU is the command identifier. struct ifreq data; fd = socket (PF_INET, SOCK_DGRAM, 0); < ... initialize "data" .... 1882. err = ioctl (fd, SIOCSIFMTU, & data) ;, Read

     

     

     

     

    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