Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 48) sorted by relevance

12

/lib/liblwip/src/api/
Dnetbuf.c58 struct netbuf *buf; in netbuf_new() local
60 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); in netbuf_new()
61 if (buf != NULL) { in netbuf_new()
62 buf->p = NULL; in netbuf_new()
63 buf->ptr = NULL; in netbuf_new()
64 ip_addr_set_any(&buf->addr); in netbuf_new()
65 buf->port = 0; in netbuf_new()
68 buf->flags = 0; in netbuf_new()
70 buf->toport_chksum = 0; in netbuf_new()
72 ip_addr_set_any(&buf->toaddr); in netbuf_new()
[all …]
Dapi_lib.c344 void *buf = NULL; in netconn_recv_data() local
366 if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { in netconn_recv_data()
371 sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); in netconn_recv_data()
379 if (!netconn_get_noautorecved(conn) || (buf == NULL)) { in netconn_recv_data()
385 if (buf != NULL) { in netconn_recv_data()
386 msg.msg.msg.r.len = ((struct pbuf *)buf)->tot_len; in netconn_recv_data()
395 if (buf == NULL) { in netconn_recv_data()
401 len = ((struct pbuf *)buf)->tot_len; in netconn_recv_data()
409 LWIP_ASSERT("buf != NULL", buf != NULL); in netconn_recv_data()
410 len = netbuf_len((struct netbuf *)buf); in netconn_recv_data()
[all …]
/lib/liblwip/src/include/lwip/
Dnetbuf.h65 void netbuf_delete (struct netbuf *buf);
66 void * netbuf_alloc (struct netbuf *buf, u16_t size);
67 void netbuf_free (struct netbuf *buf);
68 err_t netbuf_ref (struct netbuf *buf,
73 err_t netbuf_data (struct netbuf *buf,
75 s8_t netbuf_next (struct netbuf *buf);
76 void netbuf_first (struct netbuf *buf);
79 #define netbuf_copy_partial(buf, dataptr, len, offset) \ argument
80 pbuf_copy_partial((buf)->p, (dataptr), (len), (offset))
81 #define netbuf_copy(buf,dataptr,len) netbuf_copy_partial(buf, dataptr, len, 0) argument
[all …]
Dnetdb.h101 int lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf,
111 #define gethostbyname_r(name, ret, buf, buflen, result, h_errnop) \ argument
112 lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop)
/sys/dev/x86/
Dioport.h59 static __inline__ void insb(int port,void *buf,int cnt) in insb() argument
62 : "=D" (buf), "=c" (cnt) in insb()
63 : "d" (port), "0" (buf), "1" (cnt) : "memory", "cc"); in insb()
66 static __inline__ void insw(int port,void *buf,int cnt) in insw() argument
69 : "=D" (buf), "=c" (cnt) in insw()
70 : "d" (port), "0" (buf), "1" (cnt) : "memory", "cc"); in insw()
73 static __inline__ void insl(int port,void *buf,int cnt) in insl() argument
76 : "=D" (buf), "=c" (cnt) in insl()
77 : "d" (port), "0" (buf), "1" (cnt) : "memory", "cc"); in insl()
80 static __inline__ void outsb(int port,const void *buf,int cnt) in outsb() argument
[all …]
Dide.c76 int IDE_Read(Disk *disk, void *buf, SGArray *sga, DiskCB, void *arg);
77 int IDE_Write(Disk *disk, void *buf, SGArray *sga, DiskCB, void *arg);
78 int IDE_Flush(Disk *disk, void *buf, SGArray *sga, DiskCB, void *arg);
79 int IDE_ReadOne(IDEDrive *drive, void *buf, uint64_t off, uint64_t len);
80 int IDE_WriteOne(IDEDrive *drive, void *buf, uint64_t off, uint64_t len);
271 IDE_Read(Disk *disk, void *buf, SGArray *sga, DiskCB cb, void *arg) in IDE_Read() argument
281 buf, in IDE_Read()
284 buf += sga->entries[i].length; in IDE_Read()
293 IDE_Write(Disk *disk, void *buf, SGArray *sga, DiskCB cb, void *arg) in IDE_Write() argument
303 buf, in IDE_Write()
[all …]
/bin/shell/
Dshell.c15 void DispatchCommand(char *buf);
20 char buf[256]; in main() local
26 fgets(buf, sizeof(buf), stdin); in main()
28 DispatchCommand(buf); in main()
102 DispatchCommand(char *buf) in DispatchCommand() argument
110 for (i = 0; buf[i] != 0; i++) { in DispatchCommand()
111 if (buf[i] == '\n') { in DispatchCommand()
112 buf[i] = '\0'; in DispatchCommand()
118 nextArg = strtok(buf, " \t\r\n"); in DispatchCommand()
136 } else if (buf[0] == '\0') { in DispatchCommand()
/sys/kern/
Ddisk.c44 Disk_Read(Disk *disk, void *buf, SGArray *sga, DiskCB cb, void *arg) in Disk_Read() argument
46 return disk->read(disk, buf, sga, cb, arg); in Disk_Read()
50 Disk_Write(Disk *disk, void *buf, SGArray *sga, DiskCB cb, void *arg) in Disk_Write() argument
52 return disk->write(disk, buf, sga, cb, arg); in Disk_Write()
56 Disk_Flush(Disk *disk, void *buf, SGArray *sga, DiskCB cb, void *arg) in Disk_Flush() argument
58 return disk->flush(disk, buf, sga, cb, arg); in Disk_Flush()
79 char buf[512]; in Debug_DumpDisk() local
99 Disk_Read(d, &buf, &sga, NULL, NULL); in Debug_DumpDisk()
100 Debug_PrintHex((const char *)&buf, 512, 0, 512); in Debug_DumpDisk()
Dvfs.c180 VFS_Read(VNode *fn, void *buf, uint64_t off, uint64_t len) in VFS_Read() argument
182 return fn->op->read(fn, buf, off, len); in VFS_Read()
198 VFS_Write(VNode *fn, void *buf, uint64_t off, uint64_t len) in VFS_Write() argument
200 return fn->op->write(fn, buf, off, len); in VFS_Write()
216 VFS_ReadDir(VNode *fn, void *buf, uint64_t len, uint64_t *off) in VFS_ReadDir() argument
218 return fn->op->readdir(fn, buf, len, off); in VFS_ReadDir()
Dvfsuio.c16 VFSUIO_Read(Handle *handle, void *buf, uint64_t len, uint64_t off) in VFSUIO_Read() argument
22 return VFS_Read(handle->vnode, buf, len, off); in VFSUIO_Read()
26 VFSUIO_Write(Handle *handle, void *buf, uint64_t len, uint64_t off) in VFSUIO_Write() argument
32 return VFS_Write(handle->vnode, buf, len, off); in VFSUIO_Write()
Dbufcache.c232 void *buf; in BufCache_Read() local
250 buf = (*entry)->buffer; in BufCache_Read()
258 status = Disk_Read(disk, buf, &sga, NULL, NULL); in BufCache_Read()
275 void *buf = entry->buffer; in BufCache_Write() local
281 return Disk_Write(entry->disk, buf, &sga, NULL, NULL); in BufCache_Write()
Dmalloc.c52 Malloc_Free(Heap *heap, void *buf) in Malloc_Free() argument
57 Malloc_Realloc(Heap *heap, void *buf, uint64_t newlen) in Malloc_Realloc() argument
/sys/include/
Dvfs.h47 int (*read)(VNode *fn, void *buf, uint64_t off, uint64_t len);
48 int (*write)(VNode *fn, void *buf, uint64_t off, uint64_t len);
49 int (*readdir)(VNode *fn, void *buf, uint64_t len, uint64_t *off);
58 int VFS_Read(VNode *fn, void *buf, uint64_t off, uint64_t len);
59 int VFS_Write(VNode *fn, void *buf, uint64_t off, uint64_t len);
60 int VFS_ReadDir(VNode *fn, void *buf, uint64_t len, uint64_t *off);
Ddisk.h27 int Disk_Read(Disk *disk, void * buf, SGArray *sga, DiskCB cb, void *arg);
28 int Disk_Write(Disk *disk, void * buf, SGArray *sga, DiskCB cb, void *arg);
29 int Disk_Flush(Disk *disk, void * buf, SGArray *sga, DiskCB cb, void *arg);
/lib/liblwip/src/netif/ppp/
Dmd5.c59 static void Transform (u32_t *buf, u32_t *in);
123 mdContext->buf[0] = (u32_t)0x67452301UL; in MD5Init()
124 mdContext->buf[1] = (u32_t)0xefcdab89UL; in MD5Init()
125 mdContext->buf[2] = (u32_t)0x98badcfeUL; in MD5Init()
126 mdContext->buf[3] = (u32_t)0x10325476UL; in MD5Init()
167 Transform (mdContext->buf, in); in MD5Update()
202 Transform (mdContext->buf, in); in MD5Final()
206 mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF); in MD5Final()
208 (unsigned char)((mdContext->buf[i] >> 8) & 0xFF); in MD5Final()
210 (unsigned char)((mdContext->buf[i] >> 16) & 0xFF); in MD5Final()
[all …]
Drandm.c123 avGenRand(char *buf, u32_t bufLen) in avGenRand() argument
136 MEMCPY(buf, tmp, n); in avGenRand()
137 buf += n; in avGenRand()
/lib/libc/
Dtime.c50 asctime_r(const struct tm *tm, char *buf) in asctime_r() argument
55 snprintf(buf, 26, "%s %s %2d %2d:%02d:%02d %4d\n", in asctime_r()
60 return buf; in asctime_r()
66 static char buf[26]; in asctime() local
67 return asctime_r(tm, buf); in asctime()
71 ctime_r(const time_t *timep, char *buf) in ctime_r() argument
74 return asctime_r(localtime_r(timep, &tm), buf); in ctime_r()
Dprintf.c32 char buf[64]; in printnum() local
33 char *p = buf; in printnum()
50 spaces = width - (p - buf); in printnum()
60 while (p != buf) { in printnum()
237 char *buf; member
247 (state->cur - state->buf >= state->maxlen)) { in strputc()
262 state.buf = str; in sprintf()
281 state.buf = str; in snprintf()
Dfile.c110 fread(void *buf, size_t size, size_t nmemb, FILE *fh) in fread() argument
112 return OSRead(fh->fd, buf, 0, size * nmemb); in fread()
117 fwrite(const void *buf, size_t size, size_t nmemb, FILE *fh) in fwrite() argument
119 return OSWrite(fh->fd, buf, 0, size * nmemb); in fwrite()
/bin/cat/
Dcat.c18 char buf[256]; in main() local
39 OSRead(fd, &buf, i, len); in main()
40 OSWrite(1, &buf, 0, len); in main()
/lib/liblwip/src/arch/
Detherif.c138 char buf[1500]; in low_level_output() local
143 bufptr = &buf[0]; in low_level_output()
155 mbuf.vaddr = (uint64_t)buf; in low_level_output()
189 char buf[1500]; in low_level_input() local
196 mbuf.vaddr = (uint64_t)buf; in low_level_input()
225 bufptr = &buf[0]; in low_level_input()
/bin/ethinject/
Dethinject.c12 static char buf[4096]; variable
20 mbuf.vaddr = (uint64_t)&buf; in writePacket()
55 struct ether_header *hdr = (struct ether_header *)&buf; in main()
/bin/ethdump/
Dethdump.c10 static char buf[4096]; variable
16 struct ether_header *hdr = (struct ether_header *)&buf; in dumpPacket()
35 mbuf.vaddr = (uint64_t)&buf; in readPacket()
/sys/fs/o2fs/
Do2fs.c25 int O2FS_Read(VNode *fn, void *buf, uint64_t off, uint64_t len);
26 int O2FS_Write(VNode *fn, void *buf, uint64_t off, uint64_t len);
27 int O2FS_ReadDir(VNode *fn, void *buf, uint64_t len, uint64_t *off);
512 O2FS_Read(VNode *fn, void *buf, uint64_t off, uint64_t len) in O2FS_Read() argument
549 DLOG(o2fs, "READ %lx %lx %lld\n", buf, entry->buffer, bLen); in O2FS_Read()
550 memcpy(buf, entry->buffer + bOff, bLen); in O2FS_Read()
554 buf += bLen; in O2FS_Read()
578 O2FS_Write(VNode *fn, void *buf, uint64_t off, uint64_t len) in O2FS_Write() argument
615 DLOG(o2fs, "WRITE %lx %lx %lld\n", buf, entry->buffer, bLen); in O2FS_Write()
616 memcpy(entry->buffer + bOff, buf, bLen); in O2FS_Write()
[all …]
/sys/dev/
Dconsole.c151 Console_Read(Handle *handle, void *buf, uint64_t off, uint64_t len) in Console_Read() argument
153 uintptr_t b = (uintptr_t)buf; in Console_Read()
167 Console_Write(Handle *handle, void *buf, uint64_t off, uint64_t len) in Console_Write() argument
170 uintptr_t b = (uintptr_t)buf; in Console_Write()

12