SQL2008新应用之T-SQL Grouping sets
2007-11-11 11:34:17 来源:WEB开发网核心提示: // Module Name: Ping.c Description:// This sample illustrates how an ICMP ping app can be written// using the SOCK_RAW socket type and IPPROTO_ICMP proto
// Module Name: Ping.c
//
// Description:
// This sample illustrates how an ICMP ping app can be written
// using the SOCK_RAW socket type and IPPROTO_ICMP protocol.
// By creating a raw socket, the underlying layer does not change
// the protocol header so that when we submit the ICMP header
// nothing is changed so that the receiving end will see an
// ICMP packet. Additionally, we use the record route IP option
// to get a round trip path to the endpoint. Note that the size
// of the IP option header that records the route is limited to
// nine IP addresses.
//
// Compile:
// cl -o Ping Ping.c ws2_32.lib /Zp1
//
// Command Line Options/Parameters:
// Ping [host] [packet-size]
//
// host String name of host to ping
// packet-size Integer size of packet to send
// (smaller than 1024 bytes)
//
//#pragma pack(1)
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
#include
#define IP_RECORD_ROUTE 0x7
//
// IP header structure
//
typedef struct _iphdr
{
unsigned int h_len:4; // Length of the header
unsigned int version:4; // Version of IP
unsigned char tos; // Type of service
unsigned short total_len; // Total length of the packet
unsigned short ident; // Unique identifier
unsigned short frag_and_flags; // Flags
unsigned char ttl; // Time to live
unsigned char proto; // Protocol (TCP, UDP etc)
unsigned short checksum; // IP checksum
unsigned int sourceIP;
unsigned int destIP;
} IpHeader;
//
// Description:
// This sample illustrates how an ICMP ping app can be written
// using the SOCK_RAW socket type and IPPROTO_ICMP protocol.
// By creating a raw socket, the underlying layer does not change
// the protocol header so that when we submit the ICMP header
// nothing is changed so that the receiving end will see an
// ICMP packet. Additionally, we use the record route IP option
// to get a round trip path to the endpoint. Note that the size
// of the IP option header that records the route is limited to
// nine IP addresses.
//
// Compile:
// cl -o Ping Ping.c ws2_32.lib /Zp1
//
// Command Line Options/Parameters:
// Ping [host] [packet-size]
//
// host String name of host to ping
// packet-size Integer size of packet to send
// (smaller than 1024 bytes)
//
//#pragma pack(1)
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
#include
#define IP_RECORD_ROUTE 0x7
//
// IP header structure
//
typedef struct _iphdr
{
unsigned int h_len:4; // Length of the header
unsigned int version:4; // Version of IP
unsigned char tos; // Type of service
unsigned short total_len; // Total length of the packet
unsigned short ident; // Unique identifier
unsigned short frag_and_flags; // Flags
unsigned char ttl; // Time to live
unsigned char proto; // Protocol (TCP, UDP etc)
unsigned short checksum; // IP checksum
unsigned int sourceIP;
unsigned int destIP;
} IpHeader;
- ››sql server自动生成批量执行SQL脚本的批处理
- ››sql server 2008亿万数据性能优化
- ››SQL Server 2008清空数据库日志方法
- ››sqlserver安装和简单的使用
- ››SQL Sever 2008 R2 数据库管理
- ››SQL SERVER无法安装成功,sqlstp.log文件提示[未发...
- ››Sql Server中通过父记录查找出所有关联的子记录
- ››SqlServer触发器、存储过程和函数
- ››SQL Server 中的事务(含义,属性,管理)
- ››Sqlite数据库插入和读取图片数据
- ››Sql server 2005拒绝了对对象 'xx表' (数...
- ››Sql server 2005拒绝了对对象 'xx表' (数...
更多精彩
赞助商链接