Git Product home page Git Product logo

libnet's Introduction

about me

社会介绍:
喜爱书籍:《道德经》,《易经》,《黄帝内经》,《圣经》,《庄子》。
自我称谓:虚混真人(取之圣经的第一句话,但活的更像个道人)。
宗教信仰:有神论(相信神的存在,具体神的模样不清楚)。
政治面貌:无党派(虽是平民一个,但不愿称群众)。
生辰八字:辛酉 辛卯 己亥 丁卯(刚出太阳)。
饮食习惯:不彻底的素食主义者,喜辛辣,偏伊斯兰风味。

计算机介绍:
数据库: SQLite,MySQL.
编程语言:c(vc, gcc), rust, lua.
调试工具:windbg, gdb, adb, ida.
操作系统:Windows, Linux, Android.
个人代表:Richard Stallman(自由的精神),John von Neumann(严谨的理论),Linus Benedict Torvalds(扎实的技术).
公司代表:Netscape(孕育了js,tls,rust),Google LLC(做事有底线),Apple Inc(引领消费者).

libnet's People

Contributors

kouzhudong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

libnet's Issues

Refactor Function BOOLEAN GUIDsAreEqual(...) in wpc.cpp

The function can be written as

bool GUIDsAreEqual(In const GUID* pGUIDAlpha, In const GUID* pGUIDOmega)
{
RPC_STATUS status = ERROR_TIMEOUT;

return (UuidEqual((UUID*)pGUIDAlpha, (UUID*)pGUIDOmega, &status) == RPC_S_OK) ? true : false;

}

and if we dont need to use status at all we can pass a nullptr instead of status.

On the other hand, if it is necessary to print out the status,
as here printf("GUIDsAreEqual : UuidEqual() [status %#x]", status);, consider refactoring the function like

bool GUIDsAreEqual(In const GUID* pGUIDAlpha, In const GUID* pGUIDOmega, RPC_STATUS* status)
{
return (UuidEqual((UUID*)pGUIDAlpha, (UUID*)pGUIDOmega, status) == RPC_S_OK) ? true : false;
}

Both alternatives will reduce the size and increase readability, as well as removing the goto statement.

NotifyIpInterfaceChange

大佬你好,请问NotifyIpInterfaceChange 这个函数,调用如下
NotifyIpInterfaceChange(AF_UNSPEC,(PIPINTERFACE_CHANGE_CALLBACK)CBNetFaceChange,NULL,FALSE,&m_hNotify);
想在Ipv4和ipv6的 IP有变更时触发,可是实际使用中,ipv4变化能触发回调函数,但是ipv6变化,却无法触发回调函数,请问这是什么原因,在网络上找不到合理的解答。
还有代码用vs2019编译,显示缺少一些头文件及依赖dll

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.