Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: question: trying to...make a named pipe  (Read 3202 times)

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
question: trying to...make a named pipe
« on: December 12, 2008, 11:37:01 pm »

 just trying to get a look at the raw traffic. planning to use a netcat pipe.

so here's the question: how do i create a named pipe in windows vista? i know there's a command in linux, and i know windows has named pipes. but how can i use them without writing C# or something?
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: question: trying to...make a named pipe
« Reply #1 on: December 13, 2008, 08:52:19 pm »

Hmm... I guess your only hope is to have a bunch of dwarves with the metalcrafter job enabled, and hope one of them fey-moods up an artifact pipe segment. Then you can get "Point Pointypointed the Points of Pointing, Copper Pipe Segment"

Or something like that.

Can't help you with vista, though. I'm still using XP.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: question: trying to...make a named pipe
« Reply #2 on: December 13, 2008, 09:07:28 pm »

well, in that case... any body know if it's do-able in xp and how?
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

duro

  • Bay Watcher
  • On Break
    • View Profile
Re: question: trying to...make a named pipe
« Reply #3 on: December 14, 2008, 02:13:29 pm »

but how can i use them without writing C# or something?

Since W32 pipes are impermanent there's no real way to create one from outside a process (at least I don't know of any), if that was your question. When using W32 API functions one usually calls CreateFile I guess to create named pipes, at least that's what I did in the good ol' days.

CreateFile
Pipes
Pipe Functions
Logged
If slavery, barbarism and desolation are to be called peace, men can have no worse misfortune.

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: question: trying to...make a named pipe
« Reply #4 on: December 14, 2008, 02:18:47 pm »

DANG. any idea if i can use cygwin to do it?
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

duro

  • Bay Watcher
  • On Break
    • View Profile
Re: question: trying to...make a named pipe
« Reply #5 on: December 14, 2008, 02:59:38 pm »

Oh, misinterpreted you. fopen should work well too. Just use a proper pipe name like \\.\pipe\YourPipeName (thus "\\\\.\\pipe\\YourPipeName" in C (yay for backslashes!)).
Logged
If slavery, barbarism and desolation are to be called peace, men can have no worse misfortune.

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: question: trying to...make a named pipe
« Reply #6 on: December 14, 2008, 03:02:13 pm »

erm, actually i'm looking for a "shell script" type solution. i'm alergic to C. perl and java i can do, tho.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

duro

  • Bay Watcher
  • On Break
    • View Profile
Re: question: trying to...make a named pipe
« Reply #7 on: December 14, 2008, 03:30:32 pm »

AFAIK in Java there's nothing to create named pipes. In Perl it might be the same as in C, using open instead of fopen (the manpages state both should behave the same), using the backslash orgy I posted earlier as file name.
Logged
If slavery, barbarism and desolation are to be called peace, men can have no worse misfortune.

Calculus

  • Bay Watcher
    • View Profile
Re: question: trying to...make a named pipe
« Reply #8 on: December 15, 2008, 10:43:15 pm »

Why not use free http://www.wireshark.org/, if your are trying to get a look at network traffic?

Or am I misunderstanding your need?
Logged

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: question: trying to...make a named pipe
« Reply #9 on: December 20, 2008, 10:31:46 pm »

Wow...
Thanks for the link! I didn't know such a thing existed, just looked at my problem and thought "netcat can probably do that!" but this'll do nicely. It's more than i really know what to do with, but i'll figure it out ;D

Thanks again!
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch