search for: sll

Displaying 20 results from an estimated 50 matches for "sll".

Did you mean: all
2010 Apr 26
1
valgrind ipconfig work
...kinit/ipconfig/packet.c b/usr/kinit/ipconfig/packet.c index 508c7ba..4df5431 100644 --- a/usr/kinit/ipconfig/packet.c +++ b/usr/kinit/ipconfig/packet.c @@ -114,16 +114,18 @@ static char *ntoa(uint32_t addr) int packet_send(struct netdev *dev, struct iovec *iov, int iov_len) { struct sockaddr_ll sll; - struct msghdr msg = { - .msg_name = &sll, - .msg_namelen = sizeof(sll), - .msg_iov = iov, - .msg_iovlen = iov_len, - .msg_control = NULL, - .msg_controllen = 0, - .msg_flags = 0 - }; int i, len = 0; + struct msghdr msg; + + memset(&sll, 0, sizeof(sll)); + + msg.msg_name = &s...
2011 Mar 28
5
[PATCH 1/3] Only peek and discard packets from specified device.
...'t remove it. + * Fetches a bootp packet from specified device, but doesn't remove it. * Returns: * 0 = Error * >0 = A packet of size "ret" is available for interface ifindex */ -int packet_peek(int *ifindex) +int packet_peek(struct netdev *dev) { struct sockaddr_ll sll; struct iphdr iph; int ret, sllen = sizeof(struct sockaddr_ll); + sll.sll_ifindex = dev->ifindex; /* * Peek at the IP header. */ @@ -192,21 +193,22 @@ int packet_peek(int *ifindex) if (iph.ihl < 5 || iph.version != IPVERSION) goto discard_pkt; - *ifindex = sll.sll_ifindex...
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...netdev.h" #include "packet.h" -static int pkt_fd = -1; - uint16_t cfg_local_port = LOCAL_PORT; uint16_t cfg_remote_port = REMOTE_PORT; -int packet_open(void) +int packet_open(struct netdev *dev) { - int fd, one = 1; - - if (pkt_fd != -1) - return pkt_fd; + struct sockaddr_ll sll; + int fd, rv, one = 1; /* * Get a PACKET socket for IP traffic. @@ -48,18 +45,28 @@ int packet_open(void) sizeof(one)) == -1) { perror("SO_BROADCAST"); close(fd); - fd = -1; + return -1; } - pkt_fd = fd; + memset(&sll, 0, sizeof(sll)); + sll.sll_family =...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...netdev.h" #include "packet.h" -static int pkt_fd = -1; - uint16_t cfg_local_port = LOCAL_PORT; uint16_t cfg_remote_port = REMOTE_PORT; -int packet_open(void) +int packet_open(struct netdev *dev) { - int fd, one = 1; - - if (pkt_fd != -1) - return pkt_fd; + struct sockaddr_ll sll; + int fd, rv, one = 1; /* * Get a PACKET socket for IP traffic. @@ -48,18 +45,28 @@ int packet_open(void) sizeof(one)) == -1) { perror("SO_BROADCAST"); close(fd); - fd = -1; + return -1; } - pkt_fd = fd; + memset(&sll, 0, sizeof(sll)); + sll.sll_family =...
2002 Jun 06
0
[SLL] New 67./8 and 68./8 now in use (fwd)
.... And probably requires some changes. -- Steve Herber herber@thing.com work: 206-261-0307 Systems Engineer, AMCIS, UoW home: 425-454-2399 ---------- Forwarded message ---------- Date: Thu, 6 Jun 2002 09:20:54 -0700 From: John W Baxter <jwblist@olympus.net> To: linux-list@ssc.com Subject: [SLL] New 67./8 and 68./8 now in use The /8 subnets 67.0.0.0 and 68.0.0.0, previously reserved, are now in service (Cox Cable has parts of one; XO has parts of the other...I didn''t ask ARIN about the whole assignments, just 67.0.0.0 and 68.0.0.0). If you''re running an older release w...
2017 Sep 14
2
Live Register Spilling
...i think i should explain what i am trying to achieve. > > I am actually working on MIPS backend to generate smaller set of MIPS Instructions compared to its existing supported instructions. > Currently, i am working on shifting instructions. > > Take an example: > A typical mips sllv syntax goes in this manner: > > sllv $reg1,$reg2,$reg3 > > The $reg3 contains the shifting amount. Only the LSB 5 bit will be used. > The $reg2 contains the data to be shifted. > The $reg1 contains the data after shifting is performed. > > What i want to achieve...
2012 Jul 22
1
[LLVMdev] How to calculate the address in TableGen?
Hello everyone, I would like to ask a question about the address calculation in TableGen. I replace a definition in MipsInstrInfo.td: def : Pat<(i32 (extloadi16_a addr:$src)), (LHu addr:$src)>; to: def : Pat<(i32 (extloadi16_a addr:$src)), (OR (LBu addr:$src), (SLL (LBu addr:($src+1)), 8))>; However, it failed to compiled. It seems that ($src+1) is a wrong representation in TableGen. I find the definition of adds: def addr : ComplexPattern<iPTR, 2, "SelectAddr", [frameindex], [SDNPWantParent]>; How to calculate a new address in TableGen?...
2011 Mar 27
4
ipconfig problem if multiple devices are up
Hi, it seems that ipconfig has a problem if multiple devices are up and connected to the same network. It seems that it uses the wrong socket/device index to compare it to incoming packet. To be more precise, the packet gets discarded in do_pkt_recv as the ifindex from state differs always from the incoming packet To reproduce create two tap devices: $ sudo tunctl -u uli -t tap0
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of klibc. Ben. Ben Hutchings (1): [klibc] run-init: Add dry-run mode Jay Vosburgh (1): [klibc] ipconfig: Use separate sockets for DHCP from multiple interfaces Mathieu Trudel-Lapierre (1): [klibc] ipconfig: Set broadcast when sending DHCPREQUEST and DHCPDISCOVER YunQiang Su (1): [klibc] mips: setjmp.S: don't
2012 Jan 18
2
[LLVMdev] Question about isel patterns
..., so simply partitioning the immediate into four 16-bit parts will not work. Here are some examples: 1. Imm = 0x000000007fff0000 LUi $dst, 7ffff // load immediate to upper 16-bit 2. Imm = 0x000000007fffffff LUi $r0, 7ffff ORi $dst, $r0, fffff 3. Imm = 0x00000fffffffffff ADDiu $r0, $zero, 1 SLL $r1, $r0, 44 // 44-bit shift left logical ADDiu $dst, $r1, fffff // add -1. the imm operand 0xffff is sign-extended to 64-bit when added. Currently, I have the following patterns (the last instruction of the sequence, or the root of the DAG, can be ADDiu, ORi, SLL or LUi): def : Pat<(isImmADD...
2009 Jun 04
1
[LLVMdev] endian issue of llvm-gcc and llvm backend
...: (NOTE: $rx indicates a 32 bits register x, #x indicates constant, subri $r3, $r2, #32 means r3 = 32 - r2, r0, r1 contain the first 64 bits parameter which contains %u, r2 contains the second parameter %b) beqz $r2,83f6 <__ashldi3+0x2a> subri $r3,$r2,#32 blez $r3,83fa <__ashldi3+0x2e> sll $r1,$r1,$r2 srl $r3,$r0,$r3 or $r3,$r3,$r1 sll $r1,$r0,$r2 movi $r2,#0 mov $r0,$r1 or $r1,$r3,$r2 ret $lp ret $lp subri $r3,$r3,#0 movi $r1,#0 sll $r3,$r0,$r3 The above asm code is tested ok in little endian, and not ok in big endian, because it does not get paramter %u correctly, for big endian,...
2002 Nov 19
2
deny host and auth users not working over ssh
Hi- I have a solaris 8 box with the latest ssl, ssh, and rsync all set up. ssh and an apache-sll site are running good - I feel confident that ssl and ssh are set up correctly, but when I use rsync over ssh, it (rsync) will allow me to sync as any (system) user from any host ecven though the rsyncd.conf file in /etc has user auth = <one real system user> and host deny = * is there somet...
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
....s_addr = addr; commit 593b0aa4c9fcfbec7780d9a5c02e8f9942f7387e Author: maximilian attems <max at stro.at> Date: Wed Jun 30 15:45:13 2010 +0200 [klibc] ipconfig: packet_send() fix uninitialized valgrind errors Be conversvative and don't use C99 features, just memset the sll struct. The relevant sll entries are assigned later down the road. Rewrite struct msghdr msg assignments to not mix declarations and assignements. Fixes this valgrind errors: ==3319== ==3319== 1 errors in context 3 of 4: ==3319== Syscall param ioctl(SIOCSIF*ADDR) po...
2008 May 13
5
[LLVMdev] Preferring to use GCC instead of LLVM
...win be installed. But if MinGW or Cygwin is installed, then I have no need for LLVM !! So the point is, Windoze developers will tend to reject LLVM while it requires that MinGW or Cygwin be installed, because MinGW/Cygwin eliminate the need for LLVM. The Solution: Make LLVM usable as a DLL or SLL in Windoze, capable of generating a finished ready-to-execute .EXE or .DLL file, without requiring that MinGW or Cygwin be installed first.
2006 May 30
2
SSL certificate and rails...
Newbie Q: Building a webstore and need to have SLL-encryption on the checkout pages... I have no previous experience with SSL. I understand that I need a SSL-certificate. I''m planning on purchasing the cert from RapidSSL, but to do that I need to generate a CSR (Certificate Signing Request). How do I do that? How do I install the cert...
2005 Jan 24
0
AW: sshd hangs
...64000, 1, 1ed0, 66674) _start+0x5c(0, 0, 0, 0, 0, 0) disassemble trace: server_loop2+0xe0: call -0x102c <0x1f118> 0x1f0f0: sethi %hi(0x46c00), %o0 ... 0x1f24c: add %fp, -0x18, %o4 0x1f250: sll %o0, 5, %g1 0x1f254: sub %g1, %o0, %g1 0x1f258: sll %g1, 2, %g1 0x1f25c: add %g1, %o0, %g1 0x1f260: sll %g1, 3, %g1 0x1f264: st %g1, [%fp - 0x14] 0...
2003 Apr 29
0
[PATCH] Fix busy-looping behaviour in ipconfig
...ort != LOCAL_PORT) { + ipudp_hdrs.udp.source = htons(local_port); + ipudp_hdrs.udp.dest = htons(remote_port); + } + /* * Glue in the ip+udp header iovec */ @@ -160,11 +169,21 @@ return 0; discard_pkt: - recvfrom(pkt_fd, &iph, sizeof(struct iphdr), - 0, (struct sockaddr *)&sll, &sllen); + packet_discard(); return 0; } +void packet_discard(void) +{ + struct iphdr iph; + struct sockaddr_ll sll; + socklen_t sllen = sizeof(sll); + + recvfrom(pkt_fd, &iph, sizeof(iph), 0, + (struct sockaddr *) &sll, &sllen); +} + + /* * Receive a bootp packet. The...
2017 Sep 12
2
Live Register Spilling
Running llc with '-verify-machineinstrs' may tell you which instruction break the SSA form. Ruiling From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of jin chuan see via llvm-dev Sent: Monday, September 11, 2017 10:02 AM To: Matthias Braun <mbraun at apple.com> Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Live Register Spilling Sorry about the
2009 Jun 05
0
[LLVMdev] endian issue of llvm-gcc and llvm backend
...er x, #x indicates constant, subri > $r3, $r2, #32 means r3 = 32 - r2, > r0, r1 contain the first 64 bits parameter which contains %u, r2 contains > the second parameter %b) > > beqz $r2,83f6 <__ashldi3+0x2a> > subri $r3,$r2,#32 > blez $r3,83fa <__ashldi3+0x2e> > sll $r1,$r1,$r2 > srl $r3,$r0,$r3 > or $r3,$r3,$r1 > sll $r1,$r0,$r2 > movi $r2,#0 > mov $r0,$r1 > or $r1,$r3,$r2 > ret $lp > ret $lp > subri $r3,$r3,#0 > movi $r1,#0 > sll $r3,$r0,$r3 > > The above asm code is tested ok in little endian, and not ok in big endian,...
2008 Jun 14
2
PATCH: ipconfig may discard useful packets
...ruct iovec *iov, int iov_len) return sendmsg(pkt_fd, &msg, 0); } +/* + * Fetches a bootp packet, but doesn't remove it. + * Returns: + * 0 = Error + * >0 = A packet of size "ret" is available for interface ifindex + */ int packet_peek(int *ifindex) { struct sockaddr_ll sll; @@ -177,7 +183,7 @@ int packet_peek(int *ifindex) ret = recvfrom(pkt_fd, &iph, sizeof(struct iphdr), MSG_PEEK, (struct sockaddr *)&sll, &sllen); if (ret == -1) - return -1; + return 0; if (sll.sll_family != AF_PACKET) goto discard_pkt; @@ -187,7 +193,7 @@ int pack...