File: scatterlist.h

package info (click to toggle)
ns3 3.7.1-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 186,596 kB
  • ctags: 507,963
  • sloc: ansic: 1,455,115; cpp: 151,502; python: 72,564; asm: 5,317; perl: 4,801; makefile: 1,107; sh: 1,023; tcl: 295; lex: 230
file content (14 lines) | stat: -rw-r--r-- 311 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef _LINUX_SCATTERLIST_H
#define _LINUX_SCATTERLIST_H

static inline void sg_init_one(struct scatterlist *sg,
			       u8 *buf, unsigned int buflen)
{
	memset(sg, 0, sizeof(*sg));

	sg->page = virt_to_page(buf);
	sg->offset = offset_in_page(buf);
	sg->length = buflen;
}

#endif /* _LINUX_SCATTERLIST_H */