Re: [gentoo-user] Tcp Listener

2014-02-06 Thread
Maybe I miss your problem.But there is a command line program names
'netcat', which can send/receive TCP/UDP messages. also would be nice to
check its source code if you are interested to writing your own.


2014-02-04 xarman manousidis@gmail.com:

 I'm interested in making a TCP Listener in C / C++ on Linux to accept
 many connections simultaneously. I did a relative search on the Web and
 although I am aware of the C language as to a certain extent, I
 struggle to find a model program. Essentially, it is the listener of a
 server that receives a signal and stores it in a database and do some
 other functions. I know how to do the functions but I'm looking for a
 way to fix the basic skeleton of listener that will be always active.
 I'm not sure if I need multi threading or multi socketing for multi
 connections.
 If you have any knowledge on the subject or have a simple example or even
 some reference in order to work on that, I'd appreciate it.




[gentoo-user] there are no ebuilds built with USE flags to satisfy “XXX”

2014-01-04 Thread
Hello everyone.
Today I want to get some game to play, so I want to install supertux,a game
similar to super mario.But when I issue the command,it turned out an error.

senge@Senge-Laptop ~ % sudo emerge -va supertux

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds built with USE flags to satisfy
media-libs/sdl-mixer[mikmod,vorbis].
!!! One of the following packages is required to complete your request:
- media-libs/sdl-mixer-1.2.12-r3::gentoo (Change USE: +mikmod, this change
violates use flag constraints defined by media-libs/sdl-mixer-1.2.12-r3:
'midi? ( any-of ( timidity fluidsynth ) ) timidity? ( midi ) fluidsynth? (
midi ) mp3? ( any-of ( smpeg mad ) ) smpeg? ( mp3 ) mad? ( mp3 ) mod? (
any-of ( mikmod modplug ) ) mikmod? ( mod ) modplug? ( mod )')
(dependency required by games-arcade/supertux-0.1.3 [ebuild])
(dependency required by supertux [argument])

I haven't sdl-mixer installed and I don't know what that is.

senge@Senge-Laptop ~ % eix sdl-mixer
* media-libs/sdl-mixer
 Available versions:  1.2.12-r1 1.2.12-r3 {flac fluidsynth mad midi
mikmod mod modplug mp3 playtools smpeg static-libs timidity vorbis +wav}
 Homepage:http://www.libsdl.org/projects/SDL_mixer/
 Description: Simple Direct Media Layer Mixer Library

I have googled little, but failed.Anybody know how to solve it?


Re: [gentoo-user] Re: [gentoo-user] there are no ebuilds built with USE flags to satisfy “XXX”

2014-01-04 Thread
Thanks a lot! I can play it now.BTW,what emerge means by that?  I can
emerge the game only when the two USE flags is enabled both?

2014/1/5 Willie Matthews matthews.wil...@gmail.com

 On 01/04/2014 07:17 PM, 钱泽森 wrote:
  Hello everyone.
  Today I want to get some game to play, so I want to install supertux,a
  game similar to super mario.But when I issue the command,it turned out
  an error.
 
  senge@Senge-Laptop ~ % sudo emerge -va supertux
 
  These are the packages that would be merged, in order:
 
  Calculating dependencies... done!
 
  emerge: there are no ebuilds built with USE flags to satisfy
  media-libs/sdl-mixer[mikmod,vorbis].
  !!! One of the following packages is required to complete your request:
  - media-libs/sdl-mixer-1.2.12-r3::gentoo (Change USE: +mikmod, this
  change violates use flag constraints defined by
  media-libs/sdl-mixer-1.2.12-r3: 'midi? ( any-of ( timidity fluidsynth
  ) ) timidity? ( midi ) fluidsynth? ( midi ) mp3? ( any-of ( smpeg mad
  ) ) smpeg? ( mp3 ) mad? ( mp3 ) mod? ( any-of ( mikmod modplug ) )
  mikmod? ( mod ) modplug? ( mod )')
  (dependency required by games-arcade/supertux-0.1.3 [ebuild])
  (dependency required by supertux [argument])
 
  I haven't sdl-mixer installed and I don't know what that is.
 
  senge@Senge-Laptop ~ % eix sdl-mixer
  * media-libs/sdl-mixer
  Available versions: 1.2.12-r1 1.2.12-r3 {flac fluidsynth mad midi
  mikmod mod modplug mp3 playtools smpeg static-libs timidity vorbis +wav}
  Homepage: http://www.libsdl.org/projects/SDL_mixer/
  Description: Simple Direct Media Layer Mixer Library
 
  I have googled little, but failed.Anybody know how to solve it?
 I got the exact same error when I tried to install. I already have

 media-libs/sdl-mixer-1.2.12-r3 USE=flac mad mp3 vorbis wav -fluidsynth
 -midi -mikmod -mod -modplug -playtools -smpeg -static-libs -timidity

 I think what it is telling you is if you have mikmod as a user flag you
 also have to have mod.

 media-libs/sdl-mixer-1.2.12-r3 USE=flac mad mikmod* mod* mp3 vorbis wav
 -fluidsynth -midi -modplug -playtools -smpeg -static-libs -timidity

 So you will just add
 media-libs/sdl-mixer mikmod mod
 to your package.use file.

 --


  Willie Matthews
  matthews.wil...@gmail.com
  (702) 508.8455
  I have my geeky moments!





