shm.c ( File view )

  • By 雨的声音 2013-11-28
  • View(s):263
  • Download(s):7
  • Point(s): 2
			/*
 * linux/ipc/shm.c
 * Copyright (C) 1992, 1993 Krishna Balasubramanian
 *	 Many improvements/fixes by Bruno Haible.
 * Replaced `struct shm_desc' by `struct vm_area_struct', July 1994.
 * Fixed the shm swap deallocation (shm_unuse()), August 1998 Andrea Arcangeli.
 *
 * /proc/sysvipc/shm support (c) 1999 Dragos Acostachioaie <dragos@iname.com>
 * BIGMEM support, Andrea Arcangeli <andrea@suse.de>
 * SMP thread shm, Jean-Luc Boyard <jean-luc.boyard@siemens.fr>
 * HIGHMEM support, Ingo Molnar <mingo@redhat.com>
 * Make shmmax, shmall, shmmni sysctl'able, Christoph Rohland <cr@sap.com>
 * Shared /dev/zero support, Kanoj Sarcar <kanoj@sgi.com>
 * Move the mm functionality over to mm/shmem.c, Christoph Rohland <cr@sap.com>
 *
 */

 /*
  * uClinux revisions for NO_MM
  *
  * A simplistic attempt to get shared memory under a mmu-less system.  Uses
  * the shm_file pointer as a pointer to a chunk of shared memory instead of
  * a "struct file".
  */

#include "config.h"
#include "slab.h"
#include "shm.h"
#include "init.h"
#include "file.h"
#include "mman.h"
#include "proc_fs.h"
#include "uaccess.h"

#include "util.h"

struct shmid_kernel /* private to the kernel */
{

	struct kern_ipc_perm	shm_perm;
	struct file *		shm_file;
	int			id;
	unsigned long		shm_nattch;
	unsigned long		shm_segsz;
	time_t			shm_atim;
	time_t			shm_dtim;
	time_t			shm_ctim;
	pid_t			shm_cprid;
	pid_t			shm_lprid;

};

#define shm_flags	shm_perm.mode

#ifndef NO_MM
static struct file_operations shm_file_operations;
static struct vm_operations_struct shm_vm_ops;
#endif /* NO_MM */

static struct ipc_ids shm_ids;

#define shm_lock(id)	((struct shmid_kernel*)ipc_lock(&shm_ids,id))
#define shm_unlock(id)	ipc_unlock(&shm_ids,id)
#define shm_lockall()	ipc_lockall(&shm_ids)
#define shm_unlockall()	ipc_unlockall(&shm_ids)
#define shm_get(id)	((struct shmid_kernel*)ipc_get(&shm_ids,id))
#define shm_buildid(id, seq) \
	ipc_buildid(&shm_ids, id, seq)

static int newseg (key_t key, int shmflg, size_t size);
#ifndef NO_MM
static void shm_open (struct vm_area_struct *shmd);
static void shm_close (struct vm_area_struct *shmd);
#endif /* NO_MM */
#ifdef CONFIG_PROC_FS
static int sysvipc_shm_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data);
#endif

size_t	shm_ctlmax = SHMMAX;
size_t 	shm_ctlall = SHMALL;
int 	shm_ctlmni = SHMMNI;

static int shm_tot; /* total number of shared memory pages */

void __init shm_init (void)
{

	ipc_init_ids(&shm_ids, 1);
#ifdef CONFIG_PROC_FS
	create_proc_read_entry("sysvipc/shm", 0, 0, sysvipc_shm_read_proc, NULL);
#endif

}

static inline int shm_checkid(struct shmid_kernel *s, int id)
{

	if (ipc_checkid(&shm_ids,&s->shm_perm,id))
		return -EIDRM;
	return 0;

}

static inline struct shmid_kernel *shm_rmid(int id)
{

	return (struct shmid_kernel *)ipc_rmid(&shm_ids,id);

}

static inline int shm_addid(struct shmid_kernel *shp)
{

	return ipc_addid(&shm_ids, &shp->shm_perm, shm_ctlmni+1);

}



static inline void shm_inc (int id) {

	struct shmid_kernel *shp;

	if(!(shp = shm_lock(id)))
		BUG();
	shp->shm_atim = CURRENT_TIME;
	shp->shm_lprid = current->pid;
	shp->shm_nattch++;
	shm_unlock(id);

}

#ifndef NO_MM
/* This is called by fork, once for every shm attach. */
static void shm_open (struct vm_area_struct *shmd)
{

	shm_inc (shmd->vm_file->f_dentry->d_inode->i_ino);

}
#endif /* NO_MM */

/*
 * shm_destroy - free the struct shmid_kernel
 *
 * @shp: struct to free
 *
 * It has to be called with shp and shm_ids.sem locked
 */
static void shm_destroy (struct shmid_kernel *shp)
{

	shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
	shm_rmid (shp->id);
#ifndef NO_MM
	shmem_lock(shp->shm_file, 0);
	fput (shp->shm_file);
#else
	kfree (shp->shm_file);
#endif /* NO_MM */
	kfree (shp);

}

#ifndef NO_MM
/*
 * remove the attach descriptor shmd.
 * free memory for segment if it is marked destroyed.
 * The descriptor has already been removed from the current->mm->mmap list
 * and will later be kfree()d.
 */
static void shm_close (struct vm_area_struct *shmd)
{

	struct file * file = shmd->vm_file;
	int id = file->f_dentry->d_inode->i_ino;
	struct shmid_kernel *shp;

	down (&shm_ids.sem);
	/* remove from the list of attaches of the shm segment */
	if(!(shp = shm_lock(id)))
		BUG();
	shp->shm_lprid = current->pid;
	shp->shm_dtim = CURRENT_TIME;
	shp->shm_nattch--;
	if(shp->shm_nattch == 0 &&
	   shp->shm_flags & SHM_DEST)
		shm_destroy (shp);

	shm_unlock(id);
	up (&shm_ids.sem);

}

static int shm_mmap(struct file * file, struct vm_area_struct * vma)
{

	UPDATE_ATIME(file->f_dentry->d_inode);
	vma->vm_ops = &shm_vm_ops;
	shm_inc(file->f_dentry->d_inode->i_ino);
	return 0;

}

static struct file_operations shm_file_operations = {

	mmap:	shm_mmap

};

static struct vm_operations_struct shm_vm_ops = {

    open:shm_open,/* callback for a new vm-area open */
    close:	shm_close,/* callback for when the vm-area is released */
    nopage:shmem_nopage,

};
#else
struct file *shmem_file_setup(char * name, loff_t size)
{

	void * f = kmalloc(size, GFP_KERNEL);

	return (struct file *)(PTR_ERR(f) ? f : (void *)-ENOMEM);

}
#endif /* NO_MM */

static int newseg (key_t key, int shmflg, size_t size)
{

	int error;
	struct shmid_kernel *shp;
	int numpages = (size + PAGE_SIZE -1) >> PAGE_SHIFT;
	struct file * file;
	char name[13];
	int id;

	if (size < SHMMIN || size > shm_ctlmax)
		return -EINVAL;

	if (shm_tot + numpages >= shm_ctlall)
		return -ENOSPC;

	shp = (struct shmid_kernel *) kmalloc (sizeof (*shp), GFP_USER);
	if (!shp)
		return -ENOMEM;
	sprintf (name, "SYSV%08x", key);
	file = shmem_file_setup(name, size);
	error = PTR_ERR(file);
	if (IS_ERR(file))
		goto no_file;

	error = -ENOSPC;
	id = shm_addid(shp);
	if(id == -1)
		goto no_id;
	shp->shm_perm.key = key;
	shp->shm_flags = (shmflg & S_IRWXUGO);
	shp->shm_cprid = current->pid;
	shp->shm_lprid = 0;
	shp->shm_atim = shp->shm_dtim = 0;
	shp->shm_ctim = CURRENT_TIME;
	shp->shm_segsz = size;
	shp->shm_nattch = 0;
	shp->id = shm_buildid(id,shp->shm_perm.seq);
	shp->shm_file = file;
#ifndef NO_MM
	file->f_dentry->d_inode->i_ino = shp->id;
	file->f_op = &shm_file_operations;
#endif /* NO_MM */
	shm_tot += numpages;
	shm_unlock (id);
	return shp->id;

no_id:
#ifndef NO_MM
	fput(file);
#else
	kfree(file);
#endif

no_file:
	kfree(shp);
	return error;

}

asmlinkage long sys_shmget (key_t key, size_t size, int shmflg)
{

	struct shmid_kernel *shp;
	int err, id = 0;

	down(&shm_ids.sem);
	if (key == IPC_PRIVATE) {

		err = newseg(key, shmflg, size);
	
} else if ((id = ipc_findkey(&shm_ids, key)) == -1) {

		if (!(shmflg & IPC_CREAT))
			err = -ENOENT;
		else
			err = newseg(key, shmflg, size);
	
} else if ((shmflg & IPC_CREAT) && (shmflg & IPC_EXCL)) {

		err = -EEXIST;
	
} else {

		shp = shm_lock(id);
		if(shp==NULL)
			BUG();
		if (shp->shm_segsz < size)
			err = -EINVAL;
		else if (ipcperms(&shp->shm_perm, shmflg))
			err = -EACCES;
		else
			err = shm_buildid(id, shp->shm_perm.seq);
		shm_unlock(id);
	
}
	up(&shm_ids.sem);
	return err;

}

static inline unsigned long copy_shmid_to_user(void *buf, struct shmid64_ds *in, int version)
{

	switch(version) {

	case IPC_64:
		return copy_to_user(buf, in, sizeof(*in));
	case IPC_OLD:
	    {

		struct shmid_ds out;

		ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm);
		out.shm_segsz	= in->shm_segsz;
		out.shm_atime	= in->shm_atime;
		out.shm_dtime	= in->shm_dtime;
		out.shm_ctime	= in->shm_ctime;
		out.shm_cpid	= in->shm_cpid;
		out.shm_lpid	= in->shm_lpid;
		out.shm_nattch	= in->shm_nattch;

		return copy_to_user(buf, &out, sizeof(out));
	    
}
	default:
		return -EINVAL;
	
}

}

struct shm_setbuf {

	uid_t	uid;
	gid_t	gid;
	mode_t	mode;

};

static inline unsigned long copy_shmid_from_user(struct shm_setbuf *out, void *buf, int version)
{

	switch(version) {

	case IPC_64:
	    {

		struct shmid64_ds tbuf;

		if (copy_from_user(&tbuf, buf, sizeof(tbuf)))
			return -EFAULT;

		out->uid	= tbuf.shm_perm.uid;
		out->gid	= tbuf.shm_perm.gid;
		out->mode	= tbuf.shm_flags;

		return 0;
	    
}
	case IPC_OLD:
	    {

		struct shmid_ds tbuf_old;

		if (copy_from_user(&tbuf_old, buf, sizeof(tbuf_old)))
			return -EFAULT;

		out->uid	= tbuf_old.shm_perm.uid;
		out->gid	= tbuf_old.shm_perm.gid;
		out->mode	= tbuf_old.shm_flags;

		return 0;
	    
}
	default:
		return -EINVAL;
	
}

}

static inline unsigned long copy_shminfo_to_user(void *buf, struct shminfo64 *in, int version)
{

	switch(version) {

	case IPC_64:
		return copy_to_user(buf, in, sizeof(*in));
	case IPC_OLD:
	    {

		struct shminfo out;

		if(in->shmmax > INT_MAX)
			out.shmmax = INT_MAX;
		else
			out.shmmax = (int)in->shmmax;

		out.shmmin	= in->shmmin;
		out.shmmni	= in->shmmni;
		out.shmseg	= in->shmseg;
		out.shmall	= in->shmall;

		return copy_to_user(buf, &out, sizeof(out));
	    
}
	default:
		return -EINVAL;
	
}

}

static void shm_get_stat (unsigned long *rss, unsigned long *swp)
{

#ifndef NO_MM
	struct shmem_inode_info *info;
#endif
	int i;

	*rss = 0;
	*swp = 0;

	for(i = 0; i <= shm_ids.max_id; i++) {

		struct shmid_kernel* shp;
#ifndef NO_MM
		struct inode * inode;
#endif

		shp = shm_get(i);
		if(shp == NULL)
			continue;
#ifndef NO_MM
		inode = shp->shm_file->f_dentry->d_inode;
		info = SHMEM_I(inode);
		spin_lock (&info->lock);
		*rss += inode->i_mapping->nrpages;
		*swp += info->swapped;
		spin_unlock (&info->lock);
#else
		*rss += (shp->shm_segsz + PAGE_SIZE -1) >> PAGE_SHIFT;
#endif
	
}

}

asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds *buf)
{

	struct shm_setbuf setbuf;
	struct shmid_kernel *shp;
	int err, version;

	if (cmd < 0 || shmid < 0)
		return -EINVAL;

	version = ipc_parse_version(&cmd);

	switch (cmd) {
 /* replace with proc interface ? */
	case IPC_INFO:
	{

		struct shminfo64 shminfo;

		memset(&shminfo,0,sizeof(shminfo));
		shminfo.shmmni = shminfo.shmseg = shm_ctlmni;
		shminfo.shmmax = shm_ctlmax;
		shminfo.shmall = shm_ctlall;

		shminfo.shmmin = SHMMIN;
		if(copy_shminfo_to_user (buf, &shminfo, version))
			return -EFAULT;
		/* reading a integer is always atomic */
		err= shm_ids.max_id;
		if(err<0)
			err = 0;
		return err;
	
}
	case SHM_INFO:
	{

		struct shm_info shm_info;

		memset(&shm_info,0,sizeof(shm_info));
		down(&shm_ids.sem);
		shm_lockall();
		shm_info.used_ids = shm_ids.in_use;
...
...
(Not finished, please download and read the complete file)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 2

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
.Makefile.swp12.00 kB14-09-06 10:46
bufferpool.a33.26 kB25-10-06 10:27
config.h86.00 B14-09-06 10:46
file.h2.34 kB14-09-06 10:46
file.h.bak3.00 kB14-09-06 10:46
fnc_ipc_name.c2.11 kB14-09-06 10:46
fnc_ipc_name.o1.10 kB25-10-06 10:27
fs.h52.57 kB14-09-06 10:46
init.h5.22 kB14-09-06 10:46
Makefile1.60 kB14-09-06 11:02
Makefile-bak1.60 kB14-09-06 10:46
mman.h144.00 B14-09-06 10:46
OMSbuff_addpage.c3.15 kB14-09-06 10:46
OMSbuff_addpage.o1.46 kB25-10-06 10:26
OMSbuff_dump.c3.65 kB14-09-06 10:46
OMSbuff_dump.o556.00 B25-10-06 10:26
OMSbuff_free.c1.79 kB14-09-06 11:06
OMSbuff_free.o1.08 kB25-10-06 10:26
OMSbuff_getreader.c2.22 kB14-09-06 10:46
OMSbuff_getreader.o1.35 kB25-10-06 10:26
OMSbuff_getslot.c3.04 kB14-09-06 21:10
OMSbuff_getslot.o1.74 kB25-10-06 10:26
OMSbuff_gotreader.c2.74 kB14-09-06 10:46
OMSbuff_gotreader.o1.40 kB25-10-06 10:27
OMSbuff_isempty.c2.39 kB14-09-06 10:46
OMSbuff_isempty.o1.30 kB25-10-06 10:27
OMSbuff_new.c2.78 kB14-09-06 10:46
OMSbuff_new.o1.34 kB25-10-06 10:27
OMSbuff_nextts.c2.06 kB14-09-06 10:46
OMSbuff_nextts.o1.29 kB25-10-06 10:27
OMSbuff_read.c3.59 kB14-09-06 10:46
OMSbuff_read.o1.54 kB25-10-06 10:27
OMSbuff_ref.c2.38 kB14-09-06 10:46
OMSbuff_ref.o1.33 kB25-10-06 10:27
OMSbuff_shm_addpage.c4.13 kB14-09-06 10:46
OMSbuff_shm_addpage.o2.02 kB25-10-06 10:27
OMSbuff_shm_create.c7.19 kB14-09-06 11:05
OMSbuff_shm_create.o3.19 kB25-10-06 10:27
OMSbuff_shm_destroy.c3.08 kB14-09-06 10:46
OMSbuff_shm_destroy.o1.50 kB25-10-06 10:27
OMSbuff_shm_map.c4.99 kB14-09-06 11:07
OMSbuff_shm_map.o2.27 kB25-10-06 10:27
OMSbuff_shm_remap.c3.28 kB14-09-06 11:08
OMSbuff_shm_remap.o1.69 kB25-10-06 10:27
OMSbuff_shm_unmap.c1.85 kB14-09-06 10:46
OMSbuff_shm_unmap.o1.14 kB25-10-06 10:27
OMSbuff_sync.c2.18 kB14-09-06 10:46
OMSbuff_sync.o1.21 kB25-10-06 10:27
OMSbuff_unref.c1.87 kB14-09-06 10:46
OMSbuff_unref.o1.11 kB25-10-06 10:27
OMSbuff_write.c3.94 kB14-09-06 10:46
OMSbuff_write.o1.68 kB25-10-06 10:27
proc_fs.h6.15 kB14-09-06 10:46
shm.c18.27 kB14-09-06 10:46
shm.h2.65 kB14-09-06 10:46
slab.h2.89 kB14-09-06 10:46
uaccess.h11.24 kB14-09-06 10:46
util.h2.32 kB14-09-06 10:46
_desktop.ini10.00 B25-10-06 08:28
<bufferpool>0.00 B25-10-06 10:27
cmd_env.a2.35 kB25-10-06 10:27
command_environment.c3.21 kB14-09-06 10:46
command_environment.o2.10 kB25-10-06 10:27
Makefile258.00 B14-09-06 10:46
Makefile.bak455.00 B14-09-06 10:46
_desktop.ini10.00 B25-10-06 08:28
<command_environment>0.00 B25-10-06 10:27
config.h8.24 kB15-09-06 14:39
add_client.c2.24 kB14-09-06 10:46
add_client.o1.22 kB25-10-06 10:27
eventloop.a7.59 kB25-10-06 10:27
eventloop.c3.30 kB14-09-06 10:46
eventloop.o1.63 kB25-10-06 10:27
Makefile411.00 B14-09-06 10:46
Makefile.bak608.00 B14-09-06 10:46
rtsp_server.c5.91 kB19-10-06 19:14
rtsp_server.o2.60 kB25-10-06 10:27
schedule_connections.c3.75 kB15-09-06 10:27
schedule_connections.o1.65 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<eventloop>0.00 B25-10-06 10:27
bufferpool.h5.35 kB14-09-06 11:07
command_environment.h241.00 B14-09-06 10:46
debug.h1.52 kB14-09-06 10:46
eventloop.h1.52 kB14-09-06 10:46
fnc_log.h1.53 kB14-09-06 10:46
gsm.h1.38 kB14-09-06 10:46
h26l.h1.50 kB14-09-06 10:46
intnet.h2.22 kB14-09-06 10:46
Makefile.am529.00 B14-09-06 10:46
md5.h2.47 kB14-09-06 10:46
md5global.h1.92 kB14-09-06 10:46
mediainfo.h7.20 kB14-09-06 10:46
mp3.h1.38 kB14-09-06 10:46
mpeg.h3.85 kB14-09-06 10:46
mpeg4es.h4.37 kB14-09-06 10:46
mpeg_system.h2.10 kB14-09-06 10:46
mpeg_ts.h1.39 kB14-09-06 10:46
multicast.h1.38 kB14-09-06 10:46
pcm.h1.38 kB14-09-06 10:46
prefs.h2.19 kB14-09-06 10:46
rtcp.h6.10 kB14-09-06 10:46
rtp.h4.83 kB14-09-06 10:46
rtpptdefs.h6.82 kB14-09-06 10:46
rtp_shm.h1.35 kB14-09-06 10:46
rtsp.h4.46 kB14-09-06 10:46
schedule.h2.34 kB14-09-06 10:46
sdp.h1.48 kB14-09-06 10:46
socket.h2.53 kB14-09-06 10:46
types.h1.24 kB14-09-06 10:46
utils.h5.15 kB25-10-06 10:44
xmllexer.h2.25 kB14-09-06 10:46
xmlparser.h2.30 kB14-09-06 10:46
_desktop.ini10.00 B25-10-06 08:28
<fenice>0.00 B25-10-06 10:44
header.h1.11 kB14-09-06 10:46
_desktop.ini10.00 B25-10-06 08:28
<include>0.00 B25-10-06 10:24
change_check.c1.88 kB14-09-06 10:46
change_check.o1.08 kB25-10-06 10:27
downgrade_GSM.c3.55 kB14-09-06 10:46
downgrade_GSM.o1.68 kB25-10-06 10:27
downgrade_L16.c1.28 kB14-09-06 10:46
downgrade_L16.o696.00 B25-10-06 10:27
downgrade_MP3.c6.46 kB14-09-06 10:46
downgrade_MP3.o2.82 kB25-10-06 10:27
half_GSM.c3.07 kB14-09-06 10:46
half_GSM.o1.46 kB25-10-06 10:27
half_L16.c1.27 kB14-09-06 10:46
half_L16.o688.00 B25-10-06 10:27
half_MP3.c5.86 kB14-09-06 10:46
half_MP3.o2.56 kB25-10-06 10:27
intnet.a20.31 kB25-10-06 10:27
Makefile823.00 B14-09-06 10:46
Makefile.bak1,020.00 B14-09-06 10:46
priority_decrease.c2.10 kB14-09-06 10:46
priority_decrease.o1,004.00 B25-10-06 10:27
priority_increase.c2.21 kB14-09-06 10:46
priority_increase.o1.00 kB25-10-06 10:27
stream_change.c3.35 kB14-09-06 10:46
stream_change.o1.68 kB25-10-06 10:27
upgrade_GSM.c3.63 kB14-09-06 10:46
upgrade_GSM.o1.69 kB25-10-06 10:27
upgrade_MP3.c7.01 kB14-09-06 10:46
upgrade_MP3.o2.93 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<intnet>0.00 B25-10-06 10:27
Makefile2.03 kB25-10-06 10:30
Makefile.bak2.03 kB25-10-06 10:26
global.h785.00 B14-09-06 10:46
Makefile242.00 B14-09-06 10:46
md5.h1.32 kB14-09-06 10:46
md5c.a4.60 kB25-10-06 10:27
md5c.c10.19 kB14-09-06 10:46
md5c.o4.43 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<md5>0.00 B25-10-06 10:27
calculate_skip.c2.10 kB15-09-06 16:32
calculate_skip.o1.31 kB25-10-06 10:27
common_utils.c2.14 kB14-09-06 10:46
common_utils.o1.27 kB25-10-06 10:27
default_selection_criterion.c1.46 kB14-09-06 10:46
default_selection_criterion.o740.00 B25-10-06 10:27
enum_media.c2.70 kB14-09-06 10:46
enum_media.o1.18 kB25-10-06 10:27
free_GSM.c1.23 kB14-09-06 10:46
free_GSM.o604.00 B25-10-06 10:27
free_H26L.c1.32 kB14-09-06 10:46
free_H26L.o720.00 B25-10-06 10:27
free_L16.c1.23 kB14-09-06 10:46
free_L16.o604.00 B25-10-06 10:27
free_MP2T.c1.24 kB14-09-06 10:46
free_MP2T.o606.00 B25-10-06 10:27
free_MP4ES.c1.57 kB14-09-06 10:46
free_MP4ES.o792.00 B25-10-06 10:27
free_MPA.c1.23 kB14-09-06 10:46
free_MPA.o604.00 B25-10-06 10:27
free_MPV.c1.35 kB14-09-06 10:46
free_MPV.o696.00 B25-10-06 10:27
get_frame.c2.82 kB15-09-06 11:13
get_frame.o1.30 kB25-10-06 10:27
get_media_entry.c1.75 kB14-09-06 10:46
get_media_entry.o884.00 B25-10-06 10:27
load_GSM.c2.33 kB14-09-06 10:46
load_GSM.o1.16 kB25-10-06 10:27
load_H26L.c1.62 kB14-09-06 10:46
load_H26L.o936.00 B25-10-06 10:27
load_L16.c1.88 kB14-09-06 10:46
load_L16.o780.00 B25-10-06 10:27
load_MP2T.c1.68 kB14-09-06 10:46
load_MP2T.o936.00 B25-10-06 10:27
load_MP4ES.c4.19 kB14-09-06 10:46
load_MP4ES.o1.29 kB25-10-06 10:27
load_MPA.c6.31 kB15-09-06 19:24
load_MPA.o3.26 kB25-10-06 10:27
load_MPV.c2.19 kB14-09-06 10:46
load_MPV.o1.39 kB25-10-06 10:27
Makefile2.33 kB14-09-06 10:46
Makefile.bak2.52 kB14-09-06 10:46
mediaclose.c1.70 kB14-09-06 10:46
mediaclose.o784.00 B25-10-06 10:27
mediacpy.c2.39 kB14-09-06 10:50
mediacpy.o1.20 kB25-10-06 10:27
mediainfo.a81.57 kB25-10-06 10:28
mediaopen.c2.28 kB14-09-06 10:46
mediaopen.o1.31 kB25-10-06 10:27
media_is_empty.c1.47 kB14-09-06 10:46
media_is_empty.o696.00 B25-10-06 10:27
msec2tick.c1.54 kB14-09-06 10:46
msec2tick.o884.00 B25-10-06 10:27
parse_SD_file.c10.44 kB15-09-06 15:49
parse_SD_file.o5.41 kB25-10-06 10:27
read_dim.c2.25 kB15-09-06 16:33
read_dim.o1.55 kB25-10-06 10:28
read_GSM.c2.95 kB14-09-06 10:46
read_GSM.o1.98 kB25-10-06 10:27
read_H26L.c3.86 kB14-09-06 10:46
read_H26L.o1.50 kB25-10-06 10:27
read_MP3.c3.55 kB13-10-06 20:38
read_MP3.o1.93 kB25-10-06 10:27
read_MPEG4ES_utils.c8.00 kB14-09-06 10:46
read_MPEG4ES_utils.o4.40 kB25-10-06 10:27
read_MPEG4ES_video.c7.19 kB14-09-06 10:46
read_MPEG4ES_video.o3.18 kB25-10-06 10:27
read_MPEGSYSTEM_utils.c11.19 kB14-09-06 10:46
read_MPEGSYSTEM_utils.o4.34 kB25-10-06 10:27
read_MPEG_system.c7.32 kB14-09-06 10:46
read_MPEG_system.o4.09 kB25-10-06 10:27
read_MPEG_ts.c2.12 kB14-09-06 10:46
read_MPEG_ts.o1.07 kB25-10-06 10:27
read_MPEG_utils.c10.46 kB14-09-06 10:46
read_MPEG_utils.o3.55 kB25-10-06 10:27
read_MPEG_video.c11.24 kB23-10-06 09:44
read_MPEG_video.c-011.24 kB19-10-06 19:11
read_MPEG_video.c-115.79 kB19-10-06 19:20
read_MPEG_video.c-213.04 kB23-10-06 09:33
read_MPEG_video.o4.22 kB25-10-06 10:28
read_PCM.c3.22 kB14-09-06 10:46
read_PCM.o1.80 kB25-10-06 10:28
register_media.c4.12 kB13-10-06 20:39
register_media.o2.63 kB25-10-06 10:28
rtp_shm.c1.91 kB14-09-06 10:56
rtp_shm.o1.27 kB25-10-06 10:28
search_media.c4.60 kB15-09-06 15:26
search_media.o1.70 kB25-10-06 10:28
tick2msec.c1.52 kB14-09-06 10:46
tick2msec.o916.00 B25-10-06 10:28
validate_stream.c3.82 kB15-09-06 16:00
validate_stream.o6.44 kB25-10-06 10:28
_desktop.ini10.00 B25-10-06 08:28
<mediainfo>0.00 B25-10-06 10:28
mk.sh90.00 B23-10-06 09:39
is_valid_multicast_address.c1.66 kB13-10-06 16:44
is_valid_multicast_address.o808.00 B25-10-06 10:27
Makefile287.00 B14-09-06 10:46
Makefile.bak484.00 B14-09-06 10:46
multicast.a1.04 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<multicast>0.00 B25-10-06 10:27
Makefile757.00 B14-09-06 10:46
Makefile.bak954.00 B14-09-06 10:46
rtcp.a10.47 kB25-10-06 10:27
RTCP_get_fract_lost.c1.37 kB14-09-06 10:46
RTCP_get_fract_lost.o868.00 B25-10-06 10:27
RTCP_get_jitter.c1.32 kB14-09-06 10:46
RTCP_get_jitter.o618.00 B25-10-06 10:27
RTCP_get_pkt_lost.c1.32 kB14-09-06 10:46
RTCP_get_pkt_lost.o622.00 B25-10-06 10:27
RTCP_get_RR_received.c1.34 kB14-09-06 10:46
RTCP_get_RR_received.o628.00 B25-10-06 10:27
RTCP_get_total_packet.c1.34 kB14-09-06 10:46
RTCP_get_total_packet.o630.00 B25-10-06 10:27
RTCP_get_total_payload_octet.c1.36 kB14-09-06 10:46
RTCP_get_total_payload_octet.o644.00 B25-10-06 10:27
RTCP_handler.c2.68 kB14-09-06 10:46
RTCP_handler.o1.38 kB25-10-06 10:27
RTCP_recv_packet.c6.62 kB14-09-06 10:46
RTCP_recv_packet.o1.83 kB25-10-06 10:27
RTCP_send_packet.c6.15 kB14-09-06 10:46
RTCP_send_packet.o2.30 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<rtcp>0.00 B25-10-06 10:27
Makefile587.00 B14-09-06 10:46
Makefile.bak784.00 B14-09-06 10:46
rtp.a9.03 kB25-10-06 10:27
RTP_get_port_pair.c1.62 kB14-09-06 10:46
RTP_get_port_pair.o872.00 B25-10-06 10:27
RTP_port_pool_init.c1.45 kB14-09-06 10:46
RTP_port_pool_init.o824.00 B25-10-06 10:27
RTP_recv.c2.07 kB14-09-06 10:46
RTP_recv.o848.00 B25-10-06 10:27
RTP_release_port_pair.c1.56 kB14-09-06 10:46
RTP_release_port_pair.o856.00 B25-10-06 10:27
RTP_sendto.c2.59 kB14-09-06 10:46
RTP_sendto.o1,016.00 B25-10-06 10:27
RTP_send_packet.c6.36 kB15-09-06 19:48
RTP_send_packet.o2.66 kB25-10-06 10:27
RTP_session_destroy.c3.50 kB14-09-06 10:46
RTP_session_destroy.o1.24 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<rtp>0.00 B25-10-06 10:27
add_time_stamp.c1.65 kB14-09-06 10:46
add_time_stamp.o1.04 kB25-10-06 10:27
bwrite.c1.86 kB15-09-06 19:28
bwrite.o1,020.00 B25-10-06 10:27
get_stat.c3.07 kB14-09-06 10:46
get_stat.o2.61 kB25-10-06 10:27
Makefile1.68 kB14-09-06 10:46
Makefile.bak1.87 kB14-09-06 10:46
max_connection.c1.36 kB14-09-06 10:46
max_connection.o796.00 B25-10-06 10:27
parse_url.c4.45 kB14-09-06 10:46
parse_url.o1.77 kB25-10-06 10:27
rtsp.a57.07 kB25-10-06 10:27
RTSP_describe.c6.43 kB15-09-06 15:59
RTSP_describe.o2.96 kB25-10-06 10:27
RTSP_discard_msg.c1.42 kB14-09-06 10:46
RTSP_discard_msg.o804.00 B25-10-06 10:27
RTSP_full_msg_rcvd.c6.26 kB14-09-06 15:09
RTSP_full_msg_rcvd.o2.05 kB25-10-06 10:27
RTSP_handler.c5.05 kB13-10-06 15:58
RTSP_handler.o2.13 kB25-10-06 10:27
RTSP_initserver.c1.44 kB14-09-06 10:46
RTSP_initserver.o760.00 B25-10-06 10:27
RTSP_options.c2.60 kB14-09-06 16:38
RTSP_options.o1.56 kB25-10-06 10:27
RTSP_pause.c4.47 kB14-09-06 19:53
RTSP_pause.o2.40 kB25-10-06 10:27
RTSP_play.c12.25 kB13-10-06 20:40
RTSP_play.o4.97 kB25-10-06 10:27
RTSP_remove_msg.c1.53 kB14-09-06 10:46
RTSP_remove_msg.o836.00 B25-10-06 10:27
RTSP_setup.c17.17 kB15-09-06 19:43
RTSP_setup.o6.46 kB25-10-06 10:27
RTSP_state_machine.c7.33 kB13-10-06 16:05
RTSP_state_machine.o3.62 kB25-10-06 10:27
RTSP_teardown.c5.69 kB14-09-06 19:51
RTSP_teardown.o2.64 kB25-10-06 10:27
RTSP_validate_method.c2.90 kB14-09-06 10:46
RTSP_validate_method.o1.60 kB25-10-06 10:27
RTSP_valid_response_msg.c2.31 kB13-10-06 15:58
RTSP_valid_response_msg.o1.20 kB25-10-06 10:27
send_describe_reply.c2.99 kB13-10-06 16:01
send_describe_reply.o1.96 kB25-10-06 10:27
send_options_reply.c1.70 kB14-09-06 20:06
send_options_reply.o1.25 kB25-10-06 10:27
send_pause_reply.c1.91 kB14-09-06 20:06
send_pause_reply.o1.39 kB25-10-06 10:27
send_play_reply.c2.52 kB14-09-06 20:19
send_play_reply.o1.83 kB25-10-06 10:27
send_redirect_3xx.c2.80 kB14-09-06 10:46
send_redirect_3xx.o1.89 kB25-10-06 10:27
send_reply.c2.56 kB14-09-06 19:50
send_reply.o1.74 kB25-10-06 10:27
send_setup_reply.c3.44 kB14-09-06 20:20
send_setup_reply.o1.91 kB25-10-06 10:27
send_teardown_reply.c1.92 kB14-09-06 20:20
send_teardown_reply.o1.40 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<rtsp>0.00 B25-10-06 10:27
Makefile593.00 B14-09-06 10:46
Makefile.bak790.00 B14-09-06 10:46
schedule.a9.15 kB25-10-06 10:28
schedule_add.c2.06 kB15-09-06 10:07
schedule_add.o1.04 kB25-10-06 10:28
schedule_do.c6.32 kB13-10-06 16:29
schedule_do.o2.21 kB25-10-06 10:28
schedule_init.c2.27 kB14-09-06 10:46
schedule_init.o884.00 B25-10-06 10:28
schedule_remove.c1.66 kB14-09-06 10:46
schedule_remove.o728.00 B25-10-06 10:28
schedule_resume.c2.20 kB14-09-06 10:46
schedule_resume.o1.36 kB25-10-06 10:28
schedule_start.c2.95 kB16-09-06 10:34
schedule_start.o1.42 kB25-10-06 10:28
schedule_stop.c1.58 kB14-09-06 10:46
schedule_stop.o840.00 B25-10-06 10:28
_desktop.ini10.00 B25-10-06 08:28
<schedule>0.00 B25-10-06 10:28
get_media_descr.c3.47 kB15-09-06 15:49
get_media_descr.o1.56 kB25-10-06 10:28
get_SDP_descr.c8.88 kB15-09-06 15:27
get_SDP_descr.o4.68 kB25-10-06 10:28
get_SDP_session_id.c1.39 kB14-09-06 10:46
get_SDP_session_id.o968.00 B25-10-06 10:28
get_SDP_user_name.c1.30 kB14-09-06 10:46
get_SDP_user_name.o832.00 B25-10-06 10:28
get_SDP_version.c1.36 kB14-09-06 10:46
get_SDP_version.o964.00 B25-10-06 10:28
Makefile489.00 B14-09-06 10:46
Makefile.bak686.00 B14-09-06 10:46
sdp.a9.54 kB25-10-06 10:28
_desktop.ini10.00 B25-10-06 08:28
<sdp>0.00 B25-10-06 10:28
get_address.c3.91 kB16-09-06 10:42
get_address.o1.71 kB25-10-06 10:27
Makefile700.00 B14-09-06 10:46
socket.a12.80 kB25-10-06 10:27
sock_ntop_host.c2.77 kB14-09-06 10:46
sock_ntop_host.o1.13 kB25-10-06 10:27
tcp_accept.c1.55 kB14-09-06 10:46
tcp_accept.o784.00 B25-10-06 10:27
tcp_close.c1.33 kB14-09-06 10:46
tcp_close.o676.00 B25-10-06 10:27
tcp_connect.c2.34 kB14-09-06 10:46
tcp_connect.o1.41 kB25-10-06 10:27
tcp_listen.c2.44 kB14-09-06 10:46
tcp_listen.o1.35 kB25-10-06 10:27
tcp_read.c1.92 kB14-09-06 20:30
tcp_read.o1.05 kB25-10-06 10:27
tcp_write.c1.42 kB14-09-06 10:46
tcp_write.o676.00 B25-10-06 10:27
udp_close.c1.27 kB14-09-06 10:46
udp_close.o676.00 B25-10-06 10:27
udp_connect.c2.28 kB14-09-06 10:46
udp_connect.o1.23 kB25-10-06 10:27
udp_open.c2.29 kB14-09-06 19:43
udp_open.o1.21 kB25-10-06 10:27
_desktop.ini10.00 B25-10-06 08:28
<socket>0.00 B25-10-06 10:27
alloc_path_name.c2.10 kB16-09-06 19:48
alloc_path_name.o1.20 kB25-10-06 10:28
dump_buffer.c1.30 kB14-09-06 10:46
dump_payload.c2.03 kB14-09-06 10:46
fncheader.c1.77 kB14-09-06 10:46
fncheader.o1.07 kB25-10-06 10:28
fnc_log.c4.35 kB14-09-06 10:46
fnc_log.o2.20 kB25-10-06 10:28
get_UTC_time.c1.85 kB14-09-06 10:46
get_UTC_time.o1.20 kB25-10-06 10:28
is_supported_url.c2.17 kB14-09-06 10:46
is_supported_url.o1.59 kB25-10-06 10:28
log.a2.36 kB25-10-06 10:28
main.c3.08 kB25-10-06 10:58
main.o1.46 kB25-10-06 10:58
Makefile1.27 kB14-09-06 10:46
Makefile.bak1.46 kB14-09-06 10:46
NTP_time.c1.24 kB14-09-06 10:46
NTP_time.o760.00 B25-10-06 10:28
prefs.a8.43 kB25-10-06 10:28
prefs_get_hostname.c1.27 kB14-09-06 10:46
prefs_get_hostname.o724.00 B25-10-06 10:28
prefs_get_log.c1.23 kB14-09-06 10:46
prefs_get_log.o712.00 B25-10-06 10:28
prefs_get_max_session.c1.24 kB14-09-06 10:46
prefs_get_max_session.o732.00 B25-10-06 10:28
prefs_get_port.c1.28 kB14-09-06 10:46
prefs_get_port.o720.00 B25-10-06 10:28
prefs_get_serv_root.c1.28 kB14-09-06 10:46
prefs_get_serv_root.o724.00 B25-10-06 10:28
prefs_init.c5.22 kB14-09-06 10:46
prefs_init.o2.88 kB25-10-06 10:28
prefs_use_default.c2.20 kB14-09-06 10:46
prefs_use_default.o1.23 kB25-10-06 10:28
random32.c2.67 kB15-09-06 09:38
random32.o1.07 kB25-10-06 10:28
utils.a6.34 kB25-10-06 10:28
_desktop.ini10.00 B25-10-06 08:28
<src>0.00 B25-10-06 10:58
_desktop.ini10.00 B25-10-06 08:28
<rtsp_server>0.00 B25-10-06 10:30
...
Sponsored links

shm.c (528.37 kB)

Need 2 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D