gpt4 book ai didi

Linux套接字操作

转载 作者:太空宇宙 更新时间:2023-11-04 11:29:14 26 4
gpt4 key购买 nike

我正在跟踪套接字相关代码,但找不到与系统调用写入或读取对应的套接字操作。有谁能够帮助我?下面的代码段是sock ops。 sys write or read 对应哪个?谢谢!!!!!!

static const struct proto_ops hci_sock_ops = {
.family = PF_BLUETOOTH,
.owner = THIS_MODULE,
.release = hci_sock_release,
.bind = hci_sock_bind,
.getname = hci_sock_getname,
.sendmsg = hci_sock_sendmsg,
.recvmsg = hci_sock_recvmsg,
.ioctl = hci_sock_ioctl,
.poll = datagram_poll,
.listen = sock_no_listen,
.shutdown = sock_no_shutdown,
.setsockopt = hci_sock_setsockopt,
.getsockopt = hci_sock_getsockopt,
.connect = sock_no_connect,
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.mmap = sock_no_mmap
};

最佳答案

大部分魔术 - 多路分解 - 发生在 VFS 层。读/写函数分别是*_recvmsg*_sendmsg

关于Linux套接字操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12347139/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com