Searched refs:buf (Results 1 - 25 of 94) sorted by relevance

1234

/broadcom-cfe-1.4.2/cfe/zlib/
H A Dadler32.c14 #define DO1(buf,i) {s1 += buf[i]; s2 += s1;}
15 #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
16 #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
17 #define DO8(buf,i) DO4(buf,
[all...]
H A Dzutil.c129 voidpf buf = opaque; /* just to make some compilers happy */ local
136 buf = farmalloc(bsize);
137 if (*(ush*)&buf != 0) return buf;
139 buf = farmalloc(bsize + 16L);
141 if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
142 table[next_ptr].org_ptr = buf;
145 *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
146 *(ush*)&buf
[all...]
/broadcom-cfe-1.4.2/cfe/net/
H A Dnet_tcpbuf.c55 * tmb_init(buf)
60 * buf - modulo buffer structure
66 void tmb_init(tcpmodbuf_t *buf) argument
68 buf->tmb_addptr = 0;
69 buf->tmb_remptr = 0;
70 buf->tmb_len = 0;
74 * tmb_adjust(buf,amt)
80 * buf - modulo buffer structure
88 void tmb_adjust(tcpmodbuf_t *buf,int amt) argument
91 buf
109 tmb_alloc(tcpmodbuf_t *buf,int size) argument
132 tmb_free(tcpmodbuf_t *buf) argument
153 tmb_copyin(tcpmodbuf_t *tmb,hsaddr_t buf,int len,int update) argument
206 tmb_copyout(tcpmodbuf_t *tmb,hsaddr_t buf,int len,int update) argument
259 tmb_copyout2(tcpmodbuf_t *tmb,hsaddr_t buf,int offset,int len) argument
[all...]
H A Dnet_dns.c106 ebuf_t *buf; local
128 buf = udp_alloc();
130 ebuf_append_u16_be(buf,id);
131 ebuf_append_u16_be(buf,(DNS_FLG_QUERY | DNS_OPCODE_QUERY | DNS_FLG_RD));
132 ebuf_append_u16_be(buf,1); /* one question */
133 ebuf_append_u16_be(buf,0); /* no answers */
134 ebuf_append_u16_be(buf,0); /* no server resource records */
135 ebuf_append_u16_be(buf,0); /* no additional records */
145 ebuf_append_u8(buf,(tok-ptr));
146 ebuf_append_bytes(buf,pt
[all...]
H A Dnet_tcpbuf.h72 void tmb_init(tcpmodbuf_t *buf);
73 void tmb_adjust(tcpmodbuf_t *buf,int amt);
74 int tmb_alloc(tcpmodbuf_t *buf,int size);
75 void tmb_free(tcpmodbuf_t *buf);
76 int tmb_copyin(tcpmodbuf_t *tmb,hsaddr_t buf,int len,int update);
77 int tmb_copyout(tcpmodbuf_t *tmb,hsaddr_t buf,int len,int update);
78 int tmb_copyout2(tcpmodbuf_t *tmb,hsaddr_t buf,int offset,int len);
H A Dnet_dhcp.c144 * dhcp_dumptag(tag,len,buf)
151 * buf - data
158 static void dhcp_dumptag(uint8_t tag,uint8_t len,uint8_t *buf) argument
166 xprintf("DHCP Function: %d\n",buf[0]);
169 idx = (((unsigned int) buf[0]) << 24) |
170 (((unsigned int) buf[1]) << 16) |
171 (((unsigned int) buf[2]) << 8) |
172 (((unsigned int) buf[3]) << 0);
177 buf[0],buf[
265 ebuf_t *buf; local
353 ebuf_t *buf; local
464 ebuf_t *buf; local
634 ebuf_t *buf; local
690 ebuf_t *buf; local
[all...]
H A Dnet_icmp.c84 * ICMP_RX_CALLBACK(ref,buf,dst,src)
91 * buf - the ebuf containing the buffer
99 static int icmp_rx_callback(void *ref,ebuf_t *buf,uint8_t *dst,uint8_t *src) argument
109 imsg = ICMPMSG(buf->eb_ptr[0],buf->eb_ptr[1]);
119 ebuf_append_bytes(txbuf,buf->eb_ptr,buf->eb_length);
136 q_enqueue(&(icmp->icmp_echoreplies),(queue_t *) buf);
216 ebuf_t *buf; local
228 buf
[all...]
H A Dnet_tftp.c109 static int tftp_fileop_read(void *ref,hsaddr_t buf,int len);
110 static int tftp_fileop_write(void *ref,hsaddr_t buf,int len);
158 ebuf_t *buf = NULL; local
186 buf = udp_alloc();
187 if (!buf) break;
190 ebuf_append_u16_be(buf,TFTP_OP_RRQ); /* read file */
193 ebuf_append_u16_be(buf,TFTP_OP_WRQ); /* write file */
195 ebuf_append_bytes(buf,filename,strlen(filename)+1);
196 ebuf_append_bytes(buf,datamode,strlen(datamode)+1);
198 udp_send(info->tftp_socket,buf,inf
294 ebuf_t *buf; local
389 ebuf_t *buf; local
495 ebuf_t *buf; local
633 tftp_fileop_read(void *ref,hsaddr_t buf,int len) argument
688 tftp_fileop_write(void *ref,hsaddr_t buf,int len) argument
[all...]
H A Dnet_ether.c71 int (*ep_rxcallback)(ebuf_t *buf,void *ref);
107 int (*cb)(ebuf_t *buf,void *ref),void *ref)
173 * eth_findport(eth,buf)
182 * buf - ethernet buffer to check
188 static ether_port_t *eth_findport(ether_info_t *eth,ebuf_t *buf) argument
198 if (buf->eb_ptr[6] & 1) return NULL;
204 if (buf->eb_length < 60) return NULL;
210 /* XXX if (buf->eb_status != 0) return NULL; */
221 if ((p->ep_proto[0] == buf->eb_ptr[12]) &&
222 (p->ep_proto[1] == buf
106 eth_open(ether_info_t *eth,int ptype,char *pdata, int (*cb)(ebuf_t *buf,void *ref),void *ref) argument
252 ebuf_t *buf; local
464 eth_send(ebuf_t *buf,uint8_t *dest) argument
511 ebuf_t *buf; local
557 eth_free(ebuf_t *buf) argument
604 ebuf_t *buf; local
[all...]
H A Dnet_udp.c104 static int _udp_rx_callback(void *ref,ebuf_t *buf,uint8_t *destaddr,uint8_t *srcaddr);
199 ebuf_t *buf; local
201 while ((buf = (ebuf_t *) q_deqnext(&(udp->up_rxqueue)))) {
202 _ip_free(info->ui_ipinfo,buf);
212 * _udp_send(info,s,buf,dest)
220 * buf - an ebuf to send
228 int _udp_send(udp_info_t *info,int s,ebuf_t *buf,uint8_t *dest) argument
240 udplen = ebuf_length(buf) + UDP_HDR_LENGTH;
257 ebuf_seek(buf,-UDP_HDR_LENGTH);
258 udphdr = ebuf_ptr(buf);
359 _udp_rx_callback(void *ref,ebuf_t *buf,uint8_t *destaddr,uint8_t *srcaddr) argument
475 ebuf_t *buf; local
554 ebuf_t *buf; local
599 ebuf_t *buf; local
632 _udp_free(udp_info_t *info,ebuf_t *buf) argument
[all...]
H A Dnet_ip.c67 static int ip_rx_callback(ebuf_t *buf,void *ref);
83 ebuf_t *buf; local
85 buf = eth_alloc(ipi->eth_info,ipi->ip_port);
87 if (buf == NULL) return buf;
89 ebuf_seek(buf,IPHDR_LENGTH);
90 ebuf_setlength(buf,0);
92 return buf;
144 * _ip_send(ipi,buf,destaddr,proto)
151 * buf
160 _ip_send(ip_info_t *ipi,ebuf_t *buf,uint8_t *destaddr,uint8_t proto) argument
267 ip_rx_callback(ebuf_t *buf,void *ref) argument
520 _ip_free(ip_info_t *ipi,ebuf_t *buf) argument
538 _ip_getaddr(ip_info_t *ipi,uint8_t *buf) argument
680 _ip_register(ip_info_t *ipinfo, int proto, int (*cb)(void *ref,ebuf_t *buf,uint8_t *dst,uint8_t *src),void *ref) argument
[all...]
H A Dnet_arp.c104 static int arp_rx_callback(ebuf_t *buf,void *ref);
124 ebuf_t *buf; local
131 buf = eth_alloc(ipi->eth_info,ipi->arp_port);
132 if (!buf) return -1;
138 ebuf_append_u16_be(buf,ARP_HWADDRSPACE_ETHERNET);
139 ebuf_append_u16_be(buf,PROTOSPACE_IP);
140 ebuf_append_u8(buf,ENET_ADDR_LEN);
141 ebuf_append_u8(buf,IP_ADDR_LEN);
142 ebuf_append_u16_be(buf,ARP_OPCODE_REQUEST);
143 ebuf_append_bytes(buf,ip
176 ebuf_t *buf; local
279 _arp_lookup_and_send(ip_info_t *ipi,ebuf_t *buf,uint8_t *dest) argument
341 ebuf_t *buf; local
550 arp_rx_callback(ebuf_t *buf,void *ref) argument
[all...]
H A Dnet_ether.h71 int eth_open(ether_info_t *eth,int ptype,char *pdata,int (*cb)(ebuf_t *buf,void *ref),void *ref);
74 int eth_send(ebuf_t *buf,uint8_t *dest);
76 void eth_free(ebuf_t *buf);
/broadcom-cfe-1.4.2/cfe/arch/ppc/common/src/
H A Ddisasm.c54 void disasm_inst(char *buf, int buf_size, uint32_t inst, uint64_t pc) argument
/broadcom-cfe-1.4.2/cfe/lib/
H A Dlib_string2.c59 char *buf; local
61 buf = KMALLOC(lib_strlen(str)+1,0);
62 if (buf) {
63 lib_strcpy(buf,str);
66 return buf;
/broadcom-cfe-1.4.2/cfe/arch/mips/common/include/
H A Ddisasm.h53 /* Copies a disassembled version of the instruction into buf, null terminating the
57 void disasm_inst(char *buf, int buf_size, uint32_t inst, uint64_t pc);
/broadcom-cfe-1.4.2/cfe/arch/ppc/common/include/
H A Ddisasm.h53 /* Copies a disassembled version of the instruction into buf, null terminating the
57 void disasm_inst(char *buf, int buf_size, uint32_t inst, uint64_t pc);
/broadcom-cfe-1.4.2/cfe/arch/x86/common/include/
H A Ddisasm.h53 /* Copies a disassembled version of the instruction into buf, null
58 void disasm_inst(char *buf, int buf_size, uint32_t inst, uint64_t pc);
/broadcom-cfe-1.4.2/cfe/ui/
H A Dui_toyclock.c109 uint8_t buf[12]; local
140 buf[0] = hr;
141 buf[1] = min;
142 buf[2] = sec;
143 buf[7] = 0x00; /*SET_TIME = 0x00, SET_DATE = 0x01*/
151 res = cfe_write(fd,PTR2HSADDR(buf),8);
165 uint8_t buf[12]; local
201 buf[3] = mo;
202 buf[4] = dt;
203 buf[
229 uint8_t buf[12]; local
[all...]
/broadcom-cfe-1.4.2/cfe/dev/
H A Ddev_atapi.c58 #define GETWORD_LE(buf,wordidx) (((unsigned int) (buf)[(wordidx)*2]) + \
59 (((unsigned int) (buf)[(wordidx)*2+1]) << 8))
111 static void atapidrv_ins(idecommon_dispatch_t *disp,uint32_t reg,uint8_t *buf,int len) argument
119 *buf++ = (data >> 8) & 0xFF;
120 *buf++ = (data & 0xFF);
122 *buf++ = (data & 0xFF);
123 *buf++ = (data >> 8) & 0xFF;
143 static void atapidrv_outs(idecommon_dispatch_t *disp,uint32_t reg,uint8_t *buf,int len) argument
149 data = (uint16_t) buf[
[all...]
H A Ddev_smbus_switch.c131 uint8_t buf[1]; local
138 buf[0] = devaddr;
139 err = SMBUS_WRITE(chan,slaveaddr,buf,1);
146 err = SMBUS_READ(chan,slaveaddr,buf,1);
149 return buf[0];
170 uint8_t buf[2]; local
178 buf[0] = devaddr;
179 buf[1] = b;
181 err = SMBUS_WRITE(chan,slaveaddr,buf,2);
194 err = SMBUS_READ(chan,slaveaddr,buf,
[all...]
/broadcom-cfe-1.4.2/cfe/include/
H A Dcfe_smbus.h60 int (*write)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len);
62 int (*read)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len);
64 int (*xact)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t *buf,int len);
68 int (*xread)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t numcmd,uint8_t numdat, int *buf);
70 int (*xwrite)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t numcmd,uint8_t numdat, int *buf);
87 #define SMBUS_READ(chan,slave,buf,len) (chan)->ops->read(chan,slave,buf,len)
88 #define SMBUS_WRITE(chan,slave,buf,len) (chan)->ops->write(chan,slave,buf,len)
89 #define SMBUS_XACT(chan,slave,cmd,buf,le
[all...]
H A Dcfe_spi.h62 int (*write)(cfe_spi_channel_t *chan,uint8_t *buf,int len);
64 int (*read)(cfe_spi_channel_t *chan,uint8_t *buf,int len,uint8_t data_out);
80 #define SPI_WRITE(chan,buf,len) (chan)->ops->write(chan,buf,len)
81 #define SPI_READ(chan,buf,len,data_out) (chan)->ops->read(chan,buf,len,data_out)
H A Dcfe_fileops.h71 #define BDREAD(ops,ref,buf,len) (ops)->read((ref),(buf),(len))
72 #define BDWRITE(ops,ref,buf,len) (ops)->write((ref),(buf),(len))
86 int (*read)(void *ref,hsaddr_t buf,int len);
87 int (*write)(void *ref,hsaddr_t buf,int len);
/broadcom-cfe-1.4.2/cfe/arch/mips/chipset/sibyte/src/
H A Dsb1250_smbus.c71 static int sb1250_smbus_xact(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t *buf,int len);
72 static int sb1250_smbus_read(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len);
73 static int sb1250_smbus_write(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len);
81 static int sb1250_smbus_xread(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t numcmd,uint8_t numdat,int *buf);
82 static int sb1250_smbus_xwrite(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t numcmd,uint8_t numdat,int *buf);
165 static int sb1250_smbus_write(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len) argument
183 SBWRITECSR(softc->base+R_SMB_CMD,buf[0]);
187 SBWRITECSR(softc->base+R_SMB_CMD,buf[0]);
188 SBWRITECSR(softc->base+R_SMB_DATA,buf[1]);
192 SBWRITECSR(softc->base+R_SMB_CMD,buf[
211 sb1250_smbus_read(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len) argument
232 sb1250_smbus_xwrite(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t numcmd,uint8_t numdat,int *buf) argument
261 sb1250_smbus_xread(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t numcmd,uint8_t numdat,int *buf) argument
285 sb1250_smbus_xact(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t *buf,int len) argument
[all...]

Completed in 79 milliseconds

1234