Intel PCI-X user manual Ioctl Command SUB-TYPES

Page 46

GigMAC-PMC and PCI

 

GigPMC Switch

Board and Driver Users Manual

A. Opening a socket for management API

int s;

s = socket (PF_INET, SOCK_STREAM, 0);

B. Create request block for driver ioctl

struct ifreq ifr; int subCmd; NpkUserCtl myIoc;

char myDataBuf[MAX_LINES * MAX_LINE_LEN];

/* set interface name */ strcpy (ifr.ifr_name, “eth1”);

/* set ioctl sub-type */ subCmd = DM_IOCTL_GET_STATS;

/* set command argument */ myIoc.arg1 = 0;

myIoc.dataItm = (u_int) myDataBuf; ifr.ifr_data = (char *) &myIoc;

C. Issue ioctl command

/* issue ioctl to network driver */

err = ioctl (s, SIOCDEVPRIVATE + subCmd, &ifr);

D. Check and print results

if (err < 0)

{

/* perror (errno); */ usage ();

exit (1);

}

if (subCmd == DM_IOCTL_GET_TRC)

{

print_trace();

}

else

{

if ((subCmd != DM_IOCTL_SET_LOOP_MODE) &&

(subCmd != DM_IOCTL_PROG_EEPROM)) printf ("\n%s\n", myDataBuf);

}

IOCTL COMMAND SUB-TYPES

DSS NETWORKS, INC.

Version: 2.6

Page: 46

Image 46
Contents DSS Networks SeptGigMAC-PMC and PCI GigPMC Switch Environmental Specifications See Also IntroductionCompatibility PCI-Express models Model NumbersPMC models PCI-X modelsKEY Features Switch Capabilities Models 5468/6468 OEM Developer KIT ContentsGigMAC-PMC and PCI GigPMC Switch System Requirements Wind RiverHardware Information 6.1 Board Photos DSS NETWORKS, INC Link LNK Indicator Board LED IndicatorsTransmit and Receive Activity Indicators Transmit activity Receive activity‰ TBD PMC Connector PIN/SIGNAL Definitions PMC Connectors Pin Assignments Pn1/Jn1 32 Bit PCIPn2/Jn2 32 Bit PCI Pn3/Jn3 32 Bit PCI Pn4/Jn4 optional I/O Model 5468 only PCI Configuration Registers Eeprom Listings Vendor and Device IDSModel Model 5262-RJ Default Register Settings GigMAC-PMC and PCI GigPMC Switch Hardware Installation Power Consumption SpecsEthernet Frame Latency Installation in PC Computer Embedded or Compact PCI InstallationCopper Cabling and Connector Info Fiber Cable Specifications Copper RJ-45 Connector and Cable Linux Driver Installation and Usage Software Driver InstallationBuilding the driver Installing the driver Sample MODULES.CONF File Tuning the Installation ‘Insmod’ Command Line Parameters Parameter Name Valid Default Description Range/SettingsSuggested basic verifications to be run Edit Makefile Un-comment the following define Vxworks Driver Installation and Usage Using dmUtil dpm driver utilityVxWorks usage PCI Registers Show Function MAC Registers Show Function Unit 0, ioAddr 40020000, mac regsMAC Statistics Show Function GigMAC-PMC and PCI GigPMC Switch PHY Registers Show Function Eeprom Show Function MAC Address Show Function Buffer Descriptor Status Show FunctionStarting Frame Generator Stopping Frame GeneratorSwitch Status Show Function DPM Driver Management APIIoctl Command SUB-TYPES Switch Configuration / Management API Functions to reset and initialize switchFunctions to read and write registers in the switch Testing and Verification Specifications Environmental Standards Compliance pending Environmental RangeStandards Compliance GigMAC-PMC and PCI GigPMC Switch Environmental Specifications Technical Support and Warranty Warrantee and Support Info
Related manuals
Manual 406 pages 21.68 Kb