KVM/QEMU Emulator User Documentation

 

<script type="text/javascript"> /*<![CDATA[*/ if(top.location != self.location){ top.location = self.location; } var myref = encodeURI("http://hi.baidu.com/dereklouie/blog/item/85323fd0245cb08aa0ec9c1f%2Ehtml"); /*]]>*/ </script> /*<![CDATA[*/ #usrbar{padding:4px 10px 3px 0;font-size:12px;height:19px;line-height:19px;color:#000000;font-family:Arial;text-align:right;background:#ffffff;filter:alpha(opacity=65);-moz-opacity:0.5;width:auto !important;width:100%;letter-spacing:normal} #usrbar a,#usrbar a:link,#usrbar a:visited{color:#0000CC;text-decoration:underline} #ft{clear:both;height:20px;line-height:20px;color:#666666;font-size:12px;font-family:Arial;text-align:center} #ft a,#ft a:link,#ft a:visited{color:#7777CC;text-decoration:underline} #usrbar,#usrbar a,#usrbar a:link,#usrbar a:visited,#ft,#ft a,#ft a:link,#ft a:visited{letter-spacing:normal} /*]]>*/
百度首页 | 百度空间 <script type="text/javascript"> document.write('| <a href="http://passport.baidu.com/?login&tpl=sp&tpl_reg=sp&u=http://hi.baidu.com' + encodeURI('/dereklouie/blog/item/85323fd0245cb08aa0ec9c1f%2Ehtml') + '">登录</a>'); </script> | 登录
<!---->
科技小区:Wireless Sensor Networks
 
 
查看文章
 
QEMU Emulator User Documentation ---2 【zz】
2008-04-21 14:22

USB options:

`-usb'
Enable the USB driver (will be the default soon)
`-usbdevice devname '
Add the USB device devname . See section 3.9.1 Connecting USB devices .

Network options:

`-net nic[,vlan=n ][,macaddr=addr ][,model=type ]'
Create a new Network Interface Card and connect it to VLAN n ( n = 0 is the default). The NIC is an ne2k_pci by default on the PC target. Optionally, the MAC address can be changed. If no `-net' option is specified, a single NIC is created. Qemu can emulate several different models of network card. Valid values for type are i82551 , i82557b , i82559er , ne2k_pci , ne2k_isa , pcnet , rtl8139 , smc91c111 , lance and mcf_fec . Not all devices are supported on all targets. Use -net nic,model=? for a list of available devices for your target.
`-net user[,vlan=n ][,hostname=name ]'
Use the user mode network stack which requires no administrator privilege to run. `hostname=name' can be used to specify the client hostname reported by the builtin DHCP server.
`-net tap[,vlan=n ][,fd=h ][,ifname=name ][,script=file ]'
Connect the host TAP network interface name to VLAN n and use the network script file to configure it. The default network script is `/etc/qemu-ifup' . Use `script=no' to disable script execution. If name is not provided, the OS automatically provides one. `fd' = h can be used to specify the handle of an already opened host TAP interface. Example:
qemu linux.img -net nic -net tap
More complicated example (two NICs, each one connected to a TAP device)
qemu linux.img -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
               -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
`-net socket[,vlan=n ][,fd=h ][,listen=[host ]:port ][,connect=host :port ]'
Connect the VLAN n to a remote VLAN in another QEMU virtual machine using a TCP socket connection. If `listen' is specified, QEMU waits for incoming connections on port ( host is optional). `connect' is used to connect to another QEMU instance using the `listen' option. `fd' = h specifies an already opened TCP socket. Example:
# launch a first QEMU instance
qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
               -net socket,listen=:1234
# connect the VLAN 0 of this instance to the VLAN 0
# of the first instance
qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
               -net socket,connect=127.0.0.1:1234
`-net socket[,vlan=n ][,fd=h ][,mcast=maddr :port ]'
Create a VLAN n shared with another QEMU virtual machines using a UDP multicast socket, effectively making a bus for every QEMU with same multicast address maddr and port . NOTES:
  1. Several QEMU can be running on different hosts and share same bus (assuming correct multicast setup for these hosts).
  2. mcast support is compatible with User Mode Linux (argument `ethN =mcast' ), see http://user-mode-linux.sf.net .
  3. Use `fd=h' to specify an already opened UDP multicast socket.
Example:
# launch one QEMU instance
qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
               -net socket,mcast=230.0.0.1:1234
# launch another QEMU instance on same "bus"
qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
               -net socket,mcast=230.0.0.1:1234
# launch yet another QEMU instance on same "bus"
qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \
               -net socket,mcast=230.0.0.1:1234
Example (User Mode Linux compat.):
# launch QEMU instance (note mcast address selected
# is UML's default)
qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
               -net socket,mcast=239.192.168.1:1102
# launch UML
/path/to/linux ubd0=/path/to/root_fs eth0=mcast
`-net none'
Indicate that no network devices should be configured. It is used to override the default configuration ( `-net nic -net user' ) which is activated if no `-net' options are provided.
`-tftp dir '
When using the user mode network stack, activate a built-in TFTP server. The files in dir will be exposed as the root of a TFTP server. The TFTP client on the guest must be configured in binary mode (use the command bin of the Unix TFTP client). The host IP address on the guest is as usual 10.0.2.2.
`-bootp file '
When using the user mode network stack, broadcast file as the BOOTP filename. In conjunction with `-tftp' , this can be used to network boot a guest from a local directory. Example (using pxelinux):
qemu -hda linux.img -boot n -tftp /path/to/tftp/files -bootp /pxelinux.0
`-smb dir '
When using the user mode network stack, activate a built-in SMB server so that Windows OSes can access to the host files in `dir ' transparently. In the guest Windows OS, the line:
10.0.2.4 smbserver
must be added in the file `C:\WINDOWS\LMHOSTS' (for windows 9x/Me) or `C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS' (Windows NT/2000). Then `dir ' can be accessed in `\\smbserver\qemu' . Note that a SAMBA server must be installed on the host OS in `/usr/sbin/smbd' . QEMU was tested successfully with smbd version 2.2.7a from the Red Hat 9 and version 3.0.10-1.fc3 from Fedora Core 3.
`-redir [tcp|udp]:host-port :[guest-host ]:guest-port '
When using the user mode network stack, redirect incoming TCP or UDP connections to the host port host-port to the guest guest-host on guest port guest-port . If guest-host is not specified, its value is 10.0.2.15 (default address given by the built-in DHCP server). For example, to redirect host X11 connection from screen 1 to guest screen 0, use the following:
# on the host
qemu -redir tcp:6001::6000 [...]
# this host xterm should open in the guest X11 server
xterm -display :1
To redirect telnet connections from host port 5555 to telnet port on the guest, use the following:
# on the host
qemu -redir tcp:5555::23 [...]
telnet localhost 5555
Then when you use on the host telnet localhost 5555 , you connect to the guest telnet server.

Linux boot specific: When using these options, you can use a given Linux kernel without installing it in the disk image. It can be useful for easier testing of various kernels.

`-kernel bzImage '
Use bzImage as kernel image.
`-append cmdline '
Use cmdline as kernel command line
`-initrd file '
Use file as initial ram disk.

Debug/Expert options:

`-serial dev '
Redirect the virtual serial port to host character device dev . The default device is vc in graphical mode and stdio in non graphical mode. This option can be used several times to simulate up to 4 serials ports. Use -serial none to disable all serial ports. Available character devices are:
vc[:WxH]
Virtual console. Optionally, a width and height can be given in pixel with
vc:800x600
It is also possible to specify width or height in characters:
vc:80Cx24C
pty
[Linux only] Pseudo TTY (a new PTY is automatically allocated)
none
No device is allocated.
null
void device
/dev/XXX
[Linux only] Use host tty, e.g. `/dev/ttyS0' . The host serial port parameters are set according to the emulated ones.
/dev/parportN
[Linux only, parallel port only] Use host parallel port N . Currently SPP and EPP parallel port features can be used.
file:filename
Write output to filename . No character can be read.
stdio
[Unix only] standard input/output
pipe:filename
name pipe filename
COMn
[Windows only] Use host serial port n
udp:[remote_host ]:remote_port [@[src_ip ]:src_port ]
This implements UDP Net Console. When remote_host or src_ip are not specified they default to 0.0.0.0 . When not using a specified src_port a random port is automatically chosen. If you just want a simple readonly console you can use netcat or nc , by starting qemu with: -serial udp::4555 and nc as: nc -u -l -p 4555 . Any time qemu writes something to that port it will appear in the netconsole session. If you plan to send characters back via netconsole or you want to stop and start qemu a lot of times, you should have qemu use the same source port each time by using something like -serial udp::4555@:4556 to qemu. Another approach is to use a patched version of netcat which can listen to a TCP port and send and receive characters via udp. If you have a patched version of netcat which activates telnet remote echo and single char transfer, then you can use the following options to step up a netcat redirector to allow telnet on port 5555 to access the qemu port.
Qemu Options:
-serial udp::4555@:4556
netcat options:
-u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
telnet options:
localhost 5555
tcp:[host ]:port [,server ][,nowait][,nodelay]
The TCP Net Console has two modes of operation. It can send the serial I/O to a location or wait for a connection from a location. By default the TCP Net Console is sent to host at the port . If you use the server option QEMU will wait for a client socket application to connect to the port before continuing, unless the nowait option was specified. The nodelay option disables the Nagle buffering algorithm. If host is omitted, 0.0.0.0 is assumed. Only one TCP connection at a time is accepted. You can use telnet to connect to the corresponding character device.
Example to send tcp console to 192.168.0.2 port 4444
-serial tcp:192.168.0.2:4444
Example to listen and wait on port 4444 for connection
-serial tcp::4444,server
Example to not wait and listen on ip 192.168.0.100 port 4444
-serial tcp:192.168.0.100:4444,server,nowait
telnet:host :port [,server][,nowait][,nodelay]
The telnet protocol is used instead of raw tcp sockets. The options work the same as if you had specified -serial tcp . The difference is that the port acts like a telnet server or client using telnet option negotiation. This will also allow you to send the MAGIC_SYSRQ sequence if you use a telnet that supports sending the break sequence. Typically in unix telnet you do it with Control-] and then type "send break" followed by pressing the enter key.
unix:path [,server][,nowait]
A unix domain socket is used instead of a tcp socket. The option works the same as if you had specified -serial tcp except the unix domain socket path is used for connections.
mon:dev_string
This is a special option to allow the monitor to be multiplexed onto another serial port. The monitor is accessed with key sequence of Control-a and then pressing c . See monitor access section 3.4 Keys in the -nographic section for more keys. dev_string should be any one of the serial devices specified above. An example to multiplex the monitor onto a telnet server listening on port 4444 would be:
-serial mon:telnet::4444,server,nowait
`-parallel dev '
Redirect the virtual parallel port to host device dev (same devices as the serial port). On Linux hosts, `/dev/parportN' can be used to use hardware devices connected on the corresponding host parallel port. This option can be used several times to simulate up to 3 parallel ports. Use -parallel none to disable all parallel ports.
`-monitor dev '
Redirect the monitor to host device dev (same devices as the serial port). The default device is vc in graphical mode and stdio in non graphical mode.
`-echr numeric_ascii_value'
Change the escape character used for switching to the monitor when using monitor and serial sharing. The default is 0x01 when using the -nographic option. 0x01 is equal to pressing Control-a . You can select a different character from the ascii control keys where 1 through 26 map to Control-a through Control-z. For instance you could use the either of the following to change the escape character to Control-t.
-echr 0x14
-echr 20
`-s'
Wait gdb connection to port 1234 (see section 3.11 GDB usage ).
`-p port '
Change gdb connection port. port can be either a decimal number to specify a TCP port, or a host device (same devices as the serial port).
`-S'
Do not start CPU at startup (you must type 'c' in the monitor).
`-d'
Output log in /tmp/qemu.log
`-hdachs c ,h ,s ,[,t ]'
Force hard disk 0 physical geometry (1 <= c <= 16383, 1 <= h <= 16, 1 <= s <= 63) and optionally force the BIOS translation mode ( t =none, lba or auto). Usually QEMU can guess all those parameters. This option is useful for old MS-DOS disk images.
`-L path'
Set the directory for the BIOS, VGA BIOS and keymaps.
`-std-vga'
Simulate a standard VGA card with Bochs VBE extensions (default is Cirrus Logic GD5446 PCI VGA). If your guest OS supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want to use high resolution modes (>= 1280x1024x16) then you should use this option.
`-no-acpi'
Disable ACPI (Advanced Configuration and Power Interface) support. Use it if your guest OS complains about ACPI problems (PC target machine only).
`-no-reboot'
Exit instead of rebooting.
`-loadvm file'
Start right away with a saved state ( loadvm in monitor)
`-semihosting'
Enable semihosting syscall emulation (ARM and M68K target machines only). On ARM this implements the "Angel" interface. On M68K this implements the "ColdFire GDB" interface used by libgloss. Note that this allows guest direct access to the host filesystem, so should only be used with trusted guest OS.

3.4 Keys

During the graphical emulation, you can use the following keys:

Ctrl-Alt-f
Toggle full screen
Ctrl-Alt-n
Switch to virtual console 'n'. Standard console mappings are:
1
Target system display
2
Monitor
3
Serial port
Ctrl-Alt
Toggle mouse and keyboard grab.

In the virtual consoles, you can use Ctrl-Up , Ctrl-Down , Ctrl-PageUp and Ctrl-PageDown to move in the back log.

During emulation, if you are using the `-nographic' option, use Ctrl-a h to get terminal commands:

