/external/syslinux/gpxe/src/include/gpxe/ |
iobuf.h | 65 * @v iobuf I/O buffer 69 static inline void * iob_reserve ( struct io_buffer *iobuf, size_t len ) { 70 iobuf->data += len; 71 iobuf->tail += len; 72 return iobuf->data; 74 #define iob_reserve( iobuf, len ) ( { \ 76 __result = iob_reserve ( (iobuf), (len) ); \ 77 assert ( (iobuf)->tail <= (iobuf)->end ); \ 83 * @v iobuf I/O buffe [all...] |
ndp.h | 8 #include <gpxe/iobuf.h> 20 int ndp_process_advert ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src,
|
tcpip.h | 56 * @v iobuf I/O buffer 64 int ( * rx ) ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, 85 * @v iobuf I/O buffer 95 int ( * tx ) ( struct io_buffer *iobuf, 116 extern int tcpip_rx ( struct io_buffer *iobuf, uint8_t tcpip_proto, 119 extern int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip,
|
/external/syslinux/gpxe/src/core/ |
iobuf.c | 24 #include <gpxe/iobuf.h> 36 * @ret iobuf I/O buffer, or NULL if none available 42 struct io_buffer *iobuf = NULL; local 50 len = ( len + __alignof__( *iobuf ) - 1 ) & 51 ~( __alignof__( *iobuf ) - 1 ); 54 data = malloc_dma ( len + sizeof ( *iobuf ), IOB_ALIGN ); 58 iobuf = ( struct io_buffer * ) ( data + len ); 59 iobuf->head = iobuf->data = iobuf->tail = data [all...] |
xfer.c | 122 * @ret iobuf I/O buffer 126 struct io_buffer *iobuf; local 130 iobuf = dest->op->alloc_iob ( dest, len ); 132 if ( ! iobuf ) { 136 return iobuf; 143 * @v iobuf Datagram I/O buffer 148 struct io_buffer *iobuf, 154 iob_len ( iobuf ) ); 156 rc = dest->op->deliver_iob ( dest, iobuf, meta ); 170 * @v iobuf Datagram I/O buffe 253 struct io_buffer *iobuf; local 374 struct io_buffer *iobuf; local [all...] |
posix_io.c | 73 struct io_buffer *iobuf; local 76 list_for_each_entry_safe ( iobuf, tmp, &file->data, list ) { 77 list_del ( &iobuf->list ); 78 free_iob ( iobuf ); 112 * @v iobuf I/O buffer 118 struct io_buffer *iobuf, 130 if ( iob_len ( iobuf ) ) { 131 list_add_tail ( &iobuf->list, &file->data ); 133 free_iob ( iobuf ); 279 struct io_buffer *iobuf; local [all...] |
/external/syslinux/gpxe/src/net/ |
iobpad.c | 29 #include <gpxe/iobuf.h> 34 * @v iobuf I/O buffer 44 void iob_pad ( struct io_buffer *iobuf, size_t min_len ) { 57 data = iobuf->data; 58 len = iob_len ( iobuf ); 59 headroom = iob_headroom ( iobuf ); 60 iob_push ( iobuf, headroom ); 61 memmove ( iobuf->data, data, len ); 62 iob_unput ( iobuf, headroom ); 65 pad_len = ( min_len - iob_len ( iobuf ) ); [all...] |
netdevice.c | 28 #include <gpxe/iobuf.h> 119 * @v iobuf I/O buffer 125 int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf ) { 129 netdev, iobuf, iobuf->data, iob_len ( iobuf ) ); 131 list_add_tail ( &iobuf->list, &netdev->tx_queue ); 138 if ( ( rc = netdev->op->transmit ( netdev, iobuf ) ) != 0 ) 144 netdev_tx_complete_err ( netdev, iobuf, rc ); 152 * @v iobuf I/O buffe 188 struct io_buffer *iobuf; local 280 struct io_buffer *iobuf; local 295 struct io_buffer *iobuf; local 590 struct io_buffer *iobuf; local [all...] |
rarp.c | 24 #include <gpxe/iobuf.h> 37 * @v iobuf I/O buffer 44 static int rarp_rx ( struct io_buffer *iobuf, 47 free_iob ( iobuf );
|
icmp.c | 23 #include <gpxe/iobuf.h> 39 * @v iobuf I/O buffer 45 static int icmp_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, 48 struct icmp_header *icmp = iobuf->data; 49 size_t len = iob_len ( iobuf ); 86 if ( ( rc = tcpip_tx ( iob_disown ( iobuf ), &icmp_protocol, st_dest, 94 free_iob ( iobuf );
|
ipv4.c | 11 #include <gpxe/iobuf.h> 162 * @v iobuf I/O buffer, fragment of the datagram 165 static struct io_buffer * ipv4_reassemble ( struct io_buffer * iobuf ) { 166 struct iphdr *iphdr = iobuf->data; 188 iob_pull ( iobuf, sizeof ( *iphdr ) ); 190 iob_len ( iobuf ) ), 191 iobuf->data, iob_len ( iobuf ) ); 192 free_iob ( iobuf ); 196 iobuf = fragbuf->frag_iob [all...] |
tcpip.c | 5 #include <gpxe/iobuf.h> 21 * @v iobuf I/O buffer 34 int tcpip_rx ( struct io_buffer *iobuf, uint8_t tcpip_proto, 44 return tcpip->rx ( iobuf, st_src, st_dest, pshdr_csum ); 49 free_iob ( iobuf ); 55 * @v iobuf I/O buffer 63 int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip_protocol, 72 return tcpip_net->tx ( iobuf, tcpip_protocol, st_src, 78 free_iob ( iobuf );
|
udp.c | 8 #include <gpxe/iobuf.h> 186 * @v iobuf I/O buffer 192 static int udp_tx ( struct udp_connection *udp, struct io_buffer *iobuf, 200 if ( ( rc = iob_ensure_headroom ( iobuf, UDP_MAX_HLEN ) ) != 0 ) { 201 free_iob ( iobuf ); 212 udphdr = iob_push ( iobuf, sizeof ( *udphdr ) ); 213 len = iob_len ( iobuf ); 226 if ( ( rc = tcpip_tx ( iobuf, &udp_protocol, src, dest, netdev, 264 * @v iobuf I/O buffer 270 static int udp_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src 378 struct io_buffer *iobuf; local [all...] |
ethernet.c | 31 #include <gpxe/iobuf.h> 47 * @v iobuf I/O buffer 54 struct io_buffer *iobuf, const void *ll_dest, 56 struct ethhdr *ethhdr = iob_push ( iobuf, sizeof ( *ethhdr ) ); 70 * @v iobuf I/O buffer 77 struct io_buffer *iobuf, const void **ll_dest, 79 struct ethhdr *ethhdr = iobuf->data; 82 if ( iob_len ( iobuf ) < sizeof ( *ethhdr ) ) { 84 iob_len ( iobuf ) ); 89 iob_pull ( iobuf, sizeof ( *ethhdr ) ) [all...] |
nullnet.c | 23 #include <gpxe/iobuf.h> 41 struct io_buffer *iobuf __unused ) {
|
icmpv6.c | 8 #include <gpxe/iobuf.h> 34 struct io_buffer *iobuf = alloc_iob ( sizeof ( *nsolicit ) + MIN_IOB_LEN ); local 35 iob_reserve ( iobuf, MAX_HDR_LEN ); 36 nsolicit = iob_put ( iobuf, sizeof ( *nsolicit ) ); 63 return tcpip_tx ( iobuf, &icmp6_protocol, NULL, &st_dest.st, 70 * @v iobuf I/O buffer 74 static int icmp6_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, 76 struct icmp6_header *icmp6hdr = iobuf->data; 79 if ( iob_len ( iobuf ) < sizeof ( *icmp6hdr ) ) { 80 DBG ( "Packet too short (%zd bytes)\n", iob_len ( iobuf ) ); [all...] |
ipv6.c | 14 #include <gpxe/iobuf.h> 136 * @v iobuf I/O buffer 142 static uint16_t ipv6_tx_csum ( struct io_buffer *iobuf, uint16_t csum ) { 143 struct ip6_header *ip6hdr = iobuf->data; 150 pshdr.len = htons ( iob_len ( iobuf ) - sizeof ( *ip6hdr ) ); 171 * iobuf I/O buffer 177 static int ipv6_tx ( struct io_buffer *iobuf, 191 struct ip6_header *ip6hdr = iob_push ( iobuf, sizeof ( *ip6hdr ) ); 194 ip6hdr->payload_len = htons ( iob_len ( iobuf ) - sizeof ( *ip6hdr ) ); 224 *trans_csum = ipv6_tx_csum ( iobuf, *trans_csum ) [all...] |
arp.c | 27 #include <gpxe/iobuf.h> 118 struct io_buffer *iobuf; local 135 iobuf = alloc_iob ( MAX_LL_HEADER_LEN + sizeof ( *arphdr ) + 137 if ( ! iobuf ) 139 iob_reserve ( iobuf, MAX_LL_HEADER_LEN ); 142 arphdr = iob_put ( iobuf, sizeof ( *arphdr ) ); 148 memcpy ( iob_put ( iobuf, ll_protocol->ll_addr_len ), 150 memcpy ( iob_put ( iobuf, net_protocol->net_addr_len ), 152 memset ( iob_put ( iobuf, ll_protocol->ll_addr_len ), 154 memcpy ( iob_put ( iobuf, net_protocol->net_addr_len ) [all...] |
tcp.c | 8 #include <gpxe/iobuf.h> 266 struct io_buffer *iobuf; local 285 list_for_each_entry_safe ( iobuf, tmp, &tcp->queue, list ) { 286 list_del ( &iobuf->list ); 287 free_iob ( iobuf ); 356 struct io_buffer *iobuf; local 361 list_for_each_entry_safe ( iobuf, tmp, &tcp->queue, list ) { 362 frag_len = iob_len ( iobuf ); 366 memcpy ( iob_put ( dest, frag_len ), iobuf->data, 370 iob_pull ( iobuf, frag_len ) 395 struct io_buffer *iobuf; local 558 struct io_buffer *iobuf; local [all...] |
/external/syslinux/gpxe/src/net/infiniband/ |
ib_packet.c | 26 #include <gpxe/iobuf.h> 41 * @v iobuf I/O buffer to contain headers 46 int ib_push ( struct ib_device *ibdev, struct io_buffer *iobuf, 53 size_t orig_iob_len = iob_len ( iobuf ); 69 orig_iob_len = iob_len ( iobuf ); 70 deth = iob_push ( iobuf, sizeof ( *deth ) ); 71 bth = iob_push ( iobuf, sizeof ( *bth ) ); 72 grh_len = ( payload_len + iob_len ( iobuf ) - orig_iob_len ); 74 iob_push ( iobuf, sizeof ( *grh ) ) : NULL ); 75 lrh = iob_push ( iobuf, sizeof ( *lrh ) ) [all...] |
/external/syslinux/gpxe/src/drivers/net/ |
legacy.c | 7 #include <gpxe/iobuf.h> 26 static int legacy_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) { 30 DBG ( "Transmitting %zd bytes\n", iob_len ( iobuf ) ); 31 iob_pad ( iobuf, ETH_ZLEN ); 32 ethhdr = iobuf->data; 33 iob_pull ( iobuf, sizeof ( *ethhdr ) ); 36 iob_len ( iobuf ), iobuf->data ); 37 netdev_tx_complete ( netdev, iobuf ); 43 struct io_buffer *iobuf; local [all...] |
pnic.c | 24 #include <gpxe/iobuf.h> 119 struct io_buffer *iobuf; local 131 iobuf = alloc_iob ( ETH_FRAME_LEN ); 132 if ( ! iobuf ) { 138 iobuf->data, ETH_FRAME_LEN, &length ) 140 netdev_rx_err ( netdev, iobuf, -EIO ); 143 iob_put ( iobuf, length ); 144 netdev_rx ( netdev, iobuf ); 151 static int pnic_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) { 155 iob_pad ( iobuf, ETH_ZLEN ) [all...] |
/external/syslinux/gpxe/src/drivers/block/ |
srp.c | 102 struct io_buffer *iobuf; local 117 iobuf = xfer_alloc_iob ( &srp->socket, sizeof ( *login_req ) ); 118 if ( ! iobuf ) { 124 login_req = iob_put ( iobuf, sizeof ( *login_req ) ); 136 DBGC2_HDA ( srp, 0, iobuf->data, iob_len ( iobuf ) ); 139 if ( ( rc = xfer_deliver_iob ( &srp->socket, iobuf ) ) != 0 ) { 155 * @v iobuf I/O buffer 158 static int srp_login_rsp ( struct srp_device *srp, struct io_buffer *iobuf ) { 159 struct srp_login_rsp *login_rsp = iobuf->data 230 struct io_buffer *iobuf; local [all...] |
/external/syslinux/gpxe/src/net/udp/ |
slam.c | 29 #include <gpxe/iobuf.h> 205 * @v iobuf I/O buffer 214 struct io_buffer *iobuf, unsigned long value ) { 223 if ( len >= iob_tailroom ( iobuf ) ) { 235 data = iob_put ( iobuf, len ); 253 struct io_buffer *iobuf; local 263 iobuf = xfer_alloc_iob ( &slam->socket, SLAM_MAX_NACK_LEN ); 264 if ( ! iobuf ) { 294 if ( ( rc = slam_put_value ( slam, iobuf, first_block ) ) != 0 ) 296 if ( ( rc = slam_put_value ( slam, iobuf, num_blocks ) ) != 0 [all...] |
/external/ltp/testcases/kernel/io/ltp-aiodio/ |
ltp-diorh.c | 50 char *iobuf; variable 66 memset(iobuf, pattern, WRITESIZE); 68 rc = pwrite(fd, iobuf, WRITESIZE, offset); 90 rc = pread(fd, iobuf, READSIZE, offset); 97 for (i = 0, p = (int *)iobuf; i < READSIZE; i += 4) { 131 err = posix_memalign((void **)&iobuf, pagesize, bufsize);
|