Home
last modified time | relevance | path

Searched refs:socket (Results 1 – 14 of 14) sorted by relevance

/DragonOS-0.1.9/kernel/src/net/
Dsyscall.rs15 net::socket::{AddressFamily, SOL_SOCKET},
21 socket::{new_socket, PosixSocketType, Socket, SocketHandleItem, SocketInode, HANDLE_MAP},
35 pub fn socket( in socket() method
44 let socket = new_socket(address_family, socket_type, protocol)?; in socket() localVariable
46 let handle_item = SocketHandleItem::new(&socket); in socket()
49 .insert(socket.socket_handle(), handle_item); in socket()
51 let socketinode: Arc<SocketInode> = SocketInode::new(socket); in socket()
89 let mut alloc_fd = |socket: Box<dyn Socket>| -> Result<i32, SystemError> { in socketpair()
90 let socketinode = SocketInode::new(socket); in socketpair()
119 let socket: SpinLockGuard<Box<dyn Socket>> = socket_inode.inner(); in setsockopt() localVariable
[all …]
Dnet_core.rs2 use smoltcp::{socket::dhcpv4, wire};
9 net::{socket::SocketPollMethod, NET_DRIVERS},
15 socket::{sockets::TcpSocket, HANDLE_MAP, SOCKET_SET},
206 smoltcp::socket::Socket::Raw(_) | smoltcp::socket::Socket::Udp(_) => { in send_event()
213 smoltcp::socket::Socket::Icmp(_) => unimplemented!("Icmp socket hasn't unimplemented"), in send_event()
214 smoltcp::socket::Socket::Tcp(inner_socket) => { in send_event()
218 if inner_socket.state() == smoltcp::socket::tcp::State::Established { in send_event()
227 smoltcp::socket::Socket::Dhcpv4(_) => {} in send_event()
228 smoltcp::socket::Socket::Dns(_) => unimplemented!("Dns socket hasn't unimplemented"), in send_event()
Dmod.rs13 pub mod socket; module
/DragonOS-0.1.9/kernel/src/net/socket/
Dsockets.rs4 socket::{raw, tcp, udp},
62 let socket = raw::Socket::new( in new() localVariable
71 GlobalSocketHandle::new(SOCKET_SET.lock_irqsave().add(socket)); in new()
103 let socket = socket_set_guard.get_mut::<raw::Socket>(self.handle.0); in read() localVariable
105 match socket.recv_slice(buf) { in read()
136 let socket = socket_set_guard.get_mut::<raw::Socket>(self.handle.0); in write() localVariable
137 match socket.send_slice(buf) { in write()
150 let socket: &mut raw::Socket = in write() localVariable
180 packet.set_next_header(socket.ip_protocol().into()); in write()
190 socket.send_slice(&buffer).unwrap(); in write()
[all …]
Dmod.rs13 socket::{self, tcp, udp},
61 let socket: Box<dyn Socket> = match address_family { in new_socket() localVariable
83 Ok(socket) in new_socket()
291 pub fn new(socket: Box<dyn Socket>) -> Arc<Self> { in new()
292 Arc::new(Self(SpinLock::new(socket), AtomicUsize::new(0))) in new()
315 let mut socket = self.0.lock_irqsave(); in close() localVariable
317 if socket.metadata().unwrap().socket_type == SocketType::SeqpacketSocket { in close()
321 if let Some(Endpoint::Ip(Some(ip))) = socket.endpoint() { in close()
322 PORT_MANAGER.unbind_port(socket.metadata().unwrap().socket_type, ip.port)?; in close()
325 socket.clear_epoll()?; in close()
[all …]
/DragonOS-0.1.9/user/apps/test_bind/
Dmain.c25 if ((tcp_sk_fd1 = socket(AF_INET, SOCK_STREAM, 0)) == 0) in test_tcp_bind()
30 if ((tcp_sk_fd2 = socket(AF_INET, SOCK_STREAM, 0)) == 0) in test_tcp_bind()
35 if ((tcp_sk_fd3 = socket(AF_INET, SOCK_STREAM, 0)) == 0) in test_tcp_bind()
87 if ((udp_sk_fd1 = socket(AF_INET, SOCK_DGRAM, 0)) == 0) in test_udp_bind()
92 if ((udp_sk_fd2 = socket(AF_INET, SOCK_DGRAM, 0)) == 0) in test_udp_bind()
97 if ((udp_sk_fd3 = socket(AF_INET, SOCK_DGRAM, 0)) == 0) in test_udp_bind()
149 if ((tcp_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) in test_all_ports()
175 if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) in main()
181 if ((udp_sk_fd = socket(AF_INET, SOCK_DGRAM, 0)) == 0) in main()
/DragonOS-0.1.9/kernel/
DCargo.toml45 …alse, features = ["log", "alloc", "socket-raw", "socket-udp", "socket-tcp", "socket-icmp", "socke…
/DragonOS-0.1.9/docs/community/ChangeLog/V0.1.x/
DV0.1.7.md198 新增网络socket的系统调用接口 (#247)
202 3.完善tcp,udp,raw socket
271 增加对dhcpv4的支持(tcp、udp socket已写好,但由于缺少epoll机制,尚未完整测试) (#237)
275 * raw socket
277 * 初步写完udp和tcp socket
DV0.1.8.md311 * 实现socket关闭时,端口在表中移除
DV0.1.9.md802 - 添加事件等待队列,提升socket性能
1246 2.修复socket inode 的read和write方法里面没有使用no_preempt的问题
/DragonOS-0.1.9/kernel/src/filesystem/vfs/
Dfile.rs19 socket::SocketInode,
479 let mut socket = inode.inner(); in add_epoll() localVariable
481 return socket.add_epoll(epitem); in add_epoll()
507 let mut socket = inode.inner(); in remove_epoll() localVariable
509 return socket.remove_epoll(epoll); in remove_epoll()
/DragonOS-0.1.9/user/apps/http_server/
Dmain.c183 if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) in main()
/DragonOS-0.1.9/kernel/src/process/
Dmod.rs45 net::socket::SocketInode,
811 let socket: Arc<SocketInode> = guard in get_socket() localVariable
815 return Some(socket); in get_socket()
/DragonOS-0.1.9/kernel/src/syscall/
Dmod.rs448 SYS_SOCKET => Self::socket(args[0], args[1], args[2]), in handle()