Ctrl-a h
Print this help
Ctrl-a x
Exit emulator
Ctrl-a s
Save disk data back to file (if -snapshot)
Ctrl-a t
toggle console timestamps
Ctrl-a b
Send break (magic sysrq in Linux)
Ctrl-a c
Switch between console and monitor
Ctrl-a Ctrl-a
Send Ctrl-a

3.5 QEMU Monitor

The QEMU monitor is used to give complex commands to the QEMU emulator. You can use it to:

  • Remove or insert removable media images (such as CD-ROM or floppies).
  • Freeze/unfreeze the Virtual Machine (VM) and save or restore its state from a disk file.
  • Inspect the VM state without an external debugger.

3.5.1 Commands

The following commands are available:

`help or ? [cmd ]'
Show the help for all commands or just for command cmd .
`commit'
Commit changes to the disk images (if -snapshot is used).
`info subcommand '
Show various information about the system state.
`info network'
show the various VLANs and the associated devices
`info block'
show the block devices
`info registers'
show the cpu registers
`info history'
show the command line history
`info pci'
show emulated PCI device
`info usb'
show USB devices plugged on the virtual USB hub
`info usbhost'
show all USB host devices
`info capture'
show information about active capturing
`info snapshots'
show list of VM snapshots
`info mice'
show which guest mouse is receiving events
`q or quit'
Quit the emulator.
`eject [-f] device '
Eject a removable medium (use -f to force it).
`change device setting '
Change the configuration of a device.
`change diskdevice filename '
Change the medium for a removable disk device to point to filename . eg
(qemu) change cdrom /path/to/some.iso
`change vnc display ,options '
Change the configuration of the VNC server. The valid syntax for display and options are described at section 3.3 Invocation . eg
(qemu) change vnc localhost:1
`change vnc password'
Change the password associated with the VNC server. The monitor will prompt for the new password to be entered. VNC passwords are only significant upto 8 letters. eg.
(qemu) change vnc password
Password: ********
`screendump filename '
Save screen into PPM image filename .
`mouse_move dx dy [dz ]'
Move the active mouse to the specified coordinates dx dy with optional scroll axis dz .
`mouse_button val '
Change the active mouse button state val (1=L, 2=M, 4=R).
`mouse_set index '
Set which mouse device receives events at given index , index can be obtained with
info mice
`wavcapture filename [frequency [bits [channels ]]]'
Capture audio into filename . Using sample rate frequency bits per sample bits and number of channels channels . Defaults:
  • Sample rate = 44100 Hz - CD quality
  • Bits = 16
  • Number of channels = 2 - Stereo
