Virtual to physical address mapping

Is there a way to determine the physical address(es) of a pinned-down kernel buffer from it's virtual address and size, either in a device driver or user program? I'd like to use the physical address(es) to access the buffer via /dev/mem or some other method from a user level program.
I've seen references to "vtop" in examples on docs.sun.com, but don't find any documentation about that routine, and don't find it in include files on Solaris 7. Thanks in advance!

I think that in a device driver you can use hat_getkpfnum(9F) to get the physical page number from a virtual address.
In crash(1m) the vtop command will translate a virtual to a physical address.
I would have thought you could also just use the virtual address against /dev/kmem, as opposed to using a physical address against /dev/mem?
Hope that helps.
Ralph
SUN DTS

Similar Messages

  • Virtual to physical address

    Greetings. We are developing a network driver for Solaris and face a problem of flushing a buffer from/to a user area to/from a kernel area, outside a process context. The main question is how within a kernel module we can retrieve the physical addess to/from a virtual address of an arbitrary process ? Our targets are limited to Solaris 7 and 8. Thanks in advance for any help you'll provide.
    Pierre.

    Please refer hat_getkpfnum(9F) to do this from within a kernel module.
    Otherwise, libkvm provides the foll function :
    extern uint64_t kvm_physaddr(kvm_t *, struct as *, uintptr_t);
    Refer man page for libkvm(3LIB)
    Crash(1M) provides the function "vtop" to carry out this translation.

  • Find out virtual nic to physical nic mapping

    any command in hyper-v / scvmm to find out virtual nic to physical nic mapping. In vmware we can get the same by esxtop N view shows VMname and the physical NIC used, simlarly any in hyper-v

    I think that in a device driver you can use hat_getkpfnum(9F) to get the physical page number from a virtual address.
    In crash(1m) the vtop command will translate a virtual to a physical address.
    I would have thought you could also just use the virtual address against /dev/kmem, as opposed to using a physical address against /dev/mem?
    Hope that helps.
    Ralph
    SUN DTS

  • Physical Address to Virtual address

    Hi all,
    Are there any DDI/DKI API's to convert physical address to virtual address and vice versa. If there are no API's available is there any other way/method to achive this.
    Regards and Thanx in advance
    Pradeep

    in general, you're not supposed to need to do that, although hat_getpkfnum will work. If you are trying to use dma, it is better to use the dma functions such as ddi_dma_alloc_handle with ddi_dma_mem_alloc and ddi_dma_addr_bind_handle, or dvma_kaddr_load.

  • How does OpenSPARC translate Virtual Address to Physical Address or Vice V

    The i386 page address system has three levels: dir, page, offset. The 32 bits virtual address consists of dir, page, offset. When the process releases a virtual address to read a memory content, the MMU of i386 will translate the virtual address to physical address as follows:1,Based on the value of CR3 register and dir of virtual address, MMU returns the base address of page.2, Based on the the base address of page and value of page of virtual address, MMU returns the base address of physical page.3, Based on the base address of physical page and value of offset of virtual address, MMU returns physical memory address. 4, Read the content of physical memory address.
    However, when I read the source code of the bw_r_tlb of OpenSPARC�s MMU, I am puzzled. I am not clear how is the page address system of OpenSPARC implement.
    Will you offer me some hints about it ? And are there any documents about it?
    Thanks a lot!

    It would be good to add the definition of Hypervisor in the wikipedia.
    Thanks
    [email protected] wrote:
    > I have downloaded the source code of linux-2.6.17.9 version. In the arch directory of linux-2.6.17.9, I
    find the Hypervisor API (such as sun4v_intr_setstate, sun4v_intr_gettarget) has been
    integrated with Linux kernel. In other words, it is implemented in Linux kernel. All the time, I think
    Hypervisor API is an independent layer which provides an easy way to switch among all kinds of OS. But now,
    I find it is a part of Linux. If so, what a role does Hypervisor API take? Why do we name it Hypervisor API
    rather than a part of Linux? It do puzzle me, am I wrong?
    The Hypervisor API ("application programming interface") is fully described in the UltraSPARC T1 Hypervisor API Specification, which is downloadable from page http://opensparc-t1.sunsource.net/index.html .
    As a brief digression ... the term "Hypervisor API" has always seemed a bit oxymoronic to me -- given the historic equivalency of "application" to "nonprivileged". After all, isn't it more of an "SPI" (supervisor programming interface) because it services privileged supervisor (operating system) software, not nonprivileged (application) software? But if you think of a guest OS as an "application" (in the general sense of the word) supported by the Hypervisor, then "Hypervisor API" makes some sense.
    Now, regarding Hypervisor API and Linux. If you read the UltraSPARC T1 Hypervisor API Specification, you'll find that Hypervisor API calls are defined (appropriately enough) in terms of native SPARC assembly language. I haven't looked at the Linux source code, but I'd bet a considerable sum of money that the Linux sun4v_intr_gettarget() function is a C-language wrapper around a SPARC assemly-language routine that sets up arguments, performs a trap to the Hypervisor intr_gettarget function, and returns the result(s) to the caller.
    In any case, all actual Hypervisor code is fully implemented in the Hypervisor, not in Linux or Solaris or FreeBSD or Wind River Linux or any other OS running on top of the Hypervisor. Each OS may implement some "wrapper" code around Hypervisor calls, but no actual Hypervisor functionality actually resides in a guest OS. In fact, it can't reside in a guest OS because it must run in hyperprivileged mode and guest operating systems run in "merely" Privileged mode.
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
    Shrenik Mehta               Tel: 408-774-8580
    Sr. Director, Frontend Technologies & OpenSPARC Program
    System Group               Fax: 408-774-8154
    Sun Microsystems          http://www.opensparc.net
    NOTICE: This email message is for the sole use of the intended
    recipient(s) and may contain confidential and privileged
    information. Any unauthorized review, use, disclosure or
    distribution is prohibited. If you are not the intended
    recipient, please contact the sender by reply email and destroy
    all copies of the original message.
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

  • Virtual address to physical address

    Hi,
    How do i convert kernel virtual address to physical address.... do we have
    any DDI function for this.?.. i am writing a driver for a pci card... my
    card needs the physical address of the memory location so that it can dump
    data to this location..
    OS: SOlaris 7 on intel pc..
    gurus any idea how to do this stuff???....
    TIA
    azad

    The recommended way to do this is by using the ddi_dma* functions. I would suggest reading the entire "Writing Device Drivers", but pay particular attention to the chapters on DMA and the section in the chapter on character drivers that deals with DMA.

  • Kernel, virtual and physical memory

    Hi,
    I would like to get a clarification of the uses of the terms kernel, virtual and physical memory. Functions like kmem_alloc provide non-paged 'kernel' memory, but is this a pointer to a physical memory address, or is it similar to a virtual address that gets mapped by the memory management when it is referenced like virtual memory?
    Is there a way to determine a mapping between a virtual address and a physical address? (like vtophys in bsd or virt_to_phys/virt_to_bus in linux) ?
    Is all memory that is normally used within a driver (e.g. messages through a STREAM or DMA areas) 'kernel' memory, and is this a direct physical memory address (as asked above)?
    Many thanks
    S.

    Hi,
    Most kernel code and device drivers will only use virtual addresses. Yes, it is right!
    But I want to access a specific physical address.
    Because the bus bridge chip with PCI bus-master access a specific physical address directly.
    My system configuration is below:
    Platform: IA32
    Address map:
    0x00000000 - 0x000FFFFF: Main Memory, VGA Frame Buffer, Boot ROM
    0x00100000 - 0x0FFFFFFF : Main Memory(DIMM) - 255MB*
    0x10000000 - 0xFEBFFFFF: PCI bus memory space
    0xFEC00000 - 0xFFF7FFFF: Not Used
    0xFFFF8000 - 0xFFFFFFFF: Boot ROM
    *My system has 128MB DIMM on board.
    The bus bridge chip access a physical address at 0x06000000.
    I tested whether it would be set up correctly by using Linux as follow:
    1) Memory size is specified to 96MB compulsorily.
    init: Linux mem=96M
    2) Access to Physical address space via virtual address in kernel space.
    init_module(){
    va = iormap(0x06000000, size);
    *va = value;
    value = *(va+n);
    3) work good.
    I tried on Solaris by the same way.
    But I cannot find working.
    1) Memory size is specified to 96MB compulsorily.
    In /etc/system:
    set physmem=23723 <- Page size is 4K in my system. lower than 96MB.
    2) Access to Physical address space via virtual address in kernel space.
    xxx_attach(){
    ddi_regs_map_setup();
    ddi_putX(value);
    value = ddi_getX();
    driver.conf
    name="xxx" class="sysbus" reg=0,0x06000000, size;
    And I tried access by using /dev/mem.
    This also went wrong.
    dose anyone have good idea?
    Toru OHATA

  • Hyper-V cluster validation report "Found duplicate physical address" on nic team interfaces.

    I recently built a Windows 2012 Hyper-V cluster with 5 nodes. The validation report shows “duplicate physical address” error (error text pasted below).
    The hardware: HP BladeSystem – servers are BL460c blades, in a c7000 enclosure, connected to HP Virtual Connect switches.
    Each server has 2 physcal nics, teamed in Windows. In the NIC Teaming console, I created the following Team Interfaces and assigned each a VLAN ID:
    “Team1” (the default team)
    “Team1 - VLAN 204 – Management”
    “Team1 - VLAN 212 - 2012HB”
    “Team1 - VLAN 211 -Exchange DAG Replication”
    I also created 2 HV Virtual Switches. Neither one allows management interface to share. They are assigned to “Team1” and “Team1 - VLAN 211 -Exchange DAG Replication” respectively.
    Therefore, in Network Connection, I see the 2 physical Ethernet nics, and 4 “virtual” nics. Only 2 of them have IP addresses assigned: Management and HB. These are the two that the validation wizard complains
    about.
    The MAC address is not configurable in the NIC Teaming console, so I don’t see a way to resolve this error, except to use separate physical nics. I don’t want to do that because a) I would lose the benefits of
    the bandwidth aggregation that Virtual Connect provides, and b) When creating an Interface on a Team in Windows, it looks like it ALWAYS gives it the same MAC address, so that should be a supported configuration.
    Everything works just fine, and there are no other errors or IP conflicts or anything else. But I really want to fix it because I don’t know what unknown problems this may be causing.
    From the Cluster Validation report:
    Found duplicate physical address 10-60-4B-A9-4A-30 on node Cluster201.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster201.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Found duplicate physical address F0-92-1C-13-3C-2C on node Cluster202.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster202.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Found duplicate physical address 68-B5-99-C1-7E-9C on node Cluster210.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster210.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Found duplicate physical address 3C-4A-92-DE-1E-74 on node Cluster211.OurDomain.local adapter VC-Team - VLAN 212 - 2012HB and node Cluster211.OurDomain.local adapter
    VC-Team - VLAN 204 - Management.
    Found duplicate physical address 68-B5-99-C0-3D-50 on node Cluster212.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster212.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Thanks!
    Dan

    Hi Dan,
    "It turns out that both hosts had the same default MAC address ranges for their virtual switches. Since the host vNICs were attached to the virtual switch on each host they received the first couple of MAC addresses from the switches.
    For details please refer to following link:
    http://www.jefflafr.com/blog/4/19/2013/conflicting-mac-addresses-when-building-a-hyper-v-cluster-with-converged-networking
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to handle a Customer Plants with same Physical Address

    We have customers that have multiple plants in the same physical address.  I need to be able to ship to the physical address but in va03 I also need to tell which lines are for which plant. So my question is how is best to handle this?
    Here are the options I can think of.
    1) Each customer plant will be its own ship to even though they would be the same physical address and contact information.
    2) Create a Partner that will hold each plant that will be attached to the ship to.  This would work similar to Manufacture and Manufacture Plant in Purchasing.  Then this customer plant partner would be attached to the sales order line in addition to ship to.
    3) Use Option 2 but figure out what SAP standard partner for customer plant is.
    Does anybody have better ideas?
    Which one is the most appropriate to do?
    Matthew

    Hi
    You can map them as different Unloading points and enter the details in the Customer master unloading points details. When the slaes order is created, a pop screen will show you the different unloading points to chose one among them. This should solve your issue.
    Thanks,
    Ravi

  • Physical Address Extension (PAE), NX, and SSE2

    I want to try Windows 8 on my Lenovo x201.  I ran CoreInfo and it reported that the machine has Physical Address Extension (PAE), NX, and SSE2.  However, I cannot find it anywhere in the BIOS setup.
    I use BitLocker and it gets very upset if the BIOS settings are changed during boot so they must be turned on and not have Windows 8 turn them on during boot.
    Where can I find the settings for Physical Address Extension (PAE), NX, and SSE2?

    I got the same problem with windows 8.
    My Cpu (Intel Core i7 2670QM) supports everything needed and the DEP is also activated.
    In every forum they say that you have to enable PAE-NX in the BIOS but when i go into the Bios, therese almost NOTHING. This is the poorest Bios I've ever seen. Almost nothing to configure, enable or disable. Except boot order, Intel virtual mashine, admin password.
    For my Z570(1024) there's no new BIOS update.
    Microsoft Windows 7 Home Premium 64-bit SP1
    Intel Core i7 2670QM
        Kerne    4
        Threads    8
        Name    Intel Core i7 2670QM
        Codename    Sandy Bridge
        Sockel    Socket 988B rPGA
        Technologie    32nm
        Spezifikation    Intel Core i7-2670QM CPU @ 2.20GHz
        Familie    6
        Erweiterte Familie    6
        Model    A
        Erweitertes Model    2A
        Stepping    7
        Revision    D2
        Befehle    MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, Intel 64
        Virtualisierung    Unterstützt, Aktiviert
        Hyper-Threading    Unterstützt, Aktiviert
        Bus Takt    99.8 MHz
        Kern Frequenz    2200 MHz
        Bus Frequenz    100 MHz
    DDR3
      8192 Mbyte
      Dual
    DRAM Frequenz    665.3 MHz
    Hersteller    LENOVO
    Model    Emerald Lake (CPU)
    Version    Ideapad Z570
    Chipsatzhersteller    Intel
    Chipsatzmodel    Sandy Bridge
    Chipsatzrevision    09
    Southbridgehersteller    Intel
    Southbridgemodel    HM65
    Southbridgerevision    05
    Systemtemperatur    48 °C
        BIOS
            Marke    LENOVO
            Version    45CN38WW
            Datum    10/21/2011

  • Physical Address clickable in Contacts

    Hello,
    How do I make my Contacts physical address clickable so that Google Maps will regonize it?
    For example, if I added my friends address to his contact, when viewing the contact in his contact on the iPhone (or in email) how can I get Google Maps to launch against that address? This is something you can do with webs sites.
    Windows XP/ Outlook 2003/ iPhone 1.1.3
    Thank you
    Tony

    You open the contact, scroll down to the address, and just click on it, just like you would click on an email address to create a new email, or a phone number to dial them.
    What you may need to check is that your addresses are correctly formatted. I seem to remember reading someone else saying that the information you put in the country field has a big impact. As I am located in the United Kingdom, I have "United Kingdom" in the country field. It maybe for Americans you should have "United States" rather than US or USA, or possible the other way around. Also make sure the country is in the country field (not the wrong field).
    I am using iPhone firmware 1.1.3

  • CT5760 - virtual-host in parameter-map not used in webauth redirect

    Hi all.
    I'll try posting my issue here before I post a TAC on this:
    Cisco CT5760 wireless controller running IOS-XE version 3.6.0.
    This issue is related to web authentication on an SSID with external web portal. It seems that the statement "virtual-host" in "parameter-map type webauth global" is not used as intended. I'll try to explain:
    When a user connects to an SSID with external web authentication enabled and the user opens a web browser, the user will get redirected to the external web portal for authentication. In this redirect URL we see the parameter "switch_url=http://1.2.3.4/login.html". The IP address 1.2.3.4 is, in this example, our virtual IP. But we have also configured "virtual-host" to be webauth.example.com. And in my opinion the "switch_url" parameter should be "switch_url=http://webauth.example.com/login.html". This is how it works on our old Cisco WiSM1 implementation.
    The reason why this is a problem is that the clients web browser will not accept the certificate installed on "http://1.2.3.4" because it is not issued with that IP address, only the hostname webauth.example.com. I know that it is possible to get certificates issued with an IP address (as long as it's not an RFC1918 IP address), but rumors say that many Certificate Authorities will stop issuing these soon, even with "real IPs". Therefore it is important that the redirect URL gets corrected.
    Does anyone disagree with me that this is a bug?

    Hi and thank you for your response.
    I feel that I need to clarify a few things. Here is my parameter-map config (a bit edited):
    parameter-map type webauth global
    virtual-ip ipv4 1.1.1.1 virtual-host webauth.example.com
    intercept-https-enable
    parameter-map type webauth webauth_external
    type webauth
    redirect for-login https://webauth-external.example.com/v2/login.html
    redirect portal ipv4 x.x.x.x
    So the problem here is that a web browser of the client gets the following redirect URL:
    https://webauth-external.example.com/v2/login.html?switch_url=https://1.1.1.1/login.html&redirect=http://www.cnn.com
    Then after a successful login on the external portal, the user gets redirected back to https://1.1.1.1/login.html. Here is the core of my problem. I think that the parameter "switch_url" should be with the name webauth.example.com since I configured it as the "virtual-host". This is the behavior we see with our old Cisco WiSM1.
    When the redirect goes to https://1.1.1.1/login.html the client complains about the certificate, because it is not issued to that IP address but to the hostname.
    I can verify that the client does not complain about this if I manually edit the redirect URL on the client to the following:
    https://webauth-external.example.com/v2/login.html?switch_url=https://webauth.example.com/login.html&redirect=http://www.cnn.com
    Then the redirect after authentication goes to https://webauth.example.com/login.html and the client accepts the certificate and everything is peachy.
    Do you see my problem? And yes, the virtual IP resolves to the name in DNS.

  • How to pick wireless physical address of client machine

    Dear memebers,
    Using the follwoing tutorail, I have picked the network card address ( MAC Address ).
    [forms java beans|http://forms.pjc.bean.over-blog.com/article-15985856.html]
    but this code dont' display / return the MAC address of wireless network card.
    the java code is here:
    package oracle.forms.fd;
    import java.net.InetAddress;
    import java.io.InputStream;
    import java.io.BufferedInputStream;
    import java.io.IOException;
    import java.text.ParseException;
    import java.util.StringTokenizer;
    import oracle.forms.ui.VBean;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
         * A Java Bean that returns Client machine info
         * code found on the java forum
         * http://forum.java.sun.com/thread.jspa?threadID=655913
         * @author Francois Degrelle (wrapper)
         * @version 1.1
    public final class ClientInfos extends VBean {
        private static final ID GETINFOS  = ID.registerProperty("GET_CLIENT_INFOS");
        private static final ID GETINFO   = ID.registerProperty("GET_CLIENT_INFO");
        private static final ID Operating = ID.registerProperty("OPERATING");
        private static final ID architecture = ID.registerProperty("ARCHITECTURE");
        private static final ID osVersion = ID.registerProperty("OSVERSION");
        private static final ID IP = ID.registerProperty("IP");
        private static final ID MAC = ID.registerProperty("MAC");
        private static final ID javaVersion = ID.registerProperty("JAVAVERSION");
        private static final ID javaVendor = ID.registerProperty("JAVAVENDOR");
        private static final ID javaVendorUrl = ID.registerProperty("JAVAVENDORURL");
        private static final ID javaHome = ID.registerProperty("JAVAHOME");
        private static final ID javaVmSpecificationVersion = ID.registerProperty("JAVAVMSPECIFICATIONVERSION");
        private static final ID javaVmSpecificationVendor = ID.registerProperty("JAVAVMSPECIFICATIONVENDOR");
        private static final ID javaVmSpecificationName = ID.registerProperty("JAVAVMSPECIFICATIONNAME");
        private static final ID userName = ID.registerProperty("USERNAME");
        private static final ID userHome = ID.registerProperty("USERHOME");
              private     String sInfos = "";
              private     String sOperating = "";
              private     String sarchitecture = "";
              private     String sosVersion = "";
              private     String sIP = "";
              private     String sMAC = "";
              private     String sjavaVersion = "";
              private     String sjavaVendor = "";
              private     String sjavaVendorUrl = "";
              private     String sjavaHome = "";
              private     String sjavaVmSpecificationVersion = "";
              private     String sjavaVmSpecificationVendor = "";
              private     String sjavaVmSpecificationName = "";
              private     String suserName = "";
              private     String suserHome = "";
        private boolean bInit = false ;
        public void init(IHandler handler)
          super.init(handler);
               try {
                  sOperating = System.getProperty("os.name");
                  sarchitecture = System.getProperty("os.arch");
                  sosVersion = System.getProperty("os.version");
                  sIP = InetAddress.getLocalHost().getHostAddress();
                  sMAC = getMacAddress();
                  sjavaVersion = System.getProperty("java.version");
                  sjavaVendor = System.getProperty("java.vendor");
                  sjavaVendorUrl = System.getProperty("java.vendor.url");
                  sjavaHome = System.getProperty("java.home");
                  sjavaVmSpecificationVersion = System.getProperty("java.vm.specification.version");
                  sjavaVmSpecificationVendor = System.getProperty("java.vm.specification.vendor");
                  sjavaVmSpecificationName = System.getProperty("java.vm.specification.name");     
                  suserName = System.getProperty("user.name");
                  suserHome = System.getProperty("user.home");          
                } catch(Throwable t) {
                  t.printStackTrace();
          public Object getProperty(ID pId)
             if(pId == GETINFOS)
                sInfos = "Operating System:" + sOperating ;
                sInfos += "\nOperating system architecture:" + sarchitecture ;
                sInfos += "\nOperating system version:" + sosVersion ;
                sInfos += "\nIP/Localhost:" + sIP ;
                sInfos += "\nMAC Address:" + sMAC ;
                sInfos += "\nJava Version:" + sjavaVersion ;
                sInfos += "\nJava Vendor:" + sjavaVendor ;
                sInfos += "\nJava vendor URL:" + sjavaVendorUrl ;
                sInfos += "\nJava installation directory:" + sjavaHome ;
                sInfos += "\nJava Virtual Machine specification version:" + sjavaVmSpecificationVersion;
                sInfos += "\nJava Virtual Machine specification vendor:" + sjavaVmSpecificationVendor;
                sInfos += "\nJava Virtual Machine specification name:" + sjavaVmSpecificationName;     
                sInfos += "\nUser Name:" + suserName;
                sInfos += "\nUser's home directory:" + suserHome ;
                return sInfos ;
            else if(pId == Operating) return sOperating;  
            else if(pId == architecture) return sarchitecture ; 
            else if(pId == osVersion) return sosVersion ;
            else if(pId == IP) return sIP ;
            else if(pId == MAC) return sMAC ; 
            else if(pId == javaVersion) return sjavaVersion ;  
            else if(pId == javaVendor) return sjavaVendor ;  
            else if(pId == javaVendorUrl) return sjavaVendorUrl ;   
            else if(pId == javaHome) return sjavaHome ;   
            else if(pId == javaVmSpecificationVersion) return sjavaVmSpecificationVersion ; 
            else if(pId == javaVmSpecificationVendor) return sjavaVmSpecificationVendor ;   
            else if(pId == javaVmSpecificationName) return sjavaVmSpecificationName ; 
            else if(pId == userName) return suserName ; 
            else if(pId == userHome) return suserHome ;
             return super.getProperty(pId);
      private final static String getMacAddress() throws IOException {
              String os = System.getProperty("os.name");
              try {
                   if(os.startsWith("Windows")) {
                        return windowsParseMacAddress(windowsRunIpConfigCommand());
                   } else if(os.startsWith("Linux")) {
                        return linuxParseMacAddress(linuxRunIfConfigCommand());
                   } else {
                        throw new IOException("unknown operating system: " + os);
              } catch(ParseException ex) {
                   ex.printStackTrace();
                   throw new IOException(ex.getMessage());
          * Linux stuff
         private final static String linuxParseMacAddress(String ipConfigResponse) throws ParseException {
              String localHost = null;
              try {
                   localHost = InetAddress.getLocalHost().getHostAddress();
              } catch(java.net.UnknownHostException ex) {
                   ex.printStackTrace();
                   throw new ParseException(ex.getMessage(), 0);
              StringTokenizer tokenizer = new StringTokenizer(ipConfigResponse, "\n");
              String lastMacAddress = null;
              while(tokenizer.hasMoreTokens()) {
                   String line = tokenizer.nextToken().trim();
                   boolean containsLocalHost = line.indexOf(localHost) >= 0;
                   // see if line contains IP address
                   if(containsLocalHost && lastMacAddress != null) {
                        return lastMacAddress;
                   // see if line contains MAC address
                   int macAddressPosition = line.indexOf("HWaddr");
                   if(macAddressPosition <= 0) continue;
                   String macAddressCandidate = line.substring(macAddressPosition + 6).trim();
                   if(linuxIsMacAddress(macAddressCandidate)) {
                        lastMacAddress = macAddressCandidate;
                        continue;
              ParseException ex = new ParseException
                   ("cannot read MAC address for " + localHost + " from [" + ipConfigResponse + "]", 0);
              ex.printStackTrace();
              throw ex;
         private final static boolean linuxIsMacAddress(String macAddressCandidate) {
              // TODO: use a smart regular expression
              if(macAddressCandidate.length() != 17) return false;
              return true;
         private final static String linuxRunIfConfigCommand() throws IOException {
              Process p = Runtime.getRuntime().exec("ifconfig");
              InputStream stdoutStream = new BufferedInputStream(p.getInputStream());
              StringBuffer buffer= new StringBuffer();
              for (;;) {
                   int c = stdoutStream.read();
                   if (c == -1) break;
                   buffer.append((char)c);
              String outputText = buffer.toString();
              stdoutStream.close();
              return outputText;
          * Windows stuff
         private final static String windowsParseMacAddress(String ipConfigResponse) throws ParseException {
              String localHost = null;
              try {
                   localHost = InetAddress.getLocalHost().getHostAddress();
              } catch(java.net.UnknownHostException ex) {
                   ex.printStackTrace();
                   throw new ParseException(ex.getMessage(), 0);
              StringTokenizer tokenizer = new StringTokenizer(ipConfigResponse, "\n");
              String lastMacAddress = null;
              while(tokenizer.hasMoreTokens()) {
                   String line = tokenizer.nextToken().trim();
                   // see if line contains IP address
                   if(line.endsWith(localHost) && lastMacAddress != null) {
                        return lastMacAddress;
                   // see if line contains MAC address
                   int macAddressPosition = line.indexOf(":");
                   if(macAddressPosition <= 0) continue;
                   String macAddressCandidate = line.substring(macAddressPosition + 1).trim();
                   if(windowsIsMacAddress(macAddressCandidate)) {
                        lastMacAddress = macAddressCandidate;
                        continue;
              ParseException ex = new ParseException("cannot read MAC address from [" + ipConfigResponse + "]", 0);
              ex.printStackTrace();
              throw ex;
         private final static boolean windowsIsMacAddress(String macAddressCandidate) {
              // TODO: use a smart regular expression
              if(macAddressCandidate.length() != 17) return false;
              return true;
         private final static String windowsRunIpConfigCommand() throws IOException {
              Process p = Runtime.getRuntime().exec("ipconfig /all");
              InputStream stdoutStream = new BufferedInputStream(p.getInputStream());
              StringBuffer buffer= new StringBuffer();
              for (;;) {
                   int c = stdoutStream.read();
                   if (c == -1) break;
                   buffer.append((char)c);
              String outputText = buffer.toString();
              stdoutStream.close();
              return outputText;
    how to pick the wireless physical address?
    Regards:

    Hi !
    our request object, which is available to all the jsp pages can access ip address and host name of client through these calls.
    request.getRemoteAddr()
    request.getRemoteHost()
    Interface "ServletRequest"
    getRemoteAddr ----
    public java.lang.String getRemoteAddr()
    Returns the Internet Protocol (IP) address of the client that sent the request. For HTTP servlets, same as the value of the CGI variable REMOTE_ADDR.
    Returns:
    a String containing the IP address of the client that sent the request
    getRemoteHost
    public java.lang.String getRemoteHost()
    Returns the fully qualified name of the client that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST.
    Returns:
    a String containing the fully qualified name of the client
    All the Best!
    (Simmy)

  • Address mapping / mail forwarding (equivalent to virtusertable in sendmail)

    Is there an equivalent setting somewhere with Snow Leopard Server, to do address mapping, as you would under sendmail on Linux? (with /etc/mail/virtusertable)
    i.e. create address maps, for mail forwarding. if mail comes to this email address on the server, forward it to this address (even outside the server on another domain).

    look into here or elsewhere in the postfix docs:
    http://www.postfix.org/rewrite.html

  • IPhone 6 Plus 16GB blue screen crashes: Read, error type:Address map hole or size mis-match

    Hi folks,
    Some time ago I had a 16GB 6+ and it crashed with the blue screen, so I returned it. I now have a brand new one that I got from Tmobile ($75 return fee) and although it has mostly worked just fine, I have gotten 2 blue screen crashes. Below are the details from the phone's log.
    What strikes me is the message "Read, error type:Address map hole or size mis-match".
    Does anyone know if this could be caused by a hardware defect?
    I've gotten one of these crashes running iOS 8.1.2 and another in 8.1.3.
    Thanks.
    Incident Identifier: 20304759-E90B-453F-BDC5-176AF4E30041
    CrashReporter Key:   fcf18d230005749957728546dea3221a0c588330
    Hardware Model:      iPhone7,1
    Date/Time:           2015-01-25 19:43:44.913 -0800
    OS Version:          iOS 8.1.2 (12B440)
    panic(cpu 0 caller 0xffffff8008cd45d0): L2C PIO error (src:core0-AF snoop, address:0x1202030208, access:Read, error type:Address map hole or size mis-match, L2C_ERR_STS:100003fc00000202, L2C_ERR_ADR:0x1108e1202030208, L2C_ERR_INF:0x2107)
    Debugger message: panic
    OS version: 12B440
    Kernel version: Darwin Kernel Version 14.0.0: Mon Nov  3 22:27:30 PST 2014; root:xnu-2783.3.22~1/RELEASE_ARM64_T7000
    iBoot version: iBoot-2261.3.33
    secure boot?: YES
    Paniclog version: 3
    Kernel slide:     0x0000000006000000
    Kernel text base: 0xffffff8008002000
    Epoch Time:        sec       usec
      Boot    : 0x54bc22ef 0x00000000
      Sleep   : 0x54c58398 0x0002abb4
      Wake    : 0x54c583ae 0x000f08df
      Calendar: 0x54c5b7e3 0x00025045

    same with my iPhone 4s 16gb
    {"os_version":"iOS 8.1.3 (12B466)","bug_type":"110"}
    Incident Identifier: 582496DB-6999-468C-9504-3D1C191B9F4B
    CrashReporter Key: 623a577555e51ed110b937358adfa66fba3ea447
    Hardware Model: iPhone4,1
    Date/Time: 2015-02-20 04:17:50.830 +0300
    OS Version: iOS 8.1.3 (12B466)
    panic(cpu 0 caller 0x83dc8347): "i2c1::_checkBusStatus Bus is still in a bad state; last write status 00010110 xfer 00000000 fifo 00000000 for device als"
    Debugger message: panic
    OS version: 12B466
    Kernel version: Darwin Kernel Version 14.0.0: Mon Jan 12 21:30:11 PST 2015; root:xnu-2783.3.26~3/RELEASE_ARM_S5L8940X
    Kernel slide: 0x0000000003400000
    Kernel text base: 0x83401000
    Boot : 0x54e68884 0x00000000
    Sleep : 0x54e68a7e 0x000dd6ac
    Wake : 0x54e68b19 0x00035c02
    Calendar: 0x54e68b1d 0x00040927
    Panicked task 0x84a87c60: 13773 pages, 122 threads: pid 0: kernel_task
    panicked thread: 0xc5066e80, backtrace: 0x81a33ca0
    0x834ad94d
    0x834adcb1
    0x8341d5bd
    0x83dc8347
    0x83dc8059
    0x83dc7e35
    0x8389c601
    0x8389c513
    0x836f6f65
    0x8389cc6d
    0x8389ccc5
    0x83a9f18d
    0x83a9c27f
    0x83a9c73f
    0x83a9c90d
    0x836f6f65
    0x83a9c8e5
    0x836e91e7
    0x8343ed9b
    0x834ab59c
    Task 0x84a87c60: 13773 pages, 122 threads: pid 0: kernel_task
    Task 0x84a87948: 771 pages, 3 threads: pid 1: launchd
    Task 0x84a87000: 2016 pages, 13 threads: pid 17: UserEventAgent
    Task 0x84a87630: 481 pages, 4 threads: pid 18: misd
    Task 0x84a87318: 4114 pages, 22 threads: pid 19: CommCenter
    Task 0x87a62948: 349 pages, 2 threads: pid 21: keybagd
    Task 0x87a62318: 574 pages, 4 threads: pid 23: iaptransportd
    Task 0x87a62000: 868 pages, 9 threads: pid 24: configd
    Task 0x87a7ac60: 793 pages, 4 threads: pid 25: lockdownd
    Task 0x87a7a948: 1218 pages, 6 threads: pid 26: imagent
    Task 0x87a7a630: 2771 pages, 4 threads: pid 27: atc
    Task 0x87a7a318: 792 pages, 2 threads: pid 28: fairplayd.H1
    Task 0x87a7a000: 1571 pages, 14 threads: pid 29: aggregated
    Task 0x87c4ac60: 1069 pages, 4 threads: pid 30: routined
    Task 0x87c4a318: 707 pages, 5 threads: pid 33: timed
    Task 0x87d23c60: 646 pages, 2 threads: pid 35: installd
    Task 0x87d23948: 2383 pages, 11 threads: pid 36: mediaserverd
    Task 0x87d23318: 1279 pages, 11 threads: pid 38: ubd
    Task 0x87d23000: 249 pages, 7 threads: pid 39: syslogd
    Task 0x87d6ac60: 410 pages, 2 threads: pid 40: softwareupdated
    Task 0x87d6a948: 851 pages, 5 threads: pid 41: mediaremoted
    Task 0x87d6a630: 1877 pages, 7 threads: pid 42: identityservices
    Task 0x87d6a318: 9938 pages, 16 threads: pid 43: SpringBoard
    Task 0x87d6a000: 453 pages, 2 threads: pid 44: fileproviderd
    Task 0x87e25c60: 609 pages, 4 threads: p

Maybe you are looking for