1
0
forked from x/icebergs
icebergs/base/ssh/service_darwin.go
2021-01-30 17:50:14 +08:00

22 lines
523 B
Go

package ssh
import (
ice "github.com/shylinux/icebergs"
"golang.org/x/crypto/ssh"
"encoding/binary"
"net"
"syscall"
"unsafe"
)
func _ssh_size(fd uintptr, b []byte) {
w := binary.BigEndian.Uint32(b)
h := binary.BigEndian.Uint32(b[4:])
ws := &Winsize{Width: uint16(w), Height: uint16(h)}
syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(syscall.TIOCSWINSZ), uintptr(unsafe.Pointer(ws)))
}
func _ssh_handle(m *ice.Message, meta map[string]string, c net.Conn, channel ssh.Channel, requests <-chan *ssh.Request) {
}