`stopcapture index '
Stop capture with a given index , index can be obtained with
info capture
`log item1 [,...]'
Activate logging of the specified items to `/tmp/qemu.log' .
`savevm [tag |id ]'
Create a snapshot of the whole virtual machine. If tag is provided, it is used as human readable identifier. If there is already a snapshot with the same tag or ID, it is replaced. More info at section 3.6.3 VM snapshots .
`loadvm tag |id '
Set the whole virtual machine to the snapshot identified by the tag tag or the unique snapshot ID id .
`delvm tag |id '
Delete the snapshot identified by tag or id .
`stop'
Stop emulation.
`c or cont'
Resume emulation.
`gdbserver [port ]'
Start gdbserver session (default port =1234)
`x/fmt addr '
Virtual memory dump starting at addr .
`xp /fmt addr '
Physical memory dump starting at addr . fmt is a format which tells the command how to format the data. Its syntax is: `/{count}{format}{size}'
count
is the number of items to be dumped.
format
can be x (hex), d (signed decimal), u (unsigned decimal), o (octal), c (char) or i (asm instruction).
size
can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86, h or w can be specified with the i format to respectively select 16 or 32 bit code instruction size.
Examples:
  • Dump 10 instructions at the current instruction pointer:
    (qemu) x/10i $eip
    0x90107063:  ret
    0x90107064:  sti
    0x90107065:  lea    0x0(%esi,1),%esi
    0x90107069:  lea    0x0(%edi,1),%edi
    0x90107070:  ret
    0x90107071:  jmp    0x90107080
    0x90107073:  nop
    0x90107074:  nop
    0x90107075:  nop
    0x90107076:  nop
  • Dump 80 16 bit values at the start of the video memory.
    (qemu) xp/80hx 0xb8000
    0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
    0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
    0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
    0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
    0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
    0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
    0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
    0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
    0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
    0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
