如果MIB_IF_ROW2结构的成员值超过限制怎么办?

时间:2016-06-01 04:25:52

标签: windows winapi networking interface

出于好奇,这只是一个问题。 Windows函数MIB_IF_ROW2InOctets结构返回输出。 OutOctetsULONG64等结构的某些成员属于ULONG64类型。 This microsoft page表示18446744073709551615的最大限制为InOctets。由于这些OutOctets[ { "name":"Cedar Run", "album_name":"CedarRun", "img":[ { "thumb":["cedarRun.jpg", "cedarRun.jpg","cedarRun.jpg"] }, { "large":["IMG_6001.jpg","IMG_6009.jpg"] } ], "cabin_id":"17", "sleeps":"2", "description":"1 Room", "number_of_bedrooms":"1", "bedrooms": { "bedroom1":"1 Queen", "bedroom2":"", "bedroom3":"", "bedroom4":"" }, "pull_out":"", "living_room":"", "bathrooms":"", "bathroom_info":"Bath with Tub/Shower", "other_info":"", "winter_info":"Winter RR Only", "winter_rate":"198.90", "summer_info":"Summer RR Only", "summer_rate":"198.90", "cabin_description":"Quaint cabin perfect for two. A unique location with a view of the horseback rides going by throughout the day. Also has one small dorm refrigerator and working fireplace with firewood supplied by the ranch." }, { "name":"Pioneer", "album_name":"Pioneer", "img":[ { "thumb": ["pioneer.jpg"] }, { "large":["IMG_8561.jpg","IMG_8567.jpg", "IMG_8568.jpg"] } ], "cabin_id":"25", "sleeps":"2", "description":"1 Room", "number_of_bedrooms":"1", "bedrooms": { "bedroom1":"1 Queen", "bedroom2":"", "bedroom3":"", "bedroom4":"" }, "pull_out":"", "living_room":"", "bathrooms":"", "bathroom_info":"Bath with Tub/Shower", "other_info":"", "winter_info":"Winter RR Only", "winter_rate":"198.90", "summer_info":"Summer RR Only", "summer_rate":"198.90", "cabin_description":"One cozy cabin built in the log style with country charm in mind. Located along the hillside of the sledding hill overlooking the ranch. Also has one small dorm refrigerator and working fireplace with firewood supplied by the ranch." } ] 等继续增加,如果值超出限制会发生什么?它会返回还是失败?

1 个答案:

答案 0 :(得分:1)

永远不会发生。那么多字节等于~17179869184 GiB,为了传输那么多数据,你需要每年发送或接收一个完整的千兆字节超过540年。

但如果确实发生了这种情况,那么溢出行为将完全取决于网络驱动程序,因为这是报告数据的内容(根据this NDIS summary)。很可能,它只会翻到零并重新开始计数。 select * from T where C like 'myprefix%' select * from T where C ~ '^myprefix' 只是为您提供从驱动程序收到的任何数据。