How can i find all instances of my device?

Hi,
I was wondering if anyone could tell me I can find all the instances of an ethernet card from a C program. At the moment I use a brute force approach, checking for each physical point of attachment by opening the driver /dev/mydriver and doing a putmsg DL_ATTACH_REQ with ppa= 0,1,2,etc., and checking to see if I get a DL_OK_ACK back.
Is there any more intelligent way to find this out?
Thanks in advance,
S.

Hi,
#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_get_instance(dev_info_t *dip);
ddi_get_instance() returns the instance number of the device corresponding to dip.
The system assigns an instance number to every device. Instance numbers for devices attached to the same driver are unique. This provides a way for the system and the driver to uniquely identify one or more devices of the same type. The instance number is derived by the system from different properties for different device types in an implementation specific manner.
Once an instance number has been assigned to a device, it will remain the same even across reconfigurations and reboots. Therefore, instance numbers seen by a driver may not appear to be in consecutive order. For example, if dev-ice foo0 has been assigned an instance number of 0 and dev-ice foo1 has been assigned an instance number of 1, if
foo0 is removed, foo1 will continue to be associated with instance number 1 (even though foo1 is now the only device of its type on the system).
Refer more information man ddi_get_instance()
Regards,
Senthilkumar
Technical Support Engineer
Developer Technical Support
Sun Microsystems, Inc.
http://www.sun.com/developers/support

Similar Messages

  • How can I find all exclamation marks in my iTunes without clicking on each song?  Is there a way to delete all instead of one at a time?

    How can I find all exclamation marks in my iTunes without clicking on each song?  Can they be deleted all at once instead of one song at a time?

    Lost & Found
    Create a playlist called Found, select everything in Music and drag it into the Found playlist (it may take some time to count the tracks that are to be dropped). Create a smart playlist called Lost matching All the rules Playlist is Music and Playlist is not Found. Your lost tracks will be in this playlist.
    Optional: It depends a bit on why things aren't where iTunes expects to find them but if they are in sensible Artist & Album folders in some common location then my FindTracks script should be able to reconnect them to iTunes. FindTracks uses some fuzzy matching routines and searches for multiple potential locations. For more details see this thread. Once you have repaired the tracks that can be found you can drag the contents of the Lost playlist into Found which will update things.
    Or, you can simply delete all the tracks in the Lost playlist with Ctrl-A to select them and then Shift-Delete to delete.
    tt2

  • How can i find all included pictures which are not in a album? (only in the Library)

    How can i find all included pictures which are not in a album? (only in the Library)

    Hi there,
    I'm afraid I don't quite understand your question. All images are in your Library and only those you specifically select from that Library would be in an Album. What platform are you using? Revel Mac, Elements, web browser, etc?
    Here is a link with some helpful information:
    FAQ: File Basics: How do I Upload, Download, Share, and Delete files in Revel?
    Thank you,
    Glenyse

  • How can i find all included pictures in the Online-Library which are not in a album?

    Hi
    I use Adobe Photoshop Elements 13 with (Revel). My question ist how can i find all included pictures in the Online-Library which are not in a album? I would like only to have pictures in Library which are included in a online album.

    Hi there,
    I'm afraid I don't quite understand your question. All images are in your Library and only those you specifically select from that Library would be in an Album. What platform are you using? Revel Mac, Elements, web browser, etc?
    Here is a link with some helpful information:
    FAQ: File Basics: How do I Upload, Download, Share, and Delete files in Revel?
    Thank you,
    Glenyse

  • How can we find all the available  user-exits in sap without using SMOD?.

    How can we find all the available  user-exits in sap without using SMOD?.

    Hi,
    Please check this links for user exits list.
    http://www.planetsap.com/Userexit_List.htm
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/ab038.htm
    Regards,
    Ferry Lianto

  • How can we find the hostname of the devices connected with the interfaces of switch?

    how can we find the hostname of the devices connected with the interfaces of switch ? I have tried mac address and ARP, there are lot of servers connected with the switch having multiples LAN cards. So mac table shows the mac of physical machine as well as virtual machines. But i want to know only the physical machines. Is there any other method to find out the IP address, hostname of the physical machines only? 

    Hello Leo Laohoo
    Thanks for this information
    In our network most of the Servers are not of Cisco. Some of them are Vmware machines, some are Hyper V machines, etc. 
    Does IP device tracking show us only the IP addresses of the Physical Machines of the Vmware Server not of Virtual Machines?
    Regards
    Mukesh Kumar
    Network Engineer 
    Spooster IT Services

  • QUESTION: How can I locate all instances of a field in mult tables

    Hi all.
    So im just learning Oracle and I have an interesting question.
    I just learned how you can query things from multiple tables by using the tablename.fieldname in the select.
    My question is this. Lets say you have, oh, 100 tables and you have referenced a field like IDNUMBER in ten of the tables.
    Now I want to write a query to pull the ID number from those tables but I dont remember every table I used it in.
    How can you easilly find all instances of where a field is used in multiple tables? Im hoping I explained this right.

    791443 wrote:
    AWESOME!! THANKS!!You should be aware that this solution only works to the degree that columns are consistently named.
    Consider
    CREATE TABLE supplier
    (supplier_id      number       not null,
      supplier_name varchar2(50) not null,
      contact_name      varchar2(50),      
      CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)
    CREATE TABLE purchase_order_hdr
      (purchase_order_id      number not null,
       supplier_number      number not null
       CONSTRAINT fk_supplier
       FOREIGN KEY (supplier_number)
       REFERENCES supplier(supplier_id)
    CREATE TABLE purchase_order_line
      (po_number             number not null,
       po_line_item        number not null,
       vendor_product_code number not null,
       CONSTRAINT fk_supplier
       FOREIGN KEY (supplier_number)
       REFERENCES supplier(supplier_id)
        );So, how do you catch that supplier.supplier_id is the same as purchase_order_hdr.supplier_number or purchase_order_line.po_number is the same as purchase_order_hdr.purchase_order_id?
    No, I don't have a solution, just pointing out that you may not be able to depend on a fully automated solution either. It depend on how rigorous your organization is about enforcing naming standards.

  • How can I find the instances of a subvi programmat​ically

    When one subvi appears for several times in the blockdiagramm, who can I get a ID number for every instance of the subvi?
    When I right-click on the subvi -> "Find all instances" then I get how often the subvi appears on the blockdiagramm but i need the information programmatically.
    Thanks for helping!
    Mathias

    LabVIEW won't let you save "DAsst_mxwScript_Get SubVI Refnums.vi" for a previous version of LabVIEW since its a "toolkit vi" if you try to do this with the "Save with Options" feature. However, LabVIEW *will* let you invoke the "Save for Previous" VI server method on toolkit VIs :-)
    Attached are the VIs saved in LV 6.1
    -Jim
    Attachments:
    Find_All_SubVIs_by_Name-6.1.zip ‏39 KB

  • How can I find all HD movies in iTunes?

    Count me extremely confused by the iTunes movies user interface. Seems like every time I launch it, it's got a different interface.
    1. How do I view a list of all available movies?
    As far as I can tell, I am only able to view movies three ways: 1) Featured, 2) Top Charts, and 3) Genius. None of these is what I want. I simply want to go to a list of all movies available. It would be nice to be able to sort this list by Genre and alphabetically by title. Anyone know how I can do that?
    2. How do I view a list of all HD movies?
    When I entered iTunes today, it was showing me a list of all HD movies. No idea how or why it got into that state. The title bar up top said "All HD movies" (or similar), and there was a "Back" button in the upper left. I clicked "Back" and after reloading it showed me exactly the same UI: I was still looking at a list of "All HD movies". I clicked Back again. Same thing. I then clicked back repeatedly (out of frustration), and it ended me by showing the same less-than-useful UI it usually (but not always) does: "Featured" "Top Charts" and "Genius" buttons up top, and a "Genres" button in the upper left. How do I get back to viewing just a list of "All HD Movies"?
    Bur.

    Lost & Found
    Create a playlist called Found, select everything in Music and drag it into the Found playlist (it may take some time to count the tracks that are to be dropped). Create a smart playlist called Lost matching All the rules Playlist is Music and Playlist is not Found. Your lost tracks will be in this playlist.
    Optional: It depends a bit on why things aren't where iTunes expects to find them but if they are in sensible Artist & Album folders in some common location then my FindTracks script should be able to reconnect them to iTunes. FindTracks uses some fuzzy matching routines and searches for multiple potential locations. For more details see this thread. Once you have repaired the tracks that can be found you can drag the contents of the Lost playlist into Found which will update things.
    Or, you can simply delete all the tracks in the Lost playlist with Ctrl-A to select them and then Shift-Delete to delete.
    tt2

  • How can I find all documents encrypted by a certain application?

    I don't think Spotlight can help with this, so I am trying to use the ordinary Command-F(ind).
    I know there's a parameter option "Created by [application]" but that doesn't work, even though the Info window shows the Kind as this application.
    The specifics:
    Under System 9, I encrypted a lot of files (personal correspondence, mainly) using Sentinel 2.2. In other words, I used Sentinel to require a password to open those files.
    Now I can't open them, because that program doesn't work with Sys X.
    I could open them in Sys 9 and then resave them without the encryption. But I need to find them all.
    (I want to handle them all now, rather than over the next few decades when one might pop up now and then. I won't have Sys 9 forever.)
    I can't find any perameter option to use (in Find) that will locate these files. I have a suspicion that maybe the reason searching on the creator application doesn't work is because Sentinel didn't technically create the documents, it only encrypted existing documents—although in the Info window, Sentinel is shown as the Kind. If it's any help, also shown in the Info window is the version: "Sentinel 2.2, © 1987-89 Supermac Technology."
    Sentinel put it's own icon on all the locked files.
    Seems like it should be easy to do a search to find all these files, but I can't figure out how.
    Any suggestions?
    Thanks.
    Larry

    You should be able to do it, but first you'll need to get a unique piece of metadata for the files, and then you'll need to use the Raw Query format in the Find window. I have a handy little utility written by a cyber-friend I keep in the Dock for getting the metadata entries for a file, and I think there are other free ones on VersionTracker, but you can also use Terminal to get the relevant entries. Thus I have some old Excel files. To locate all of them, I would do this:
    1. Open Terminal (it is in your Utilities folder) and type
    mdls
    and a space. Then drag and drop one of your files into the Terminal window and hit the Return key. The result will look something like this:
    NoobiX:~ francine$ mdls /Volumes/Data/BackUp/8600drives/FastMac/Documents/Finances/Finances1995
    /Volumes/Data/BackUp/8600drives/FastMac/Documents/Finances/Finances1995
    kMDItemAttributeChangeDate = 2007-08-01 12:15:22 -0700
    kMDItemContentCreationDate = 1996-03-13 01:27:46 -0800
    kMDItemContentModificationDate = 1996-03-13 02:08:03 -0800
    kMDItemContentType = "com.microsoft.excel.xls"
    kMDItemContentTypeTree = ("com.microsoft.excel.xls", "public.data", "public.item")
    kMDItemDisplayName = "Finances1995"
    kMDItemFSContentChangeDate = 1996-03-13 02:08:03 -0800
    kMDItemFSCreationDate = 1996-03-13 01:27:46 -0800
    kMDItemFSCreatorCode = 1480803660
    kMDItemFSFinderFlags = 256
    kMDItemFSInvisible = 0
    kMDItemFSIsExtensionHidden = 0
    kMDItemFSLabel = 0
    kMDItemFSName = "Finances1995"
    kMDItemFSNodeCount = 0
    kMDItemFSOwnerGroupID = 501
    kMDItemFSOwnerUserID = 501
    kMDItemFSSize = 6954
    kMDItemFSTypeCode = 1481397044
    kMDItemID = 58528
    kMDItemKind = "Microsoft Excel 4.0 worksheet"
    kMDItemLastUsedDate = 2007-08-01 12:15:22 -0700
    kMDItemUsedDates = (1996-03-13 02:08:03 -0800, 2007-07-31 17:00:00 -0700)
    2. Since I want to find all the old Excel files, I chose the line
    kMDItemKind = "Microsoft Excel 4.0 worksheet"
    You can just drag to select that line with the Mouse, then select copy.
    3. In the Find window criterion drop down menu, select Other, then scroll down to Raw Query, select it, and then paste the kMDItemKind line you copied into the open field. That should do it.
    Francine
    Francine
    Schwieder

  • How can i find all the songs that deleted from my nano 6th gen after updating?  It deleted them out of my itunes library as well

    When I updated my Mom's Ipod Nano 6th generation it deleted all the songs in one playlist and then deleted them off my main computer.  How can I restore these songs without having to repurchase them?

    Hi Luinsan,
    It sounds like you’re looking for a way to recover lost music that was purchased from the iTunes Store. The article linked below should help, it will walk you through the process of downloading past purchases.
    Download past purchases - Apple Support
    And, you can some additional options in this article:
    iTunes: Finding lost media and downloads - Apple Support
    Take care,
    -Jason

  • How can I find all of my past discussions and replies

    Hello
    how i can find all of my past discussions and replies in apple support community ?
    <Subject Edited by Host>

    Click the link below.
    alirezaapple

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • My old computer fried and died. How can i find all the songs I previously downloaded?

    I lost all the data on my old hard drive. I downloaded the newest version of i tunes for my new computer. Now how can i re download all the songs I previously purchased? Thanks for helping

    It has always been very basic to always maintain a backup copy of your computer for just such an occasion.  us eyour backup copy to put everything back.
    If for some reason you have failed to backup, then you can transfer itunes purchases from an ipod:  File>Transfer Purchases.
    In the U.S you can use icloud.  Open itunes store, click Purchased under Quick Links.

  • How can I find all messages like this?

    What criteria can I use in a smart mailbox to find all messages like this?
    The message from Robert Nicholson <[email protected]> concerning “Hi Testing” has not been downloaded from the server. You need to take this account online in order to download it.
    I have a lot of these because I use IMAP for my mail but there's no point in keeping these messages as they were deleted from the server a long time ago.

    Robert,
    I am not sure what a Smart Mailbox would have to offer with respect to this?
    However, the problem is likely not that the message has been deleted from the server, but that Mail 2.0 has problems with some IMAP servers at displaying some messages.
    I am hopeful, but cannot assure anyone, that a fix is being worked on for this, and perhaps will be available sometime in the future.
    If you were to access with a different version of Mail, such as 1.3.11, or another mail client, you might access these messages. Therefore, I would not be quick to try and eliminate them.
    Ernie

Maybe you are looking for