`p or print/fmt expr '
Print expression value. Only the format part of fmt is used.
`sendkey keys '
Send keys to the emulator. Use - to press several keys simultaneously. Example:
sendkey ctrl-alt-f1
This command is useful to send keys that your graphical user interface intercepts at low level, such as ctrl-alt-f1 in X Window.
`system_reset'
Reset the system.
`usb_add devname '
Add the USB device devname . For details of available devices see section 3.9.1 Connecting USB devices
`usb_del devname '
Remove the USB device devname from the QEMU virtual USB hub. devname has the syntax bus.addr . Use the monitor command info usb to see the devices you can remove.

3.5.2 Integer expressions

The monitor understands integers expressions for every integer argument. You can use register names to get the value of specifics CPU registers by prefixing them with $ .


类别:Auto Mobile Electric | 添加到搜藏 | 浏览( 49 ) | 评论  (0) <script> /*<![CDATA[*/ var pre = [true,'QEMU Emulator User Documentation ---1 【zz】', 'QEMU Emulator User Documentati...','/dereklouie/blog/item/67de64db37a27363d0164e1e.html']; var post = [true,'QEMU Emulator User Documentation ---3 【zz】','QEMU Emulator User Documentati...', '/dereklouie/blog/item/0f31e5996a906d0d6e068cc9.html']; if(pre[0] || post[0]){ document.write('<div style="height:5px;line-height:5px;">&nbsp;</div><div id="in_nav">'); if(pre[0]){ document.write('上一篇:<a href="' + pre[3] + '" title="' + pre[1] + '">' + pre[2] + '</a>&nbsp;&nbsp;&nbsp;&nbsp;'); } if(post[0]){ document.write('下一篇:<a href="' + post[3] + '" title="' + post[1] + '">' + post[2] + '</a>'); } document.write('</div>'); } /*]]>*/ </script>
 
 
/*<![CDATA[*/ #in_related_doc a { text-decoration:none; } /*]]>*/ <script type="text/javascript"> /*<![CDATA[*/ function HI_MOD_IN_RELATED_DOC_CALLBACK(arg){ if(arg.length <= 1) return false; var hasMore = arg[0]; var D=function(A,B){A[A.length]=B;} if(arg.length % 2 == 0) D(arg, ["","","",""]); var html = ['<div id="in_related_doc"><div class="tit">相关文章:</div>']; D(html, '<table cellpadding="0" cellspacing="3" border="0">'); for(var i = 1, j = arg.length; i < j; i += 2){ D(html, '<tr>'); D(html, '<td width="15px"><a style="font-size:25px" >&#8226;</a></td><td><a href="http://hi.baidu.com/' + arg[i][3] + '/blog/item/' + arg[i][2] + '.html" target="_blank" title="' + arg[i][0] + '">' + arg[i][1] + '</a>'); D(html, new Array(10).join('\u3000')); D(html, '</td>'); if(arg[i + 1][0] != "") D(html, '<td width="15px"><a style="font-size:25px" >&#8226;</a></td><td><a href="http://hi.baidu.com/' + arg[i + 1][3] + '/blog/item/' + arg[i + 1][2] + '.html" target="_blank" title="' + arg[i + 1][0] + '">' + arg[i + 1][1] + '</a></td>'); else D(html, '<td>&nbsp;</td><td>&nbsp;</td>'); D(html, '</tr>'); } if(hasMore) D(html, '<tr><td colspan="4"><a target="_blank" href="/sys/search?pageno=1&type=7&sort=1&word=QEMU%20Emulator%20User%20Documentation%20%2D%2D%2D2%20%A1%BEzz%A1%BF&item=85323fd0245cb08aa0ec9c1f">更多&gt;&gt;</a></td></tr>'); D(html, '</table></div><div class="line">&nbsp;</div>'); var div = document.getElementById('in_related_tmp'); if(div){ div.innerHTML = html.join(''); while(div.firstChild){ div.parentNode.insertBefore(div.firstChild, div); } div.parentNode.removeChild(div); } } if(RelatedDocData == -1){ // not supported xhr var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '/sys/search?type=8&word=QEMU%20Emulator%20User%20Documentation%20%2D%2D%2D2%20%A1%BEzz%A1%BF&item=85323fd0245cb08aa0ec9c1f&t=' + new Date().getTime(); document.getElementsByTagName('HEAD')[0].appendChild(script); }else if(RelatedDocData == null){ GetAndEval = true; }else{ eval(RelatedDocData); } /*]]>*/ </script>
最近读者:
<script> var g_spAnnony=true; var g_read=[ {} ]; g_read.length=g_read.length-1; var _rh1=""; var _rh2=""; function wrreader(){ _rh1 += '<table width="100%" ><tr>'; _rh2+='<tr>'; if(g_spAnnony){ _rh1+='<td align="center" width="10%" ><img border="0" width="55" height="55" src="http://img.baidu.com/hi/img/portraitn.jpg"></td>'; _rh2+='<td>&nbsp;</td>'; if(g_read.length>0){ _rh1+='<td align="left" width="12%">'; }else{ _rh1+='<td align="left" width="100%">'; } _rh1+="<a href='http://passport.baidu.com/?login&tpl=sp&tpl_reg=sp&u="+myref+"' target='_self'>登录</a>后,您就出现在这里。</td>"; _rh2+='<td>&nbsp;</td>' } if(g_read.length==0){ if(!g_spAnnony){ _rh1+='<td align=left width="100%">最近还没有登录用户看过这篇文章……</td>'; _rh2+='<td>&nbsp;</td>'; } }else{ for(i=0,len=g_read.length;i<len;i++){ _rh1+='<td align="center" valign="bottom" width="10%" class="user"><a href="/'+g_read[i][0]+'" target="_blank"><img border="0" src="http://himg.baidu.com/sys/portraitn/item/'+g_read[i][1]+'.jpg"></a></td>'; _rh2+='<td align="center" valign="top" class="user"><a href="/'+g_read[i][0]+'" target="_blank">'+g_read[i][2]+'</a></td>'; } } _rh1+='<td width="100%"></td></tr>'; _rh2+='<td></td></tr></table>'; document.write(_rh1+_rh2); } wrreader(); </script>
登录 后,您就出现在这里。
   
 
<script> allkey=allkey+"6b055ce9df147c3fb80e2d48_85323fd0245cb08aa0ec9c1f_"; </script>
网友评论:
<script> function writecmt(type,id,cmtname,cmturl,portraitId){ var html1=""; if(type==1){ html1="<a href='"+cmturl+"' target='_blank' title='"+cmturl+"'><img border='0' src='http://himg.baidu.com/sys/portraitn/item/"+portraitId+".jpg'><br>"+cmtname+"</a>"; }else{ if(cmtname=="" || cmtname=="匿名网友"){ if(cmturl==""){ html1="<a>匿名网友</a>"; }else{ html1="<a href='"+cmturl+"' target='_blank' title='"+cmturl+"'>"+cmtname+"</a>"; } }else{ if(cmturl==""){ html1="<div class='f14' style='display:inline'>网友:<a>"+cmtname+"</a></div>"; }else{ html1="<div class='f14' style='display:inline'>网友:<a href='"+cmturl+"' target='_blank' title='"+cmturl+"'>"+cmtname+"</a></div>"; } } } document.write(html1); } </script>
<script> document.write("<input type='hidden' name='spRefURL' value='"+window.location.href+"'>"); </script>
发表评论:
<script> G("spBlogCmtor").value=""; G("spBlogCmtURL").value=""; </script>
姓 名: <script> document.write(" &nbsp;&nbsp; <a href='http://passport.baidu.com/?reg&tpl=sp&return_method=get&skip_ok=1&u=http://hi.baidu.com/sys/reg/' target='_blank'>注册</a>"); document.write(" | <a href='http://passport.baidu.com/?login&tpl=sp&tpl_reg=sp&u="+myref+"'>登录</a>"); </script>    注册 | 登录
*姓名最长为50字节
   
网址或邮箱: (选填)
   
内 容: <script> G("spBlogCmtor").value=G("spBlogCmtor").defaultValue; G("spBlogCmtText").value=""; </script> </td></tr>
   
验证码:
<script type="text/javascript"> /*<![CDATA[*/ var imgsrc="http://hiup.baidu.com/cgi-bin/genimg?1941CC86BD37265992C639E4BD2F647291326A2EBEECC8F68765094CCC239C31E30379BEB494A75B9B735F908F1104D1835D19A71EA96F5EFF1528DA8D122C5F"; function f_focus(){ if(G('yanzheng').style.display=="none" ){ G('verifypic').src=imgsrc; G('yanzheng').style.display="block"; } } function newverifypic(){ G("verifypic").src = imgsrc +"&t="+ Math.random(); return false; } /*]]>*/ </script>
 

     
<script> <!-- var hstr="/dereklouie/brwstat?key1=1"; document.write("<script src='"+hstr+"&key2="+allkey+"'><\/script>"); //--> </script> <script src="http://hi.baidu.com/dereklouie/brwstat?key1=1&amp;amp;key2=6b055ce9df147c3fb80e2d48_85323fd0245cb08aa0ec9c1f_"></script>
©2008 Baidu
<script> if(document.getElementById("m_blog")) { var imgarray = document.getElementById("m_blog").getElementsByTagName('img'); var imgw = document.getElementById("m_blog").offsetWidth; imgw =imgw-40; for(var i=0; i<imgarray.length; i++){ if(imgarray[i].className=="blogimg" && imgarray[i].width>=imgw) imgarray[i].width=imgw; } } // Fix ff bugs var blog_text = document.getElementById('blog_text'); blog_text.innerHTML = blog_text.innerHTML.replace(/href\s*=\s*("|')?(\.\.\/\.\.\/)/gi,"href=$1../$2"); </script>

你可能感兴趣的:(.net,linux,socket,XP,vc++)