Re: [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server

2013-11-19 Thread
After much tries. problem sovled.:-) It's a authentication problem.
according to nfs mannual page:
 In addition to combining these sideband protocols with the main NFS
protocol, NFS version 4  introduces  more  advanced
   forms  of  access  control,  authentication,  and in-transit data
protection.  The NFS version 4 specification mandates
   NFSv4 ACLs, RPCGSS authentication, and RPCGSS security flavors that
provide per-RPC integrity checking and  encryption.
   Because NFS version 4 combines the function of the sideband
protocols into the main NFS protocol, the new security fea�\
   tures apply to all NFS version 4 operations including mounting, file
locking, and so  on.   RPCGSS  authentication  can
   also be used with NFS versions 2 and 3, but does not protect their
sideband protocols.

and this patch:
https://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.4-rc2/2.6.4-rc2-mm1/broken-out/nfs-simplify-config-options.patch

nfsv4 need DES and MD5.but in official kernel, the dependency missed, nor
writesyou should say yes to support nfsv4, so I turn it down.(bad habbit).

The patch is for 2.6.4, and I wonder why the dependency mistake still
existed. Anyway, probleam solved.



2013/11/19 edwardu...@live.com edwardu...@live.com

 On 11/18/2013 12:08 AM, 钱泽森 wrote:
  Thanks for reply! However, CONFIG_NFS_FS is a client config, and
  probably not related to my server problem.


 Thanks for being kind and explaining it to me. :-)
 I though that was needed. I went back and read the gentoo nfs wiki and
 saw that under notes, sorry for the noise.




[gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server

2013-11-17 Thread
Hi all.this is my first message in mail list, so correct me if I 'm wrong.
I have a raspberry pi with kernel compiled from
(sys-kernel/raspberrypi-source 3.6.11_r20130711,running nfsv4 server.To
simplify problem, only a simple directory exported.

Senge-Raspi ~ # cat /etc/exports
# /etc/exports: NFS file systems being exported.  See exports(5).
/export *(fsid=0,rw,no_subtree_check,no_root_squash)
Senge-Raspi ~ # ls -l /export/
total 4
-rw-r--r-- 1 root root 4 Nov 18 12:48 test
Senge-Raspi ~ # cat /export/test
foo

And on my laptop, as nfs client.

senge@Senge-Laptop ~ $ cat /etc/fstab
# fs  mountpointtype  opts
dump/pass

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1   /boot   ext4
noauto,noatime  1 2
/dev/sda3   /   ext4
noatime 0 1
/dev/sda2   noneswap
sw  0 0
/dev/sda4   /mnt/windowsntfs
noauto  0 0
59.78.22.20:/   /raspi  nfs4
rw,_netdev,auto,rsize=32768,wsize=32768 0 0
senge@Senge-Laptop ~ $ sudo rc-config restart nfsmount
Restarting init script
 * Starting rpcbind
...
[ ok ]
 * Starting NFS statd
...
[ ok ]
 * Setting up RPC pipefs
...
[ ok ]
 * Starting idmapd
...
[ ok ]
 * Starting NFS sm-notify
...
[ ok ]
 * Mounting NFS filesystems ...

It hangs here. and in kernel message
[19888.585247] RPC: Registered named UNIX socket transport module.
[19888.585251] RPC: Registered udp transport module.
[19888.585252] RPC: Registered tcp transport module.
[19888.585253] RPC: Registered tcp NFSv4.1 backchannel transport module.
[19889.214956] NFS: Registering the id_resolver key type
[19889.214973] Key type id_resolver registered
[19889.214974] Key type id_legacy registered
[20054.134247] NFS: nfs4_discover_server_trunking unhandled error -512.
Exiting with error EIO

sometimes mount succeed, and directory can be accessed. but reading files
return error:(without 'dmesg' changed)
senge@Senge-Laptop ~ $ sudo rc-config restart nfsmount
Restarting init script
 * Starting NFS sm-notify
...
[ ok ]
 * Mounting NFS filesystems
...
[ ok ]
senge@Senge-Laptop ~ $ cat /raspi/test
cat: /raspi/test: Input/Output error

But I actually have nfs support on server:
Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
# CONFIG_NFS_FS is not set
CONFIG_NFSD=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y

However, official pre-compiled kernel(sys-kernel/raspberrypi-image
3.6.11-p20130730) worked fine,
Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
# CONFIG_NFS_SWAP is not set
# CONFIG_NFS_V4_1 is not set
CONFIG_ROOT_NFS=y
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y


I have googled a lot, return few result...any idea appreciated.(sorry for
poor English)