Server :: Scheme On Delivering A String Message Between Kernel And Userspace?
Jul 9, 2010I used the Netlink mechanism before but it seems that it is not High-Efficiency.Is there another way or other ways better?
View 1 RepliesI used the Netlink mechanism before but it seems that it is not High-Efficiency.Is there another way or other ways better?
View 1 RepliesI'm trying to call some kernel functions from userspace, but I'm not sure if I'm doing it right. The functions control a pulse width modulator on an embedded platform. To pick one at random, the function:
Code:
struct pwm_device *pwm_request(int pwm_id, const char *label);
is defined in linux/pwm.h, and the implementation uses the macro EXPORT_SYMBOL(pwm_request), so I should be able to call this from user-space... right?
Anyway, I've got linux/pwm.h to #include in my source so the compiler knows what it's doing, but what do I link against? The only place in by kernel build tree where I can see a symbol pwm_request defined is in object files like vmlinux.o, built-in.o in the directory, etc. which I don't think I should be linking against.
I have a String that I would like to sign using a given RSA Private key. I thought this would be relatively easy but I have not been able to find out how to do it, unless I'm looking to far into a simple problem. Do i have to put the string into a file, and sign the file, or can i just sign the string/message?
View 7 Replies View RelatedI've set up an postfix+courier imap+mysql server.is it possible to 'move' mailfiles over to the imap store? I have another mail address at my isp provider. And I would like to get rid of my pop mail storing mails locally in my mail client (which is windows; ms outlook). My ISP doesn't support imap, and I would like to store all my mail on one server, which is located in a good server envirmonment. Plus it's nice to have access to all mail from a web interface when it's vacation/travel time. I was thinking something like having a pop client cheking for mail every couple of minutes on the server, some suedo code follows:
Crontab on local server:
0,5,10,15,20..55 * * * * /usr/sbin/checkmail
2,7,12,17,22..57 * * * * /usr/sbin/mv_mail
checkmail:
Checks and downloads popmail from external server
mv_mail:
moves mail from e.x /var/spool/mail/pop/user/cur/* to /var/spool/mail/imap/user/cur/*
Will this kind of setup be possible? is Maildir style popmail compatible with Maildir style imap?
i have configured postfix to deliver mail from an internal mail server to external domains... however i keep getting this errors
Code:
un 10 23:23:59 smtpserver postfix/local[28831]: 7800CF0058: to=<root@smtpserver.domain>, orig_to=<postmaster>, relay=local, delay=0, status=sent (delivered to mailbox)
Jun 10 23:23:59 smtpserver postfix/qmgr[5989]: 7800CF0058: removed
Jun 10 23:25:19 smtpserver postfix/smtpd[28824]: connect from unknown[192.168.5.22]
[code]....
I was trying to use Message Queues for sending message from aninserted kernel module to user space. The function sys_msgsnd failedgiving the obvious error -EFAULT.However, I was able to send the message from kernel to user space when I had made the same driver part of kernel (and not inserting it).How is that possible?I am using linux.2.6.19.x (arch=ppc)I now use Netlink socket to communicate from kernel to user, but the aboveproblem seemed strange to me.
View 2 Replies View Relatedi am trying to build a server that will allow us to jump to a private ip scheme. GB1 65.20.x.x gb2 1.1.x.x if i ssh to the 65.24 ip and configure gb2 i lose access to the server completely. am i missing a route somewhere? BTW this is ubuntu server 10.04
View 5 Replies View RelatedI'm installing Centos 5.5 on a HP ProLiant DL180 Server with ~8 TB of hard disk (4 disks that have been pre-RAIDED), from an installation DVD.
Normally when I get to the partitions screen, I would select "remove all partitions etc".
But this gives me an error message "Your boot partition is on a disk using the GPT partition scheme but this machine cannot boot using GPT. This can happen if there is not enough space on your drives for the installation."
Pressed OK, tried the other three partition options but they led to the same outcome.
Tried Advanced storage configuration: Showed that there was one hard drive (c0d0) with ~ 8 TB of space.
I figured I should create a root sector, set one up with 100 MB of space, ext3, set the mount point as /.
Created a software raid of the remaining space.
Trying to go "next" gave me a similar error about GPT partition scheme. Trying various other configurations all gave similar errors about the GPT scheme.
What do I need to do? Some earlier hard format of the disk or something?
copy string a to string b and change string b with toupper() and count the chars
View 3 Replies View RelatedI am a windows programmer. There I wrote a firewall and VPN System. It was easy. Simply, I USED WINPKFilter by ntkernel.com.What I need is to GET, Edit, and Send the raw Layer 2 packet before reaching to IP Stack.My friends were saying that linux is Ideal for Networking purposes. But for now I say that Linux is very bad in this field and I should say that windows is much better (I beg your pardon)After tens of hours for searching I got nothing good. The hook system of IPtables is not GOOD for me because it has not Ethernet header and also the packets are defragmented when I caught them.
I tried ebtables but it has no user space queue like IPTABLES. What I exactly need is to be able to reach to the chain of raw Ethernet packets and be able to modify them and resend or inject some ethernet packet packet. I Dont Want to go inside the KERNEL. (As windows I want a userspcae library). Dear linux expert I beg your help. Do not let me turn back to windows.
I am trying to access a generic netlink family to send messages from user-space to the kernel. I am using libnl example here [URL].. The problem is that I keep getting
Code:
error: netlink/genl/genl.h: No such file or directory
error: netlink/genl/ctrl.h: No such file or directory
You would think I have not installed libnl and libnl-devel but I have.
[Code]...
Is there an interface whereby a userspace program can retrieve the raw keycodes/scancodes from a keyboard? I'm trying to make something in the way of a piano keyboard, and I need to know when keys are pressed (possibly simultaneously), and when they are released.
View 14 Replies View RelatedI was facing trouble getting my second monitor to even get detected (GeForce GTX 260) so out of desperation i apt-get'd nvidia-glx-179 drivers, I then used Jockey to enable that driver.
Since then, whenever Ubuntu tries to boot, it kills itself. And this is the process:
I power up the tower, the screen goes that nice brown shade as I wait for the graphical ubuntu logo to show me its loading, when it eventually does it very quickly cuts into a full screen not-really-interactive terminal window that shows the boot hanging at random spots in the boot process. Theres no clear pattern. At the time of writing, it hangs on "setting sensors limits" after "Starting AppArmor Profiles".
Im going to restart again, This time it hung up at "Checking battery state..." im going to restart again, Hung up at "PulseAudio configured for per-user sessions saned disabled; edit /etc/default/saned" Ill restart again, Hung up at "Stopping userspace bootsplash"
As much fun as this is, I have a website to develop and this is seriously setting me back. All i wanted was to display the site on my second monitor so i didnt have to swap window depths in rapid succession. This is.. more trouble than it seems to be worth... How do i NOT lose my data?
Its worth noting that all the lines say "OK" next to them, not one mentions a fail of any sort.
When i Ctrl+C to break out, it doesnt, just gives me ^C
I am running cyrus 2.1 on OpenSusu 11.0. A couple of days ago I tried to install ispCP and it ending up trash my email. I restored everything in /etc/postfix where ispCP had changed a load of files, but unfortunately that did not correct all of my problems. I have several domains with multiple users, most of which deliver to a few local address.
joe@domain1 delivers to joe
admin@domain1 delivers to joe
fred@domain2 delivers to fred
admin@domain2 delivers to fred
all of the email intended for local user is delivered to a single user (e.g. larry).Email that is redirected to an external user (e.g. mike@linuxquestions.org) works fine. Email to non-existent users fails, as expect. I tried deleting the mail box for one of the users and re-creating it, but the problem continues. I have looked through many HOWTOs, web pages and man-pages, but I cannot find any configuration options that addresses this kind of thing.
I did search the forum but didn't find an answer.
I have setup Postfix + Dovecot on my basic debian 5 server. If I send a message to a localuser@mydomain.com from mutt, it delivers just fine and is visible when viewed through squirrelmail, I can also send just fine.
My issue is that irrespective of what options I set in main.cf, I cannot for the life of me get Postfix to stop erroring with "Recipient address rejected: User unknown in virtual alias table". I'm stumped.
My main.cf is as follows code...
I do not want to setup virtual hosting with MySQL or similar, I literally want to receive mail in local users mailboxes for a single domain. Any ideas on what's missing?
Ever since I set up procmail filtering, all new emails are delivered into a new folder (e.g. msg.XxX) and skip the inbox.
I tried to set LASTFOLDER=INBOX in procmailrc but to no avail.
My procmailrc file is:
PATH=/usr/bin:/usr/local/bin
LOGFILE=/var/log/procmail.log
MAILDIR=$HOME/mail
[Code]....
How do I make procmail deliver to the inbox and not create a new folder for every new email?
BTW, the filter I have setup fails to pipe to script.cgi
I have come across this option given below in dhcpd.conf file for DHCP Server configuration. Can any body let me know what this option is all about.Code:option T150 code 150 = string;
View 2 Replies View RelatedI have installed Ubuntu 10.04 LTS on a flash drive and everytime I try to do an update I get the following error message:
Code:
Setting up linux-image-2.6.32-33-generic (2.6.32-33.72) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-33-generic
lzma: Encoder error: -2147467259
Failed to create initrd image.
[Code]...
also, I would like to know if I want to make clones of the flash drive, would a copy and paste suffice or do i need to use some cloning software? I have followed the instructions on ubuntu wiki to make my casper-rw larger than 4GB by making it an ext4 partition.
These days, I tried to compile my own kernel. Now, it seems work. However, when the kernel is booting, I always get the error message like below:
acpiphp_ibm: ibm_acpiphp_init: acpi_walk_namespace failed
It looks that something is wrong with my acpi subsystem's configuration. But no matter How I reconfig it, this message still occurs.
My distribution is UBUNTU 10.04 LTS
original kernel with the distribution is 2.6.32
My own kernel is 2.6.35
After CentOS5.3 install to /sdb7 partition (on 2nd HD) and using Ubuntu Grub(on 1st HD mbr) to boot CentOS, I get "memory for crash kernel 0x0 to 0x0 not within permissible range" as soon as CentOS starts. I have 2G of ram. The message is on every boot. I've had several other linuxes on that partition without such an error message. Otherwise the OS starts fine. Is the message of concern/import?
View 3 Replies View RelatedMy company support a client with an old Redhead server " Linux version 2.6.9-5.ELsmp [URL] (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005" My IT department wants to move this old server to a VMware machine and I'm trying to check if this project can fly. Me my self never worked on an old Linux server there for my first question is can I upgrade the kernel with the command yum -y install kernel..... and when I'm done I'm still going to have the old kernel just in case?
View 1 Replies View RelatedI've been trying to understand pthread in C a little better. So I made a simple program that takes in a string from the command line and creates a thread to print the string. I've looked online and copied the basic concepts but there are something things I'm confused about. The programs works just fine, but I have questions. Here's what I have so far.
[Code]....
One thing I'd like to know is why the 3rd argument in the pthread_create function which is my SendMessage function needs to be typecasted to a void pointer and then send the address of the function. Also as for the 4th argument, I would see typecasting to void pointer in some of the pthread examples I saw online, but in my case I'm passing a char pointer, would this be correct? In which case would I ever want to pass a void pointer?
Do I need a pthread_exit(NULL) in my main and in the SendMessage function? If so, why? I added the sleep() function so that I could let the pthread_exit function in my SendMessage function execute first. I simply saw that the online examples on pthread had pthread_exit() in both locations.
I'm new to fedora and when I boot from a cd I get the message: could not find kernel image. I currently have windows xp and my motherboard is and ix38 quad gt if that helps.
View 2 Replies View RelatedI recently did a fresh install of current and once I had it up and running I compiled a fresh 2.6.33 kernel using my old config file, but now I get this warning durning boot, specifically during module loading WARNING: All config files need .conf: /etc/modprobe.d/sound, it will be ignored in a future release. This doesn't seem to be causing any problems but I am curious to know what the message meams? I checked /etc/modprobe but everything looks normal.
View 1 Replies View RelatedI have a line in a text file that has 40 random characters within a tag and i want to change the characters to a new set of 40 random characters (alphanumeric a-z 0-9 etc)
The line in the text file looks like this:
Quote:
How would i go about doing that?
Also second question same as the above but how would i remove them instead of replacing them?
Kernel driver function was called via ioctl and returned success, but when I checked the kernel display buffer with dmesg the printk message was not there. Then when you do lsmod, the driver you were calling showed "used by zero". So it seems like the kernel driver was not accessed. In the kernel driver, I had many printk statements, but nothing printed in the buffer. if the driver get accessed and what could cause this?
View 1 Replies View RelatedIf I have a word in a text file and I need to replace it by another word (for example, i need to replace abc by fff) so what is the command I can type it?
I am using vi editor.
I have a set of lines as ahown below:
Leon went to school
Leon came back from school..
Leon had dinner...
I have to replace the line containing "dinner" by a single string LUNCH...
I need to creates string suffixes out of a Reference string. for eg. suffixes of abcdefg will be
1)bcdefg
2)cdefg
3)defg
and so on...
create an array of pointers to point to the first few characters and then use that pointer to print the rest of the string.But when i print using the pointer i get GARBAGE values! shudn't std::cout<<ptr[w] print the string following the char it is pointing to? why do i get garbage values?
I want to replace a string of directory path in a string to empty:
Code:
But this doesnt seem to give me the desired thing:
Code:
This gives the desired outcome, but its specific, i need a variable in the sed not a string. And if I replace STRING="/mnt/sda1/record/$dd/" then I cant use it for something else, cause its has all the weird backslashes now.