LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Implementation of server/client socket under kernel environment

Posted 04-11-2018 at 03:15 AM by 915086731

Tested successfully on kernel 4.
Server:
Code:
#include<linux/in.h>  
#include<linux/inet.h>  
#include<linux/socket.h>  
#include<net/sock.h>  
  
#include<linux/init.h>  
#include<linux/module.h>  

#define BUFFSIZE 1024

void jiang_debug( void )
{
    printk("just debug");
}

int myserver(void)
{  
  
    struct socket
...
Member
Posted in Uncategorized
Views 2948 Comments 0 915086731 is offline
Old

Implementation of file transferring by using sockets c on Linux.

Posted 08-01-2014 at 09:10 PM by 915086731

Code for file sending.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h> 
#include <pthread.h>


#define SOCKET_PORT "50000"
#define TRANSFER_SIZE 2048

unsigned long int count = 0;

void error(const
...
Member
Posted in Uncategorized
Views 1672 Comments 0 915086731 is offline
Old

git commit

Posted 01-10-2012 at 08:20 PM by 915086731

Creating and Commiting

$ cd (project-directory)
$ git init
$ (add some files)
$ git add .
$ git commit -m 'Initial commit'

Cloning and Creating a Patch

$ git clone git://github.com/git/hello-world.git
$ cd hello-world
$ (edit files)
$ git add (files)
$ git commit -m 'Explain what I changed'
$ git format-patch origin/master


Basic Commands
$ git status
$...
Member
Posted in Uncategorized
Views 7310 Comments 1 915086731 is offline
Old

Linux PAM Program/弹出获得root权限对话框

Posted 08-15-2010 at 08:43 AM by 915086731

关键字: linux pam root权限
什么也不要说,先来一个程序吧。
/*

注意要和你的系统一致redhat是这样/etc/pam.d/check_user
auth required /lib/security/pam_unix_auth.so
account required /lib/security/pam_unix_acct.so
1.如果需要出现密码弹出框还需要在添加...
Member
Posted in Uncategorized
Views 3496 Comments 1 915086731 is offline
Old

core文件控制

Posted 07-09-2010 at 04:42 AM by 915086731

在程序不寻常退出时,内核会在当前工作目录下生成一个core文件(是一个内存映像,同时加上调试信息)。使用gdb来查看core文件,可以指示出导致程序出错的代码所在文件和行数。...
Member
Posted in Uncategorized
Views 3185 Comments 0 915086731 is offline

  



All times are GMT -5. The time now is 02:59 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration